2016-08-11 12:41:26 +00:00
|
|
|
{ pkgs ? import <nixpkgs> {} }:
|
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "nixos-channel-scripts";
|
|
|
|
|
|
|
|
buildInputs = with perlPackages;
|
2019-01-24 18:06:58 +00:00
|
|
|
[ pkgconfig nix sqlite makeWrapper perl FileSlurp LWP LWPProtocolHttps ListMoreUtils DBDSQLite NetAmazonS3 boehmgc nlohmann_json boost ];
|
2016-08-11 12:41:26 +00:00
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
2017-07-06 12:53:52 +00:00
|
|
|
cp ${./file-cache.hh} file-cache.hh
|
|
|
|
|
2017-07-07 14:45:45 +00:00
|
|
|
g++ -Os -g ${./generate-programs-index.cc} -Wall -std=c++14 -o $out/bin/generate-programs-index -I . \
|
2017-04-18 13:26:38 +00:00
|
|
|
$(pkg-config --cflags nix-main) \
|
|
|
|
$(pkg-config --libs nix-main) \
|
|
|
|
$(pkg-config --libs nix-expr) \
|
|
|
|
$(pkg-config --libs nix-store) \
|
|
|
|
-lsqlite3 -lgc
|
2016-08-11 12:41:26 +00:00
|
|
|
|
2017-07-07 14:45:45 +00:00
|
|
|
g++ -Os -g ${./index-debuginfo.cc} -Wall -std=c++14 -o $out/bin/index-debuginfo -I . \
|
2017-07-07 13:23:29 +00:00
|
|
|
$(pkg-config --cflags nix-main) \
|
|
|
|
$(pkg-config --libs nix-main) \
|
|
|
|
$(pkg-config --libs nix-store) \
|
|
|
|
-lsqlite3
|
|
|
|
|
2016-08-11 12:41:26 +00:00
|
|
|
cp ${./mirror-nixos-branch.pl} $out/bin/mirror-nixos-branch
|
2019-01-24 22:25:12 +00:00
|
|
|
wrapProgram $out/bin/mirror-nixos-branch --set PERL5LIB $PERL5LIB --prefix PATH : ${wget}/bin:${git}/bin:${nix}/bin:${gnutar}/bin:${xz}/bin:${rsync}/bin:${openssh}/bin:$out/bin
|
2016-09-26 16:06:51 +00:00
|
|
|
|
|
|
|
patchShebangs $out/bin
|
2016-08-11 12:41:26 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
}
|