|
3 | 3 |
|
4 | 4 | inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small";
|
5 | 5 |
|
6 |
| - outputs = { self, nixpkgs }: |
| 6 | + outputs = |
| 7 | + { self, nixpkgs }: |
7 | 8 | {
|
8 | 9 | overlays.default = final: prev: {
|
9 |
| - nixos-channel-native-programs = with final; stdenv.mkDerivation { |
| 10 | + nixos-channel-native-programs = final.stdenv.mkDerivation { |
10 | 11 | name = "nixos-channel-native-programs";
|
11 |
| - buildInputs = [ |
12 |
| - nix |
13 |
| - pkg-config |
14 |
| - boehmgc |
15 |
| - nlohmann_json |
16 |
| - boost |
17 |
| - sqlite |
| 12 | + |
| 13 | + strictDeps = true; |
| 14 | + |
| 15 | + nativeBuildInputs = with final.buildPackages; [ |
| 16 | + pkg-config |
18 | 17 | ];
|
19 | 18 |
|
20 |
| - buildCommand = let |
21 |
| - nixHasSignalsHh = nixpkgs.lib.strings.versionAtLeast nix.version "2.19"; |
22 |
| - in '' |
| 19 | + buildInputs = with final; [ |
| 20 | + nixVersions.nix_2_28 |
| 21 | + nlohmann_json |
| 22 | + boost |
| 23 | + ]; |
| 24 | + |
| 25 | + buildCommand = '' |
23 | 26 | mkdir -p $out/bin
|
24 | 27 |
|
25 |
| - g++ -Os -g ${./index-debuginfo.cc} -Wall -std=c++14 -o $out/bin/index-debuginfo -I . \ |
26 |
| - $(pkg-config --cflags nix-main) \ |
27 |
| - $(pkg-config --libs nix-main) \ |
28 |
| - $(pkg-config --libs nix-store) \ |
29 |
| - -lsqlite3 \ |
30 |
| - ${nixpkgs.lib.optionalString nixHasSignalsHh "-DHAS_SIGNALS_HH"} |
| 28 | + $CXX \ |
| 29 | + -Os -g -Wall \ |
| 30 | + -std=c++14 \ |
| 31 | + $(pkg-config --libs --cflags nix-store) \ |
| 32 | + $(pkg-config --libs --cflags nix-main) \ |
| 33 | + -I . \ |
| 34 | + ${./index-debuginfo.cc} \ |
| 35 | + -o $out/bin/index-debuginfo |
31 | 36 | '';
|
32 | 37 | };
|
33 | 38 |
|
34 |
| - nixos-channel-scripts = with final; stdenv.mkDerivation { |
| 39 | + nixos-channel-scripts = final.stdenv.mkDerivation { |
35 | 40 | name = "nixos-channel-scripts";
|
36 | 41 |
|
37 |
| - buildInputs = with perlPackages; |
38 |
| - [ nix |
39 |
| - sqlite |
40 |
| - makeWrapper |
41 |
| - perl |
42 |
| - FileSlurp |
43 |
| - LWP |
44 |
| - LWPProtocolHttps |
45 |
| - ListMoreUtils |
46 |
| - DBDSQLite |
47 |
| - NetAmazonS3 |
48 |
| - brotli |
49 |
| - jq |
50 |
| - nixos-channel-native-programs |
51 |
| - nix-index |
52 |
| - ]; |
| 42 | + strictDeps = true; |
| 43 | + |
| 44 | + nativeBuildInputs = with final.buildPackages; [ |
| 45 | + makeWrapper |
| 46 | + ]; |
| 47 | + |
| 48 | + buildInputs = with final.perlPackages; [ |
| 49 | + final.perl |
| 50 | + FileSlurp |
| 51 | + LWP |
| 52 | + LWPProtocolHttps |
| 53 | + ListMoreUtils |
| 54 | + DBDSQLite |
| 55 | + NetAmazonS3 |
| 56 | + ]; |
53 | 57 |
|
54 | 58 | buildCommand = ''
|
55 | 59 | mkdir -p $out/bin
|
|
58 | 62 | wrapProgram $out/bin/mirror-nixos-branch \
|
59 | 63 | --set PERL5LIB $PERL5LIB \
|
60 | 64 | --set XZ_OPT "-T0" \
|
61 |
| - --prefix PATH : ${lib.makeBinPath [ wget git nix gnutar xz rsync openssh nix-index nixos-channel-native-programs ]} |
| 65 | + --prefix PATH : ${ |
| 66 | + final.lib.makeBinPath ( |
| 67 | + with final; |
| 68 | + [ |
| 69 | + wget |
| 70 | + git |
| 71 | + nix |
| 72 | + gnutar |
| 73 | + xz |
| 74 | + rsync |
| 75 | + openssh |
| 76 | + nix-index |
| 77 | + nixos-channel-native-programs |
| 78 | + ] |
| 79 | + ) |
| 80 | + } |
62 | 81 |
|
63 | 82 | patchShebangs $out/bin
|
64 | 83 | '';
|
65 | 84 | };
|
66 | 85 |
|
67 | 86 | };
|
68 | 87 |
|
69 |
| - packages.default.x86_64-linux = (import nixpkgs { |
70 |
| - system = "x86_64-linux"; |
71 |
| - overlays = [ self.overlays.default ]; |
72 |
| - }).nixos-channel-scripts; |
| 88 | + packages.x86_64-linux.default = |
| 89 | + (import nixpkgs { |
| 90 | + system = "x86_64-linux"; |
| 91 | + overlays = [ self.overlays.default ]; |
| 92 | + }).nixos-channel-scripts; |
73 | 93 |
|
74 |
| - checks.x86_64-linux.default = self.packages.default.x86_64-linux; |
| 94 | + checks.x86_64-linux.default = self.packages.x86_64-linux.default; |
75 | 95 | };
|
76 | 96 | }
|
0 commit comments