3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/security/mpw/default.nix
2017-11-07 19:12:48 +01:00

40 lines
901 B
Nix

{ stdenv, cmake, fetchFromGitHub, ncurses, libsodium, json_c }:
stdenv.mkDerivation rec {
name = "mpw-2.6-f8043ae";
src = fetchFromGitHub {
owner = "Lyndir";
repo = "MasterPassword";
rev = "f8043ae16d73ddfb205aadd25c35cd9c5e95b228";
sha256 = "0hy02ri7y3sca85z3ff5i68crwav5cjd7rrdqj7jrnpp1bw4yapi";
};
postUnpack = ''
sourceRoot+=/platform-independent/cli-c
'';
preConfigure = ''
substituteInPlace CMakeLists.txt --replace curses ncurses
echo ${name} > VERSION
'';
dontUseCmakeBuildDir = true;
nativeBuildInputs = [ cmake ];
buildInputs = [ ncurses libsodium json_c ];
installPhase = ''
mkdir -p $out/bin
mv mpw $out/bin/mpw
'';
meta = with stdenv.lib; {
homepage = http://masterpasswordapp.com/;
description = "A stateless password management solution";
license = licenses.gpl3;
platforms = platforms.unix;
};
}