Create flake config with dev shell to load poetry
This commit is contained in:
parent
76aac8cce0
commit
c51e70a809
43
flake.lock
generated
Normal file
43
flake.lock
generated
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"nodes": {
|
||||
"my-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1670879933,
|
||||
"narHash": "sha256-V45PH0cnFLilx66x4td5qQnWNn/V/6/6b7FQDIHvdyI=",
|
||||
"owner": "Jaculabilis",
|
||||
"repo": "my-flake",
|
||||
"rev": "2b2cd07a6d971b15fc5f65d6d963d0da551a5892",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Jaculabilis",
|
||||
"repo": "my-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1669833724,
|
||||
"narHash": "sha256-/HEZNyGbnQecrgJnfE8d0WC5c1xuPSD2LUpB6YXlg4c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4d2b37a84fad1091b9de401eb450aae66f1a741e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "refs/tags/22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"my-flake": "my-flake",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
23
flake.nix
Normal file
23
flake.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
inputs = {
|
||||
my-flake.url = "github:Jaculabilis/my-flake";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs?ref=refs/tags/22.11";
|
||||
};
|
||||
|
||||
outputs = { self, my-flake, nixpkgs }:
|
||||
let
|
||||
systems = [ "aarch64-linux" "x86_64-linux" ];
|
||||
each = system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = [ (pkgs.python3.withPackages (py: [ py.poetry ])) ];
|
||||
shellHook = ''
|
||||
PS1="(nix develop) $PS1"
|
||||
'';
|
||||
};
|
||||
};
|
||||
in my-flake.outputs-for each systems;
|
||||
}
|
Loading…
Reference in New Issue
Block a user