|  | 
| 7 | 7 |     { self, nixpkgs }: | 
| 8 | 8 |     { | 
| 9 | 9 |       overlays.default = final: prev: { | 
| 10 |  | -        nixos-channel-native-programs = | 
| 11 |  | -          with final; | 
| 12 |  | -          stdenv.mkDerivation { | 
| 13 |  | -            name = "nixos-channel-native-programs"; | 
| 14 |  | -            buildInputs = [ | 
| 15 |  | -              nix | 
| 16 |  | -              pkg-config | 
| 17 |  | -              boehmgc | 
| 18 |  | -              nlohmann_json | 
| 19 |  | -              boost | 
| 20 |  | -              sqlite | 
| 21 |  | -            ]; | 
| 22 |  | - | 
| 23 |  | -            buildCommand = | 
| 24 |  | -              let | 
| 25 |  | -                nixHasSignalsHh = nixpkgs.lib.strings.versionAtLeast nix.version "2.19"; | 
| 26 |  | -              in | 
| 27 |  | -              '' | 
| 28 |  | -                mkdir -p $out/bin | 
| 29 |  | -
 | 
| 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 |  | -          }; | 
| 38 |  | - | 
| 39 |  | -        nixos-channel-scripts = | 
| 40 |  | -          with final; | 
| 41 |  | -          stdenv.mkDerivation { | 
| 42 |  | -            name = "nixos-channel-scripts"; | 
| 43 |  | - | 
| 44 |  | -            buildInputs = with perlPackages; [ | 
| 45 |  | -              nix | 
| 46 |  | -              sqlite | 
| 47 |  | -              makeWrapper | 
| 48 |  | -              perl | 
| 49 |  | -              FileSlurp | 
| 50 |  | -              LWP | 
| 51 |  | -              LWPProtocolHttps | 
| 52 |  | -              ListMoreUtils | 
| 53 |  | -              DBDSQLite | 
| 54 |  | -              NetAmazonS3 | 
| 55 |  | -              brotli | 
| 56 |  | -              jq | 
| 57 |  | -              nixos-channel-native-programs | 
| 58 |  | -              nix-index | 
| 59 |  | -            ]; | 
| 60 |  | - | 
| 61 |  | -            buildCommand = '' | 
| 62 |  | -              mkdir -p $out/bin | 
| 63 |  | -
 | 
| 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 [ | 
|  | 10 | +        nixos-channel-native-programs = final.stdenv.mkDerivation { | 
|  | 11 | +          name = "nixos-channel-native-programs"; | 
|  | 12 | + | 
|  | 13 | +          strictDeps = true; | 
|  | 14 | + | 
|  | 15 | +          nativeBuildInputs = with final.buildPackages; [ | 
|  | 16 | +            pkg-config | 
|  | 17 | +          ]; | 
|  | 18 | + | 
|  | 19 | +          buildInputs = with final; [ | 
|  | 20 | +            nixVersions.nix_2_28 | 
|  | 21 | +            nlohmann_json | 
|  | 22 | +            boost | 
|  | 23 | +          ]; | 
|  | 24 | + | 
|  | 25 | +          buildCommand = '' | 
|  | 26 | +            mkdir -p $out/bin | 
|  | 27 | +
 | 
|  | 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 | 
|  | 36 | +          ''; | 
|  | 37 | +        }; | 
|  | 38 | + | 
|  | 39 | +        nixos-channel-scripts = final.stdenv.mkDerivation { | 
|  | 40 | +          name = "nixos-channel-scripts"; | 
|  | 41 | + | 
|  | 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 | +          ]; | 
|  | 57 | + | 
|  | 58 | +          buildCommand = '' | 
|  | 59 | +            mkdir -p $out/bin | 
|  | 60 | +
 | 
|  | 61 | +            cp ${./mirror-nixos-branch.pl} $out/bin/mirror-nixos-branch | 
|  | 62 | +            wrapProgram $out/bin/mirror-nixos-branch \ | 
|  | 63 | +              --set PERL5LIB $PERL5LIB \ | 
|  | 64 | +              --set XZ_OPT "-T0" \ | 
|  | 65 | +              --prefix PATH : ${ | 
|  | 66 | +                final.lib.makeBinPath ( | 
|  | 67 | +                  with final; | 
|  | 68 | +                  [ | 
| 70 | 69 |                     wget | 
| 71 | 70 |                     git | 
| 72 | 71 |                     nix | 
|  | 
| 77 | 76 |                     nix-index | 
| 78 | 77 |                     nixos-channel-native-programs | 
| 79 | 78 |                   ] | 
| 80 |  | -                } | 
|  | 79 | +                ) | 
|  | 80 | +              } | 
| 81 | 81 | 
 | 
| 82 |  | -              patchShebangs $out/bin | 
| 83 |  | -            ''; | 
| 84 |  | -          }; | 
|  | 82 | +            patchShebangs $out/bin | 
|  | 83 | +          ''; | 
|  | 84 | +        }; | 
| 85 | 85 | 
 | 
| 86 | 86 |       }; | 
| 87 | 87 | 
 | 
| 88 |  | -      packages.default.x86_64-linux = | 
|  | 88 | +      packages.x86_64-linux.default = | 
| 89 | 89 |         (import nixpkgs { | 
| 90 | 90 |           system = "x86_64-linux"; | 
| 91 | 91 |           overlays = [ self.overlays.default ]; | 
| 92 | 92 |         }).nixos-channel-scripts; | 
| 93 | 93 | 
 | 
| 94 |  | -      checks.x86_64-linux.default = self.packages.default.x86_64-linux; | 
|  | 94 | +      checks.x86_64-linux.default = self.packages.x86_64-linux.default; | 
| 95 | 95 |     }; | 
| 96 | 96 | } | 
0 commit comments