-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
75 lines (63 loc) · 2.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
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
{
description = "flypi flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs, ... }:
let
supportedSystems = [
"aarch64-linux"
"x86_64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgsForSystem =
system:
(import nixpkgs {
inherit system;
overlays = [ self.overlay ];
});
in
{
overlay = final: prev: {
dump1090-fa = prev.dump1090.overrideAttrs (oldAttrs: rec {
buildFlags = oldAttrs.buildFlags ++ [ "faup1090" ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share $out/etc/default
cp -v dump1090 $out/bin/dump1090-fa
cp -v view1090 faup1090 $out/bin
cp -vr public_html $out/share/dump1090
substituteInPlace debian/start-dump1090-fa \
--replace "/etc/default/dump1090-fa" "$out/etc/default/dump1090-fa" \
--replace "/usr/bin/dump1090-fa" "$out/bin/dump1090-fa"
install -m 0755 -D debian/start-dump1090-fa $out/bin/start-dump1090-fa
install -m 0644 -D debian/dump1090-fa.default $out/etc/default/dump1090-fa
runHook postInstall
'';
});
fr24 = final.callPackage ./pkgs/fr24 { };
piaware = final.callPackage ./pkgs/piaware { };
planefinder = final.callPackage ./pkgs/planefinder { };
realadsb = final.callPackage ./pkgs/realadsb { };
tcllauncher = final.callPackage ./pkgs/tcllauncher { };
};
packages = forAllSystems (system: {
inherit (pkgsForSystem system)
dump1090
fr24
piaware
planefinder
realadsb
tcllauncher
;
});
nixosModules = {
dump1090 = import ./modules/dump1090.nix;
fr24 = import ./modules/fr24.nix;
piaware = import ./modules/piaware.nix;
planefinder = import ./modules/planefinder.nix;
realadsb = import ./modules/realadsb.nix;
};
};
}