added stuff
This commit is contained in:
parent
937f28770d
commit
236b8c2a6b
907 changed files with 70990 additions and 0 deletions
1
nyx/flake/templates/python/.envrc
Normal file
1
nyx/flake/templates/python/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake . --builders ""
|
24
nyx/flake/templates/python/default.nix
Normal file
24
nyx/flake/templates/python/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
python3Packages,
|
||||
doCheck ? false,
|
||||
...
|
||||
}:
|
||||
python3Packages.buildPythonApplication {
|
||||
pname = "sample-python-project";
|
||||
version = "0.0.1";
|
||||
|
||||
src = ./.;
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [];
|
||||
|
||||
nativeCheckInputs = [
|
||||
python3Packages.pytest
|
||||
];
|
||||
|
||||
checkPhase = lib.optionals doCheck ''
|
||||
runHook preCheck
|
||||
pytest
|
||||
runHook postCheck
|
||||
'';
|
||||
}
|
26
nyx/flake/templates/python/flake.nix
Normal file
26
nyx/flake/templates/python/flake.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
description = "Python Project Template";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
}: let
|
||||
systems = ["x86_64-linux" "aarch64-linux"];
|
||||
forEachSystem = nixpkgs.lib.genAttrs systems;
|
||||
|
||||
pkgsForEach = nixpkgs.legacyPackages;
|
||||
in rec {
|
||||
packages = forEachSystem (system: {
|
||||
default = pkgsForEach.${system}.callPackage ./default.nix {};
|
||||
});
|
||||
|
||||
devShells = forEachSystem (system: {
|
||||
default = pkgsForEach.${system}.callPackage ./shell.nix {};
|
||||
});
|
||||
|
||||
hydraJobs = packages;
|
||||
};
|
||||
}
|
13
nyx/flake/templates/python/shell.nix
Normal file
13
nyx/flake/templates/python/shell.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
callPackage,
|
||||
mkShellNoCC,
|
||||
python3,
|
||||
...
|
||||
}: let
|
||||
defaultPackage = callPackage ./default.nix;
|
||||
in
|
||||
mkShellNoCC {
|
||||
packages = [
|
||||
(python3.withPackages defaultPackage.propagatedBuildInputs)
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue