initial commit
This commit is contained in:
commit
578ddba8c1
6 changed files with 117 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/.venv
|
24
LICENSE
Normal file
24
LICENSE
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <https://unlicense.org>
|
5
README.md
Normal file
5
README.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
## Venv for Kathara
|
||||||
|
|
||||||
|
### Usage:
|
||||||
|
|
||||||
|
run `nix develop`.
|
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