Merge pull request #31370 from schwepp/update/mpw-2.6

mpw: 2.1 -> 2.6

authored by Jörg Thalheim and committed by GitHub 9356b882 27d83707

+17 -28
+17 -28
pkgs/tools/security/mpw/default.nix
··· 1 - { stdenv, fetchzip, autoconf, automake, openssl, libxml2, fetchFromGitHub, ncurses }: 2 - 3 - let 4 - scrypt_src = fetchzip { 5 - url = "http://www.tarsnap.com/scrypt/scrypt-1.2.0.tgz"; 6 - sha256 = "0ahylib2pimlhjcm566kpim6n16jci5v749xwdkr9ivgfjrv3xn4"; 7 - }; 1 + { stdenv, cmake, fetchFromGitHub, ncurses, libsodium, json_c }: 8 2 9 - in stdenv.mkDerivation { 10 - name = "mpw-2.1-6834f36"; 3 + stdenv.mkDerivation rec { 4 + name = "mpw-2.6-f8043ae"; 11 5 12 6 src = fetchFromGitHub { 13 7 owner = "Lyndir"; 14 8 repo = "MasterPassword"; 15 - rev = "6834f3689f5dfd4e59ad6959961d349c224977ee"; 16 - sha256 = "0zlpx3hb1y2l60hg961h05lb9yf3xb5phnyycvazah2674gkwb2p"; 9 + rev = "f8043ae16d73ddfb205aadd25c35cd9c5e95b228"; 10 + sha256 = "0hy02ri7y3sca85z3ff5i68crwav5cjd7rrdqj7jrnpp1bw4yapi"; 17 11 }; 18 12 19 13 postUnpack = '' 20 - sourceRoot+=/MasterPassword/C 14 + sourceRoot+=/platform-independent/cli-c 21 15 ''; 22 16 23 - prePatch = '' 24 - patchShebangs . 25 - mkdir lib/scrypt/src 26 - cp -R --no-preserve=ownership ${scrypt_src}/* lib/scrypt/src 27 - chmod +w -R lib/scrypt/src 28 - substituteInPlace lib/scrypt/src/libcperciva/cpusupport/Build/cpusupport.sh \ 29 - --replace dirname "$(type -P dirname)" 30 - substituteInPlace lib/scrypt/src/Makefile.in --replace "command -p mv" "mv" 17 + preConfigure = '' 18 + substituteInPlace CMakeLists.txt --replace curses ncurses 19 + echo ${name} > VERSION 31 20 ''; 32 21 33 - NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; 22 + dontUseCmakeBuildDir = true; 34 23 35 - buildInputs = [ autoconf automake openssl libxml2 ncurses ]; 24 + nativeBuildInputs = [ cmake ]; 36 25 37 - buildPhase = '' 38 - substituteInPlace build --replace '"curses"' '"ncurses"' 39 - targets="mpw mpw-tests" ./build 40 - ''; 26 + buildInputs = [ ncurses libsodium json_c ]; 41 27 42 28 installPhase = '' 43 29 mkdir -p $out/bin 44 30 mv mpw $out/bin/mpw 45 31 ''; 46 32 47 - meta = { 48 - platforms = stdenv.lib.platforms.unix; 33 + meta = with stdenv.lib; { 34 + homepage = http://masterpasswordapp.com/; 35 + description = "A stateless password management solution"; 36 + license = licenses.gpl3; 37 + platforms = platforms.unix; 49 38 }; 50 39 }