-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.nix
85 lines (63 loc) · 2.01 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{ pkgs ? (import ./nix/nixpkgs-pinned.nix { }) }:
let
gi = pkgs.nix-gitignore;
lib = pkgs.lib;
version = import ./nix/version.nix;
root = ./.;
getSrc = name: builtins.path {
name = builtins.baseNameOf name;
path = root + "/${name}";
filter = gi.gitignoreFilter (builtins.readFile ./.gitignore) root;
};
in
rec {
warteraum-static = pkgs.pkgsStatic.callPackage ./nix/warteraum.nix {
# TODO: inherit (pkgs.pkgsStatic.llvmPackages) stdenv;
inherit getSrc;
inherit (python3.pkgs) pytest pytest-randomly requests flipdot-gschichtler;
};
warteraum = pkgs.callPackage ./nix/warteraum.nix {
inherit (pkgs.llvmPackages_latest) stdenv;
inherit getSrc;
inherit (python3.pkgs) pytest pytest-randomly requests flipdot-gschichtler;
};
bahnhofshalle = pkgs.stdenv.mkDerivation {
pname = "bahnhofshalle";
inherit version;
src = getSrc "bahnhofshalle";
nativeBuildInputs = [
pkgs.buildPackages.esbuild
];
makeFlags = [
"DIST=$(out)"
];
installTargets = [ "dist" ];
};
anzeigetafel =
let
drv = { buildPythonApplication, unifont, flipdots, flipdot-gschichtler }:
buildPythonApplication {
pname = "anzeigetafel";
inherit version;
src = getSrc "anzeigetafel";
propagatedBuildInputs = [ flipdots flipdot-gschichtler ];
doCheck = false;
patchPhase = ''
rm flipdots flipdot_gschichtler
sed -i "s/version = '.*'/version = '${version}'/" setup.py
sed -i 's|FONT =.*$|FONT = "${unifont}/share/fonts/unifont.pcf.gz"|' anzeigetafel.py
'';
};
in python3.pkgs.callPackage drv { };
python3 = pkgs.python3.override {
packageOverrides = self: super: {
flipdots = self.callPackage ./nix/python-flipdots.nix {
inherit getSrc;
};
flipdot-gschichtler = self.callPackage ./nix/python-flipdot-gschichtler.nix {
inherit getSrc;
};
};
};
nixosModule = ./nixos/flipdot-gschichtler.nix;
}