add nix-build support

This commit is contained in:
Jeremy Penner 2020-06-28 14:20:31 -04:00
parent 8a605b84b8
commit 6790f23474
3 changed files with 22 additions and 11 deletions

19
default.nix Normal file
View file

@ -0,0 +1,19 @@
{ pkgs ? import <nixpkgs> {}, shell ? false }:
let
pyenv = pypkgs: with pypkgs; [
greenlet twisted cython mysqlclient bcrypt
];
buildInputs = [ (pkgs.python2.withPackages pyenv) ];
in
if shell then
pkgs.mkShell { inherit buildInputs; }
else
pkgs.stdenv.mkDerivation {
name = "marmots";
src = ./.;
inherit buildInputs;
installPhase = ''
mkdir $out
cp -R * $out
'';
}

View file

@ -1,11 +1 @@
let import ./default.nix { shell = true; }
pkgs = import <nixpkgs> {};
pyenv = pypkgs: with pypkgs; [
greenlet twisted cython mysqlclient bcrypt
];
in
pkgs.mkShell {
buildInputs = [
(pkgs.python2.withPackages pyenv)
];
}

2
whiteboard.py Normal file → Executable file
View file

@ -1,3 +1,5 @@
#!/usr/bin/env python2
# This file is part of MarMOTS. # This file is part of MarMOTS.
# #
# MarMOTS is free software: you can redistribute it and/or modify it under the terms of the GNU Affero # MarMOTS is free software: you can redistribute it and/or modify it under the terms of the GNU Affero