added stuff

This commit is contained in:
vali 2024-04-09 23:11:33 +02:00
commit 7d4f626b7d
907 changed files with 70990 additions and 0 deletions

View file

@ -0,0 +1 @@
use flake . --builders ""

View 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
'';
}

View 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;
};
}

View file

@ -0,0 +1,13 @@
{
callPackage,
mkShellNoCC,
python3,
...
}: let
defaultPackage = callPackage ./default.nix;
in
mkShellNoCC {
packages = [
(python3.withPackages defaultPackage.propagatedBuildInputs)
];
}