2 , coreutils, findutils, nix, xz, bzip2, gnused, gnugrep, openssl
3 , lighttpd, iproute2 }:
4 stdenv.mkDerivation rec {
5 version = "2014-06-29-1";
6 pname = "nix-binary-cache";
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@ "${iproute2}/sbin" \
25 --replace "xXxXx" "xXxXx"
27 chmod a+x "$out/bin/nix-binary-cache.cgi"
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@ "${iproute2}/sbin" \
42 --replace "xXxXx" "xXxXx"
44 chmod a+x "$out/bin/nix-binary-cache-start"
48 description = "A set of scripts to serve the Nix store as a binary cache";
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.
55 maintainers = [lib.maintainers.raskin];
56 license = lib.licenses.gpl2Plus;
57 platforms = lib.platforms.all;