Skip to content

Instantly share code, notes, and snippets.

@matthew-piziak
Created November 20, 2019 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthew-piziak/f76d88470ce5dea582cbf0b2aff32923 to your computer and use it in GitHub Desktop.
Save matthew-piziak/f76d88470ce5dea582cbf0b2aff32923 to your computer and use it in GitHub Desktop.
let
pkgSource = "https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.09.tar.gz";
pkgTarball = fetchTarball pkgSource;
pkgs = import pkgTarball { };
python372 = let
py = pkgs.python37.override {
self = py;
sourceVersion = {
major = "3";
minor = "7";
patch = "2";
suffix = "";
};
sha256 = "1fzi9d2gibh0wzwidyckzbywsxcsbckgsl05ryxlifxia77fhgyq";
};
in py;
project-python = python372.withPackages (ps: with ps; [ virtualenv ]);
in pkgs.stdenv.mkDerivation {
name = "project";
buildInputs = [ project-python pkgs.pipenv pkgs.postgresql pkgs.openssl ];
shellHook = ''
export PYTHONPATH=$(pipenv --venv)/lib/python3.7/site-packages/:$PYTHONPATH;
export SOURCE_DATE_EPOCH=315532800 # 1980 (a hack for pipenv to build with zip, which does not support files before 1980)
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment