|
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 |
| - name = "nixos-channel-native-programs"; |
11 |
| - buildInputs = [ |
| 10 | + nixos-channel-native-programs = |
| 11 | + with final; |
| 12 | + stdenv.mkDerivation { |
| 13 | + name = "nixos-channel-native-programs"; |
| 14 | + buildInputs = [ |
12 | 15 | nix
|
13 | 16 | pkg-config
|
14 | 17 | boehmgc
|
15 | 18 | nlohmann_json
|
16 | 19 | boost
|
17 | 20 | sqlite
|
18 |
| - ]; |
| 21 | + ]; |
19 | 22 |
|
20 |
| - buildCommand = let |
21 |
| - nixHasSignalsHh = nixpkgs.lib.strings.versionAtLeast nix.version "2.19"; |
22 |
| - in '' |
23 |
| - mkdir -p $out/bin |
| 23 | + buildCommand = |
| 24 | + let |
| 25 | + nixHasSignalsHh = nixpkgs.lib.strings.versionAtLeast nix.version "2.19"; |
| 26 | + in |
| 27 | + '' |
| 28 | + mkdir -p $out/bin |
24 | 29 |
|
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"} |
31 |
| - ''; |
32 |
| - }; |
| 30 | + g++ -Os -g ${./index-debuginfo.cc} -Wall -std=c++14 -o $out/bin/index-debuginfo -I . \ |
| 31 | + $(pkg-config --cflags nix-main) \ |
| 32 | + $(pkg-config --libs nix-main) \ |
| 33 | + $(pkg-config --libs nix-store) \ |
| 34 | + -lsqlite3 \ |
| 35 | + ${nixpkgs.lib.optionalString nixHasSignalsHh "-DHAS_SIGNALS_HH"} |
| 36 | + ''; |
| 37 | + }; |
33 | 38 |
|
34 |
| - nixos-channel-scripts = with final; stdenv.mkDerivation { |
35 |
| - name = "nixos-channel-scripts"; |
| 39 | + nixos-channel-scripts = |
| 40 | + with final; |
| 41 | + stdenv.mkDerivation { |
| 42 | + name = "nixos-channel-scripts"; |
36 | 43 |
|
37 |
| - buildInputs = with perlPackages; |
38 |
| - [ nix |
| 44 | + buildInputs = with perlPackages; [ |
| 45 | + nix |
39 | 46 | sqlite
|
40 | 47 | makeWrapper
|
41 | 48 | perl
|
|
51 | 58 | nix-index
|
52 | 59 | ];
|
53 | 60 |
|
54 |
| - buildCommand = '' |
55 |
| - mkdir -p $out/bin |
| 61 | + buildCommand = '' |
| 62 | + mkdir -p $out/bin |
56 | 63 |
|
57 |
| - cp ${./mirror-nixos-branch.pl} $out/bin/mirror-nixos-branch |
58 |
| - wrapProgram $out/bin/mirror-nixos-branch \ |
59 |
| - --set PERL5LIB $PERL5LIB \ |
60 |
| - --set XZ_OPT "-T0" \ |
61 |
| - --prefix PATH : ${lib.makeBinPath [ wget git nix gnutar xz rsync openssh nix-index nixos-channel-native-programs ]} |
| 64 | + cp ${./mirror-nixos-branch.pl} $out/bin/mirror-nixos-branch |
| 65 | + wrapProgram $out/bin/mirror-nixos-branch \ |
| 66 | + --set PERL5LIB $PERL5LIB \ |
| 67 | + --set XZ_OPT "-T0" \ |
| 68 | + --prefix PATH : ${ |
| 69 | + lib.makeBinPath [ |
| 70 | + wget |
| 71 | + git |
| 72 | + nix |
| 73 | + gnutar |
| 74 | + xz |
| 75 | + rsync |
| 76 | + openssh |
| 77 | + nix-index |
| 78 | + nixos-channel-native-programs |
| 79 | + ] |
| 80 | + } |
62 | 81 |
|
63 |
| - patchShebangs $out/bin |
64 |
| - ''; |
65 |
| - }; |
| 82 | + patchShebangs $out/bin |
| 83 | + ''; |
| 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.default.x86_64-linux = |
| 89 | + (import nixpkgs { |
| 90 | + system = "x86_64-linux"; |
| 91 | + overlays = [ self.overlays.default ]; |
| 92 | + }).nixos-channel-scripts; |
73 | 93 |
|
74 | 94 | checks.x86_64-linux.default = self.packages.default.x86_64-linux;
|
75 | 95 | };
|
|
0 commit comments