1{ stdenv, fetchurl, openssl, coreutils }:
2
3stdenv.mkDerivation rec {
4 name = "spiped-${version}";
5 version = "1.5.0";
6
7 src = fetchurl {
8 url = "http://www.tarsnap.com/spiped/${name}.tgz";
9 sha256 = "1mxcbxifr3bnj6ga8lz88y4bhff016i6kjdzwbb3gzb2zcs4pxxj";
10 };
11
12 buildInputs = [ openssl ];
13
14 patchPhase = ''
15 substituteInPlace libcperciva/cpusupport/Build/cpusupport.sh \
16 --replace "2>/dev/null" "2>stderr.log"
17
18 substituteInPlace POSIX/posix-l.sh \
19 --replace "rm" "${coreutils}/bin/rm" \
20 --replace ">/dev/stderr" ">stderr.log" \
21 --replace "2>/dev/null" "2>stderr.log"
22
23 substituteInPlace POSIX/posix-cflags.sh \
24 --replace "rm" "${coreutils}/bin/rm" \
25 --replace ">/dev/stderr" ">stderr.log" \
26 --replace "2>/dev/null" "2>stderr.log"
27 '';
28
29 installPhase = ''
30 mkdir -p $out/bin $out/share/man/man1
31 make install BINDIR=$out/bin MAN1DIR=$out/share/man/man1
32 '';
33
34 meta = {
35 description = "utility for secure encrypted channels between sockets";
36 homepage = "https://www.tarsnap.com/spiped.html";
37 license = stdenv.lib.licenses.bsd2;
38 platforms = stdenv.lib.platforms.unix;
39 maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
40 };
41}