2024-10-23 06:41:50 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
openssl,
|
|
|
|
coreutils,
|
|
|
|
nixosTests,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "spiped";
|
2022-01-03 16:56:52 +00:00
|
|
|
version = "1.6.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-10-23 06:41:50 +00:00
|
|
|
url = "https://www.tarsnap.com/spiped/spiped-${version}.tgz";
|
|
|
|
hash = "sha256-BdRofRLRHX+YiNQ/PYDFQbdyHJhwONCF9xyRuwYgRWc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace libcperciva/cpusupport/Build/cpusupport.sh \
|
2021-06-28 23:13:55 +00:00
|
|
|
--replace "dirname" "${coreutils}/bin/dirname" \
|
2020-04-24 23:36:52 +00:00
|
|
|
--replace "2>/dev/null" "2>stderr.log"
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
substituteInPlace libcperciva/POSIX/posix-l.sh \
|
2020-04-24 23:36:52 +00:00
|
|
|
--replace "rm" "${coreutils}/bin/rm" \
|
|
|
|
--replace "2>/dev/null" "2>stderr.log"
|
2024-10-23 06:41:50 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-06-28 23:13:55 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/bin $out/share/man/man1
|
|
|
|
make install BINDIR=$out/bin MAN1DIR=$out/share/man/man1
|
2021-06-28 23:13:55 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-10-23 06:41:50 +00:00
|
|
|
passthru.tests.spiped = nixosTests.spiped;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Utility for secure encrypted channels between sockets";
|
2024-10-23 06:41:50 +00:00
|
|
|
homepage = "https://www.tarsnap.com/spiped.html";
|
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
platforms = lib.platforms.unix;
|
2021-01-15 22:18:51 +00:00
|
|
|
maintainers = [ lib.maintainers.thoughtpolice ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|