Created
September 28, 2021 14:36
-
-
Save sjahl/e210cd667c822d66c61b3de750a00504 to your computer and use it in GitHub Desktop.
reproducible python environment with nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
let | |
mach-nix = import (builtins.fetchGit { | |
url = "https://github.com/DavHau/mach-nix"; | |
ref = "refs/tags/3.3.0"; | |
}) { | |
pkgs = pkgs; | |
python = "python37"; | |
pypiDataRev = "48f4b1841d11673822d3f42178480378d1a07a90"; # 2021-09-27T20:16:37Z | |
pypiDataSha256 = "0iallhbxsa3gmgby3rrfhz1a3yq9pdyakrk0p6036spyhig8p4bh"; | |
}; | |
customPython = mach-nix.mkPython { | |
requirements = builtins.readFile ./requirements.txt; | |
}; | |
in | |
pkgs.mkShell { | |
buildInputs = [ customPython ]; | |
shellHook = '' | |
alias vim='nvim' | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment