-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.nix
41 lines (35 loc) · 892 Bytes
/
default.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
32
33
34
35
36
37
38
39
40
41
{ pkgs ? import <nixpkgs> {}
, lib ? pkgs.lib
, debug ? false
}:
with pkgs.python3Packages;
buildPythonApplication (rec {
pname = "hoardy-adb";
version = "1.1.3";
format = "pyproject";
src = lib.cleanSourceWith {
src = ./.;
filter = name: type: let baseName = baseNameOf (toString name); in
lib.cleanSourceFilter name type
&& (builtins.match ".*.un~" baseName == null)
&& (baseName != "default.nix")
&& (baseName != "dist")
&& (baseName != "result")
&& (baseName != "results")
&& (baseName != "__pycache__")
&& (baseName != ".mypy_cache")
&& (baseName != ".pytest_cache")
&& (baseName != "test-data")
;
};
propagatedBuildInputs = [
setuptools
cryptography
];
} // lib.optionalAttrs debug {
nativeBuildInputs = [
mypy
];
preBuild = "find . ; mypy";
postInstall = "find $out";
})