2021-01-15 08:07:56 +01:00
|
|
|
{lib, stdenv
|
2014-06-29 22:39:54 +02:00
|
|
|
, coreutils, findutils, nix, xz, bzip2, gnused, gnugrep, openssl
|
2021-03-14 17:05:16 +01:00
|
|
|
, lighttpd, iproute2 }:
|
2014-06-29 22:39:54 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "2014-06-29-1";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "nix-binary-cache";
|
2014-06-29 22:39:54 +02:00
|
|
|
|
2021-07-22 18:16:35 +02:00
|
|
|
dontUnpack = true;
|
2014-06-29 22:39:54 +02:00
|
|
|
|
|
|
|
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-22 00:54:31 +02:00
|
|
|
--replace @nix@ "${nix.out}/bin" \
|
2016-02-01 19:46:28 +01:00
|
|
|
--replace @xz@ "${xz.bin}/bin" \
|
2016-02-01 19:45:57 +01:00
|
|
|
--replace @bzip2@ "${bzip2.bin}/bin" \
|
2014-06-29 22:39:54 +02:00
|
|
|
--replace @gnused@ "${gnused}/bin" \
|
|
|
|
--replace @gnugrep@ "${gnugrep}/bin" \
|
2016-02-01 19:46:16 +01:00
|
|
|
--replace @openssl@ "${openssl.bin}/bin" \
|
2014-06-29 22:39:54 +02:00
|
|
|
--replace @lighttpd@ "${lighttpd}/sbin" \
|
2021-03-14 17:05:16 +01:00
|
|
|
--replace @iproute@ "${iproute2}/sbin" \
|
2014-06-29 22:39:54 +02:00
|
|
|
--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-22 00:54:31 +02:00
|
|
|
--replace @nix@ "${nix.out}/bin" \
|
2016-02-01 19:46:28 +01:00
|
|
|
--replace @xz@ "${xz.bin}/bin" \
|
2016-02-01 19:45:57 +01:00
|
|
|
--replace @bzip2@ "${bzip2.bin}/bin" \
|
2014-06-29 22:39:54 +02:00
|
|
|
--replace @gnused@ "${gnused}/bin" \
|
|
|
|
--replace @gnugrep@ "${gnugrep}/bin" \
|
2016-02-01 19:46:16 +01:00
|
|
|
--replace @openssl@ "${openssl.bin}/bin" \
|
2014-06-29 22:39:54 +02:00
|
|
|
--replace @lighttpd@ "${lighttpd}/sbin" \
|
2021-03-14 17:05:16 +01:00
|
|
|
--replace @iproute@ "${iproute2}/sbin" \
|
2014-06-29 22:39:54 +02:00
|
|
|
--replace "xXxXx" "xXxXx"
|
|
|
|
|
|
|
|
chmod a+x "$out/bin/nix-binary-cache-start"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2021-01-16 05:20:42 +01:00
|
|
|
description = "A set of scripts to serve the Nix store as a binary cache";
|
2014-06-29 22:39:54 +02:00
|
|
|
longDescription = ''
|
2021-01-15 08:07:56 +01:00
|
|
|
This package installs a CGI script that serves Nix store path in the
|
|
|
|
binary cache format. It also installs a launcher called
|
2014-06-29 22:39:54 +02:00
|
|
|
nix-binary-cache-start that can be run without any setup to launch
|
|
|
|
a binary cache and get the example arguments for its usage.
|
|
|
|
'';
|
2021-01-15 08:07:56 +01:00
|
|
|
maintainers = [lib.maintainers.raskin];
|
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
platforms = lib.platforms.all;
|
2014-06-29 22:39:54 +02:00
|
|
|
hydraPlatforms = [];
|
|
|
|
};
|
|
|
|
}
|