marmots/default.nix

20 lines
438 B
Nix

{ 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
'';
}