-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.nix
68 lines (59 loc) · 1.6 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{ lib, python3Packages, fetchPypi, nix-index, nix, hatch, amber-lang
, libfaketime, ... }:
let
nixie_ver = "2025.02-a2";
pzp = python3Packages.buildPythonPackage rec {
pname = "pzp";
version = "0.0.27";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-HwsOJA3spcCUFvIBLFkSpMIPZgcU9r1JkAgt0Cj/oUg=";
};
doCheck = false;
};
hatch-build-scripts = python3Packages.buildPythonPackage rec {
pname = "hatch-build-scripts";
version = "0.0.4";
format = "pyproject";
buildInputs =
[ hatch
];
src = fetchPypi {
inherit version;
pname = "hatch_build_scripts";
sha256 = "sha256-x4UgmGkH5HU48suyT95B7fwsxV9FK1Ni+64Vzk5jRPc=";
};
};
# By default, Amber adds a header with the build time, which can't be disabled.
# This wraps the compiler in faketime to make the timestamp reproducible.
# See amber-lang/amber#672
amber-reproducible = amber-lang.overrideAttrs (self: super: {
postInstall = ''
${super.postInstall}
mv $out/bin/amber $out/bin/.amber-orig
makeWrapper ${libfaketime}/bin/faketime $out/bin/amber \
--add-flags "-f '1970-01-01 01:00:00' $out/bin/.amber-orig"
'';
});
in python3Packages.buildPythonApplication {
pname = "nixie";
version = nixie_ver;
src = ./.;
format = "pyproject";
nativeBuildInputs =
[ hatch
hatch-build-scripts
amber-reproducible
libfaketime
];
propagatedBuildInputs = with python3Packages;
[ click
rich
click-option-group
python-dotenv
pzp
gitpython
nix-index
nix
];
}