-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
flake.nix
31 lines (26 loc) · 1.08 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
description = "pyctr";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs@{ self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; }; in {
packages = rec {
pyfatfs = pkgs.python3Packages.callPackage ./pyfatfs.nix { };
pyctr = pkgs.python3Packages.callPackage ./pyctr.nix { pyfatfs = self.packages.${system}.pyfatfs; };
default = pyctr;
# mainly useful for things like pycharm
python-environment = pkgs.python3Packages.python.buildEnv.override {
extraLibs = pyctr.propagatedBuildInputs ++ (with pkgs.python3Packages; [ pytest ]);
ignoreCollisions = true;
};
tester = pkgs.writeShellScriptBin "pyctr-tester" (with self.packages.${system}; ''
PYTHONPATH=$PWD:$PYTHONPATH ${python-environment}/bin/pytest ./tests
'');
};
devShells.default = pkgs.callPackage ./shell.nix {};
}
);
}