nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 19.03 61 lines 2.3 kB view raw
1{stdenv 2, coreutils, findutils, nix, xz, bzip2, gnused, gnugrep, openssl 3, lighttpd, iproute }: 4stdenv.mkDerivation rec { 5 version = "2014-06-29-1"; 6 name = "nix-binary-cache-${version}"; 7 8 phases = ["installPhase"]; 9 10 installPhase = '' 11 mkdir -p "$out/bin" 12 substitute "${./nix-binary-cache.cgi.in}" "$out"/bin/nix-binary-cache.cgi \ 13 --replace @out@ "$out/bin" \ 14 --replace @shell@ "${stdenv.shell}" \ 15 --replace @coreutils@ "${coreutils}/bin" \ 16 --replace @findutils@ "${findutils}/bin" \ 17 --replace @nix@ "${nix.out}/bin" \ 18 --replace @xz@ "${xz.bin}/bin" \ 19 --replace @bzip2@ "${bzip2.bin}/bin" \ 20 --replace @gnused@ "${gnused}/bin" \ 21 --replace @gnugrep@ "${gnugrep}/bin" \ 22 --replace @openssl@ "${openssl.bin}/bin" \ 23 --replace @lighttpd@ "${lighttpd}/sbin" \ 24 --replace @iproute@ "${iproute}/sbin" \ 25 --replace "xXxXx" "xXxXx" 26 27 chmod a+x "$out/bin/nix-binary-cache.cgi" 28 29 substitute "${./nix-binary-cache-start.in}" "$out"/bin/nix-binary-cache-start \ 30 --replace @out@ "$out/bin" \ 31 --replace @shell@ "${stdenv.shell}" \ 32 --replace @coreutils@ "${coreutils}/bin" \ 33 --replace @findutils@ "${findutils}/bin" \ 34 --replace @nix@ "${nix.out}/bin" \ 35 --replace @xz@ "${xz.bin}/bin" \ 36 --replace @bzip2@ "${bzip2.bin}/bin" \ 37 --replace @gnused@ "${gnused}/bin" \ 38 --replace @gnugrep@ "${gnugrep}/bin" \ 39 --replace @openssl@ "${openssl.bin}/bin" \ 40 --replace @lighttpd@ "${lighttpd}/sbin" \ 41 --replace @iproute@ "${iproute}/sbin" \ 42 --replace "xXxXx" "xXxXx" 43 44 chmod a+x "$out/bin/nix-binary-cache-start" 45 ''; 46 47 meta = { 48 description = ''A set of scripts to serve the Nix store as a binary cache''; 49 longDescription = '' 50 This package installs a CGI script that serves Nix store path in the 51 binary cache format. It also installs a launcher called 52 nix-binary-cache-start that can be run without any setup to launch 53 a binary cache and get the example arguments for its usage. 54 ''; 55 maintainers = [stdenv.lib.maintainers.raskin]; 56 license = stdenv.lib.licenses.gpl2Plus; 57 inherit version; 58 platforms = stdenv.lib.platforms.all; 59 hydraPlatforms = []; 60 }; 61}