commit
9356b8823a
@ -1,50 +1,39 @@
|
|||||||
{ stdenv, fetchzip, autoconf, automake, openssl, libxml2, fetchFromGitHub, ncurses }:
|
{ stdenv, cmake, fetchFromGitHub, ncurses, libsodium, json_c }:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
scrypt_src = fetchzip {
|
name = "mpw-2.6-f8043ae";
|
||||||
url = "http://www.tarsnap.com/scrypt/scrypt-1.2.0.tgz";
|
|
||||||
sha256 = "0ahylib2pimlhjcm566kpim6n16jci5v749xwdkr9ivgfjrv3xn4";
|
|
||||||
};
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
|
||||||
name = "mpw-2.1-6834f36";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Lyndir";
|
owner = "Lyndir";
|
||||||
repo = "MasterPassword";
|
repo = "MasterPassword";
|
||||||
rev = "6834f3689f5dfd4e59ad6959961d349c224977ee";
|
rev = "f8043ae16d73ddfb205aadd25c35cd9c5e95b228";
|
||||||
sha256 = "0zlpx3hb1y2l60hg961h05lb9yf3xb5phnyycvazah2674gkwb2p";
|
sha256 = "0hy02ri7y3sca85z3ff5i68crwav5cjd7rrdqj7jrnpp1bw4yapi";
|
||||||
};
|
};
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
sourceRoot+=/MasterPassword/C
|
sourceRoot+=/platform-independent/cli-c
|
||||||
'';
|
'';
|
||||||
|
|
||||||
prePatch = ''
|
preConfigure = ''
|
||||||
patchShebangs .
|
substituteInPlace CMakeLists.txt --replace curses ncurses
|
||||||
mkdir lib/scrypt/src
|
echo ${name} > VERSION
|
||||||
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"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
|
dontUseCmakeBuildDir = true;
|
||||||
|
|
||||||
buildInputs = [ autoconf automake openssl libxml2 ncurses ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildInputs = [ ncurses libsodium json_c ];
|
||||||
substituteInPlace build --replace '"curses"' '"ncurses"'
|
|
||||||
targets="mpw mpw-tests" ./build
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
mv mpw $out/bin/mpw
|
mv mpw $out/bin/mpw
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
platforms = stdenv.lib.platforms.unix;
|
homepage = http://masterpasswordapp.com/;
|
||||||
|
description = "A stateless password management solution";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user