nix: python devshell
This commit is contained in:
parent
c6a295a4e5
commit
3be09c16d0
2 changed files with 64 additions and 0 deletions
37
flake.nix
Normal file
37
flake.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
description = "A very basic flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }: {
|
||||
devShells.x86_64-linux.default =
|
||||
let
|
||||
insecure-package-overlay = final: prev: {
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
# Add the full name and version of the package here
|
||||
"python-2.7.18.8-env"
|
||||
# "another-insecure-package-2.0"
|
||||
];
|
||||
};
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [insecure-package-overlay];
|
||||
};
|
||||
pyenv = pkgs.python3.withPackages (ps: [
|
||||
ps.gevent # Version 1.2.1 from pinned nixpkgs
|
||||
ps.pygame # Version 1.9.3 from pinned nixpkgs
|
||||
ps.numpy # Our custom-versioned NumPy
|
||||
]);
|
||||
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
|
||||
pyenv
|
||||
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue