initial commit
This commit is contained in:
commit
193ab79228
4 changed files with 88 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/.venv
|
43
flake.lock
generated
Normal file
43
flake.lock
generated
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1742889210,
|
||||
"narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "698214a32beb4f4c8e3942372c694f40848b360d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
16
flake.nix
Normal file
16
flake.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
description = "kathara venv";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
};
|
||||
|
||||
outputs = inputs: let
|
||||
eachSystem = inputs.nixpkgs.lib.genAttrs (import inputs.systems);
|
||||
pkgsFor = inputs.nixpkgs.legacyPackages;
|
||||
in {
|
||||
devShells = eachSystem (system: {
|
||||
default = pkgsFor.${system}.callPackage ./shell.nix {};
|
||||
});
|
||||
};
|
||||
}
|
28
shell.nix
Normal file
28
shell.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
mkShell,
|
||||
python3Packages,
|
||||
}: let
|
||||
inherit (python3Packages) python venvShellHook;
|
||||
in
|
||||
mkShell {
|
||||
name = "impurePythonEnv";
|
||||
venvDir = "./.venv";
|
||||
buildInputs = [
|
||||
python
|
||||
|
||||
venvShellHook
|
||||
];
|
||||
|
||||
# Run this command, only after creating the virtual environment
|
||||
postVenvCreation = ''
|
||||
unset SOURCE_DATE_EPOCH
|
||||
pip install kathara
|
||||
'';
|
||||
|
||||
# Now we can execute any commands within the virtual environment.
|
||||
# This is optional and can be left out to run pip manually.
|
||||
postShellHook = ''
|
||||
# allow pip to install wheels
|
||||
unset SOURCE_DATE_EPOCH
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue