Skip to content

Instantly share code, notes, and snippets.

@PuercoPop
Created May 7, 2023 04:27
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 PuercoPop/ad8bd32593576ed77aa4a153a3ee9cc6 to your computer and use it in GitHub Desktop.
Save PuercoPop/ad8bd32593576ed77aa4a153a3ee9cc6 to your computer and use it in GitHub Desktop.
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
mach-nix.url = "github:davhau/mach-nix";
};
outputs = { self, nixpkgs, mach-nix }:
let
pkgs = import nixpkgs { inherit x86_64-linux; };
mach = mach-nix.lib.x86_64-linux;
pythonVersion = "python312";
pythonEnv = mach.mkPython {
python = pythonVersion;
requirements = builtins.readFile ./requirements.txt;
};
in
{
devShells.x86_64-linux.default = pkgs.mkShellNoCC
{
packages = [ pythonEnv ];
shellHook = ''
export PYTHONPATH="${pythonEnv}/bin/python"
'';
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment