2016-10-30 12:15:26 +01:00
|
|
|
{ stdenv, fetchzip, autoconf, automake, openssl, libxml2, fetchFromGitHub, ncurses }:
|
2015-09-30 02:56:32 +02:00
|
|
|
|
|
|
|
let
|
2016-10-30 12:15:26 +01:00
|
|
|
scrypt_src = fetchzip {
|
|
|
|
url = "http://www.tarsnap.com/scrypt/scrypt-1.2.0.tgz";
|
|
|
|
sha256 = "0ahylib2pimlhjcm566kpim6n16jci5v749xwdkr9ivgfjrv3xn4";
|
2015-09-30 02:56:32 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
2016-10-30 12:15:26 +01:00
|
|
|
name = "mpw-2.1-6834f36";
|
2015-09-30 02:56:32 +02:00
|
|
|
|
2016-10-30 12:15:26 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Lyndir";
|
|
|
|
repo = "MasterPassword";
|
|
|
|
rev = "6834f3689f5dfd4e59ad6959961d349c224977ee";
|
|
|
|
sha256 = "0zlpx3hb1y2l60hg961h05lb9yf3xb5phnyycvazah2674gkwb2p";
|
|
|
|
};
|
2015-09-30 02:56:32 +02:00
|
|
|
|
|
|
|
postUnpack = ''
|
2016-10-30 12:15:26 +01:00
|
|
|
sourceRoot+=/MasterPassword/C
|
2015-09-30 02:56:32 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
patchShebangs .
|
2016-10-30 12:15:26 +01:00
|
|
|
mkdir lib/scrypt/src
|
|
|
|
cp -R --no-preserve=ownership ${scrypt_src}/* lib/scrypt/src
|
|
|
|
chmod +w -R lib/scrypt/src
|
|
|
|
substituteInPlace lib/scrypt/src/libcperciva/cpusupport/Build/cpusupport.sh \
|
|
|
|
--replace dirname "$(type -P dirname)"
|
|
|
|
substituteInPlace lib/scrypt/src/Makefile.in --replace "command -p mv" "mv"
|
2015-09-30 02:56:32 +02:00
|
|
|
'';
|
|
|
|
|
2015-10-05 13:23:01 +02:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
|
2015-09-30 02:56:32 +02:00
|
|
|
|
2016-10-30 12:15:26 +01:00
|
|
|
buildInputs = [ autoconf automake openssl libxml2 ncurses ];
|
2015-09-30 02:56:32 +02:00
|
|
|
|
|
|
|
buildPhase = ''
|
2016-10-30 12:15:26 +01:00
|
|
|
substituteInPlace build --replace '"curses"' '"ncurses"'
|
2015-09-30 02:56:32 +02:00
|
|
|
targets="mpw mpw-tests" ./build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mv mpw $out/bin/mpw
|
|
|
|
'';
|
2016-08-02 18:06:29 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
2015-09-30 02:56:32 +02:00
|
|
|
}
|