Add flake as venv replacement

This commit is contained in:
Joscha 2023-04-26 20:44:55 +02:00
parent 61eba64b5e
commit 81a5375421
2 changed files with 39 additions and 0 deletions

24
flake.lock generated Normal file
View file

@ -0,0 +1,24 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1681737997,
"narHash": "sha256-pHhjgsIkRMu80LmVe8QoKIZB6VZGRRxFmIvsC5S89k4=",
"path": "/nix/store/9gyra3774fp9bdzchrvq2v4y9nia0pc3-source",
"rev": "f00994e78cd39e6fc966f0c4103f908e63284780",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

15
flake.nix Normal file
View file

@ -0,0 +1,15 @@
{
outputs = { self, nixpkgs }:
let forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
in {
devShells = forAllSystems (system:
let
pkgs = import nixpkgs { inherit system; };
pythonPkgs = ps: with ps; [ requests ];
in
{
default = (pkgs.python3.withPackages pythonPkgs).env;
}
);
};
}