2018-07-21 00:44:44 +00:00
|
|
|
{stdenv
|
2014-06-29 20:39:54 +00:00
|
|
|
, coreutils, findutils, nix, xz, bzip2, gnused, gnugrep, openssl
|
|
|
|
, lighttpd, iproute }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "2014-06-29-1";
|
|
|
|
name = "nix-binary-cache-${version}";
|
|
|
|
|
|
|
|
phases = ["installPhase"];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
substitute "${./nix-binary-cache.cgi.in}" "$out"/bin/nix-binary-cache.cgi \
|
|
|
|
--replace @out@ "$out/bin" \
|
|
|
|
--replace @shell@ "${stdenv.shell}" \
|
|
|
|
--replace @coreutils@ "${coreutils}/bin" \
|
|
|
|
--replace @findutils@ "${findutils}/bin" \
|
2016-04-21 22:54:31 +00:00
|
|
|
--replace @nix@ "${nix.out}/bin" \
|
2016-02-01 18:46:28 +00:00
|
|
|
--replace @xz@ "${xz.bin}/bin" \
|
2016-02-01 18:45:57 +00:00
|
|
|
--replace @bzip2@ "${bzip2.bin}/bin" \
|
2014-06-29 20:39:54 +00:00
|
|
|
--replace @gnused@ "${gnused}/bin" \
|
|
|
|
--replace @gnugrep@ "${gnugrep}/bin" \
|
2016-02-01 18:46:16 +00:00
|
|
|
--replace @openssl@ "${openssl.bin}/bin" \
|
2014-06-29 20:39:54 +00:00
|
|
|
--replace @lighttpd@ "${lighttpd}/sbin" \
|
|
|
|
--replace @iproute@ "${iproute}/sbin" \
|
|
|
|
--replace "xXxXx" "xXxXx"
|
|
|
|
|
|
|
|
chmod a+x "$out/bin/nix-binary-cache.cgi"
|
|
|
|
|
|
|
|
substitute "${./nix-binary-cache-start.in}" "$out"/bin/nix-binary-cache-start \
|
|
|
|
--replace @out@ "$out/bin" \
|
|
|
|
--replace @shell@ "${stdenv.shell}" \
|
|
|
|
--replace @coreutils@ "${coreutils}/bin" \
|
|
|
|
--replace @findutils@ "${findutils}/bin" \
|
2016-04-21 22:54:31 +00:00
|
|
|
--replace @nix@ "${nix.out}/bin" \
|
2016-02-01 18:46:28 +00:00
|
|
|
--replace @xz@ "${xz.bin}/bin" \
|
2016-02-01 18:45:57 +00:00
|
|
|
--replace @bzip2@ "${bzip2.bin}/bin" \
|
2014-06-29 20:39:54 +00:00
|
|
|
--replace @gnused@ "${gnused}/bin" \
|
|
|
|
--replace @gnugrep@ "${gnugrep}/bin" \
|
2016-02-01 18:46:16 +00:00
|
|
|
--replace @openssl@ "${openssl.bin}/bin" \
|
2014-06-29 20:39:54 +00:00
|
|
|
--replace @lighttpd@ "${lighttpd}/sbin" \
|
|
|
|
--replace @iproute@ "${iproute}/sbin" \
|
|
|
|
--replace "xXxXx" "xXxXx"
|
|
|
|
|
|
|
|
chmod a+x "$out/bin/nix-binary-cache-start"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = ''A set of scripts to serve the Nix store as a binary cache'';
|
|
|
|
longDescription = ''
|
|
|
|
This package installs a CGI script that serves Nix store path in the
|
|
|
|
binary cache format. It also installs a launcher called
|
|
|
|
nix-binary-cache-start that can be run without any setup to launch
|
|
|
|
a binary cache and get the example arguments for its usage.
|
|
|
|
'';
|
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
|
|
|
inherit version;
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
hydraPlatforms = [];
|
|
|
|
};
|
|
|
|
}
|