diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..93ae36a --- /dev/null +++ b/default.nix @@ -0,0 +1,19 @@ +{ pkgs ? import {}, 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 + ''; + } diff --git a/shell.nix b/shell.nix index ae704f3..fd59ae8 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1 @@ -let - pkgs = import {}; - pyenv = pypkgs: with pypkgs; [ - greenlet twisted cython mysqlclient bcrypt - ]; -in -pkgs.mkShell { - buildInputs = [ - (pkgs.python2.withPackages pyenv) - ]; -} +import ./default.nix { shell = true; } diff --git a/whiteboard.py b/whiteboard.py old mode 100644 new mode 100755 index 6cef686..3049be7 --- a/whiteboard.py +++ b/whiteboard.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python2 + # 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