1 { lib, stdenv, cmake, fetchFromGitLab
2 , json_c, libsodium, libxml2, ncurses }:
5 rev = "22796663dcad81684ab24308d9db570f6781ba2c";
7 in stdenv.mkDerivation rec {
8 name = "mpw-${version}-${builtins.substring 0 8 rev}";
11 src = fetchFromGitLab {
12 owner = "MasterPassword";
13 repo = "MasterPassword";
14 sha256 = "1f2vqacgbyam1mazawrfim8zwp38gnwf5v3xkkficsfnv789g6fw";
18 sourceRoot = "${src.name}/platform-independent/c/cli";
22 substituteInPlace mpw-cli-tests \
23 --replace '/usr/bin/env bash' ${stdenv.shell} \
24 --replace ./mpw ./build/mpw
28 "-Dmpw_version=${version}"
29 "-DBUILD_MPW_TESTS=ON"
32 nativeBuildInputs = [ cmake ];
34 buildInputs = [ json_c libxml2 libsodium ncurses ];
39 install -Dm755 mpw $out/bin/mpw
40 install -Dm644 ../mpw.completion.bash $out/share/bash-completion/completions/_mpw
41 install -Dm644 ../../../../README.md $out/share/doc/mpw/README.md
46 # Some tests are expected to fail on ARM64
47 # See: https://gitlab.com/spectre.app/cli/-/issues/27#note_962950844 (mpw is a predecessor to spectre-cli and this issue is relevant to mpw as well)
48 doCheck = !(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
59 description = "Stateless password management solution";
61 homepage = "https://masterpasswordapp.com/";
62 license = licenses.gpl3;
63 platforms = platforms.unix;