2019-12-30 20:34:49 +00:00
|
|
|
{
|
|
|
|
description = "Script for generating Nixpkgs/NixOS channels";
|
|
|
|
|
2020-04-09 15:27:29 +00:00
|
|
|
inputs.nixpkgs.url = "nixpkgs/nixos-20.03";
|
2019-12-30 20:34:49 +00:00
|
|
|
|
2019-12-30 20:51:21 +00:00
|
|
|
outputs = { self, nixpkgs, nix }:
|
2019-12-30 20:34:49 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
overlay = final: prev: {
|
|
|
|
|
2020-03-24 20:45:01 +00:00
|
|
|
nixos-channel-native-programs = with final; stdenv.mkDerivation {
|
|
|
|
name = "nixos-channel-native-programs";
|
|
|
|
buildInputs = [
|
2019-12-30 20:51:21 +00:00
|
|
|
final.nix
|
2020-03-24 20:45:01 +00:00
|
|
|
pkgconfig
|
2019-12-30 20:51:21 +00:00
|
|
|
boehmgc
|
|
|
|
nlohmann_json
|
|
|
|
boost
|
2020-03-24 20:45:01 +00:00
|
|
|
sqlite
|
|
|
|
];
|
2019-12-30 20:34:49 +00:00
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
|
|
|
cp ${./file-cache.hh} file-cache.hh
|
|
|
|
|
|
|
|
g++ -Os -g ${./generate-programs-index.cc} -Wall -std=c++14 -o $out/bin/generate-programs-index -I . \
|
|
|
|
$(pkg-config --cflags nix-main) \
|
|
|
|
$(pkg-config --libs nix-main) \
|
|
|
|
$(pkg-config --libs nix-expr) \
|
|
|
|
$(pkg-config --libs nix-store) \
|
2020-07-08 11:25:30 +00:00
|
|
|
-lsqlite3 -lgc
|
2019-12-30 20:34:49 +00:00
|
|
|
|
|
|
|
g++ -Os -g ${./index-debuginfo.cc} -Wall -std=c++14 -o $out/bin/index-debuginfo -I . \
|
|
|
|
$(pkg-config --cflags nix-main) \
|
|
|
|
$(pkg-config --libs nix-main) \
|
|
|
|
$(pkg-config --libs nix-store) \
|
2020-07-08 11:25:30 +00:00
|
|
|
-lsqlite3
|
2020-03-24 20:45:01 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
nixos-channel-scripts = with final; stdenv.mkDerivation {
|
|
|
|
name = "nixos-channel-scripts";
|
|
|
|
|
|
|
|
buildInputs = with final.perlPackages;
|
|
|
|
[ final.nix
|
|
|
|
sqlite
|
|
|
|
makeWrapper
|
|
|
|
perl
|
|
|
|
FileSlurp
|
|
|
|
LWP
|
|
|
|
LWPProtocolHttps
|
|
|
|
ListMoreUtils
|
|
|
|
DBDSQLite
|
|
|
|
NetAmazonS3
|
|
|
|
brotli
|
|
|
|
jq
|
|
|
|
nixos-channel-native-programs
|
|
|
|
];
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/bin
|
2019-12-30 20:34:49 +00:00
|
|
|
|
|
|
|
cp ${./mirror-nixos-branch.pl} $out/bin/mirror-nixos-branch
|
2020-03-24 20:45:01 +00:00
|
|
|
wrapProgram $out/bin/mirror-nixos-branch \
|
|
|
|
--set PERL5LIB $PERL5LIB \
|
2020-03-26 07:24:46 +00:00
|
|
|
--prefix PATH : ${wget}/bin:${git}/bin:${final.nix}/bin:${gnutar}/bin:${xz}/bin:${rsync}/bin:${openssh}/bin:${nixos-channel-native-programs}/bin:$out/bin
|
2019-12-30 20:34:49 +00:00
|
|
|
|
|
|
|
patchShebangs $out/bin
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
defaultPackage.x86_64-linux = (import nixpkgs {
|
|
|
|
system = "x86_64-linux";
|
2019-12-30 20:51:21 +00:00
|
|
|
overlays = [ nix.overlay self.overlay ];
|
2019-12-30 20:34:49 +00:00
|
|
|
}).nixos-channel-scripts;
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|