2018-09-06 15:09:48 +02:00
|
|
|
{ stdenv, fetchurl, makeWrapper
|
2018-09-07 12:22:56 +02:00
|
|
|
, perl, libassuan, libgcrypt
|
|
|
|
, perlPackages, lockfileProgs, gnupg
|
2018-09-06 15:09:48 +02:00
|
|
|
}:
|
2015-08-01 11:03:40 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "monkeysphere-${version}";
|
2018-09-06 15:09:48 +02:00
|
|
|
version = "0.41";
|
2015-08-01 11:03:40 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-09-06 15:09:48 +02:00
|
|
|
url = "http://archive.monkeysphere.info/debian/pool/monkeysphere/m/monkeysphere/monkeysphere_${version}.orig.tar.gz";
|
|
|
|
sha256 = "0jz7kwkwgylqprnl8bwvl084s5gjrilza77ln18i3f6x48b2y6li";
|
2015-08-01 11:03:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./monkeysphere.patch ];
|
|
|
|
|
2018-09-07 12:22:56 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ perl libassuan libgcrypt ];
|
|
|
|
|
2015-08-01 11:03:40 +02:00
|
|
|
makeFlags = ''
|
|
|
|
PREFIX=/
|
|
|
|
DESTDIR=$(out)
|
|
|
|
'';
|
|
|
|
|
2018-09-07 12:22:56 +02:00
|
|
|
postFixup =
|
2018-09-07 13:07:10 +02:00
|
|
|
let wrapperArgs = runtimeDeps:
|
|
|
|
"--prefix PERL5LIB : "
|
|
|
|
+ (with perlPackages; stdenv.lib.makePerlPath [
|
|
|
|
CryptOpenSSLRSA
|
|
|
|
CryptOpenSSLBignum
|
|
|
|
])
|
|
|
|
+ stdenv.lib.optionalString
|
|
|
|
(builtins.length runtimeDeps > 0)
|
|
|
|
" --prefix PATH : ${stdenv.lib.makeBinPath runtimeDeps}";
|
|
|
|
wrapMonkeysphere = runtimeDeps: program:
|
|
|
|
"wrapProgram $out/bin/${program} ${wrapperArgs runtimeDeps}\n";
|
2018-09-07 12:22:56 +02:00
|
|
|
wrapPrograms = runtimeDeps: programs: stdenv.lib.concatMapStrings
|
|
|
|
(wrapMonkeysphere runtimeDeps)
|
|
|
|
programs;
|
|
|
|
in wrapPrograms [ gnupg ] [ "monkeysphere-authentication" "monkeysphere-host" ]
|
2018-09-07 13:07:10 +02:00
|
|
|
+ wrapPrograms [ lockfileProgs ] [ "monkeysphere" ]
|
|
|
|
+ ''
|
|
|
|
# These 4 programs depend on the program name ($0):
|
|
|
|
for program in openpgp2pem openpgp2spki openpgp2ssh pem2openpgp; do
|
|
|
|
rm $out/bin/$program
|
|
|
|
ln -sf keytrans $out/share/monkeysphere/$program
|
|
|
|
makeWrapper $out/share/monkeysphere/$program $out/bin/$program \
|
|
|
|
${wrapperArgs [ ]}
|
|
|
|
done
|
|
|
|
'';
|
2015-08-01 11:03:40 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://web.monkeysphere.info/;
|
2015-08-01 12:28:41 +02:00
|
|
|
description = "Leverage the OpenPGP web of trust for SSH and TLS authentication";
|
|
|
|
longDescription = ''
|
2015-08-01 11:03:40 +02:00
|
|
|
The Monkeysphere project's goal is to extend OpenPGP's web of
|
|
|
|
trust to new areas of the Internet to help us securely identify
|
|
|
|
servers we connect to, as well as each other while we work online.
|
|
|
|
The suite of Monkeysphere utilities provides a framework to
|
|
|
|
transparently leverage the web of trust for authentication of
|
|
|
|
TLS/SSL communications through the normal use of tools you are
|
|
|
|
familiar with, such as your web browser0 or secure shell.
|
|
|
|
'';
|
2018-09-06 15:09:48 +02:00
|
|
|
license = licenses.gpl3Plus;
|
2015-08-01 11:03:40 +02:00
|
|
|
platforms = platforms.all;
|
2018-09-06 15:09:48 +02:00
|
|
|
maintainers = with maintainers; [ primeos ];
|
2015-08-01 11:03:40 +02:00
|
|
|
};
|
|
|
|
}
|