about summary refs log tree commit diff
path: root/pkgs/tools/networking/spiped/default.nix
blob: ac2736ffb19e191224c2e66090ea71140678bf86 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, fetchurl, openssl, coreutils }:

stdenv.mkDerivation rec {
  name    = "spiped-${version}";
  version = "1.3.1";

  src = fetchurl {
    url    = "http://www.tarsnap.com/spiped/${name}.tgz";
    sha256 = "1viglk61v1v2ga1n31r0h8rvib5gy2h02lhhbbnqh2s6ps1sjn4a";
  };

  buildInputs = [ openssl ];
  patches = [ ./no-dev-stderr.patch ];

  postPatch = ''
    substituteInPlace POSIX/posix-l.sh --replace "rm" "${coreutils}/bin/rm"
  '';

  installPhase = ''
    mkdir -p $out/bin $out/share/man/man1
    make install BINDIR=$out/bin MAN1DIR=$out/share/man/man1
  '';

  meta = {
    description = "utility for secure encrypted channels between sockets";
    homepage    = "https://www.tarsnap.com/spiped.html";
    license     = stdenv.lib.licenses.bsd2;
    platforms   = stdenv.lib.platforms.unix;
    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
  };
}