diff --git a/pkgs/tools/security/ripasso/fix-tests.patch b/pkgs/by-name/ri/ripasso-cursive/fix-tests.patch similarity index 100% rename from pkgs/tools/security/ripasso/fix-tests.patch rename to pkgs/by-name/ri/ripasso-cursive/fix-tests.patch diff --git a/pkgs/tools/security/ripasso/cursive.nix b/pkgs/by-name/ri/ripasso-cursive/package.nix similarity index 54% rename from pkgs/tools/security/ripasso/cursive.nix rename to pkgs/by-name/ri/ripasso-cursive/package.nix index fe216b91ff91..62d3ba3cac83 100644 --- a/pkgs/tools/security/ripasso/cursive.nix +++ b/pkgs/by-name/ri/ripasso-cursive/package.nix @@ -1,18 +1,22 @@ -{ stdenv -, lib -, rustPlatform -, fetchFromGitHub -, pkg-config -, python3 -, openssl -, libgpg-error -, gpgme -, xorg -, nettle -, clang -, AppKit -, Security -, installShellFiles +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + + # nativeBuildInputs + gpgme, + installShellFiles, + pkg-config, + python3, + + # buildInputs + libgpg-error, + nettle, + openssl, + xorg, + + nix-update-script, }: rustPlatform.buildRustPackage rec { @@ -22,7 +26,7 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "cortex"; repo = "ripasso"; - rev = "release-${version}"; + rev = "refs/tags/release-${version}"; hash = "sha256-j98X/+UTea4lCtFfMpClnfcKlvxm4DpOujLc0xc3VUY="; }; @@ -35,39 +39,46 @@ rustPlatform.buildRustPackage rec { cargoBuildFlags = [ "-p ripasso-cursive" ]; nativeBuildInputs = [ - pkg-config gpgme - python3 installShellFiles - clang + pkg-config + python3 rustPlatform.bindgenHook ]; buildInputs = [ - openssl - libgpg-error gpgme - xorg.libxcb + libgpg-error nettle - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - AppKit - Security + openssl + xorg.libxcb ]; preCheck = '' - export HOME=$TMPDIR + export HOME=$(mktemp -d) ''; + checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ + # Fails in the darwin sandbox with: + # Attempted to create a NULL object. + # event loop thread panicked + "--skip=pass::pass_tests::test_add_recipient_not_in_key_ring" + ]; + postInstall = '' installManPage target/man-page/cursive/ripasso-cursive.1 ''; - meta = with lib; { + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { description = "Simple password manager written in Rust"; mainProgram = "ripasso-cursive"; homepage = "https://github.com/cortex/ripasso"; - license = licenses.gpl3; - maintainers = with maintainers; [ sgo ]; - platforms = platforms.unix; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ sgo ]; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bb4126e3f906..4d1b16ac787e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2696,10 +2696,6 @@ with pkgs; razergenie = libsForQt5.callPackage ../applications/misc/razergenie { }; - ripasso-cursive = callPackage ../tools/security/ripasso/cursive.nix { - inherit (darwin.apple_sdk.frameworks) AppKit Security; - }; - roundcube = callPackage ../servers/roundcube { }; roundcubePlugins = dontRecurseIntoAttrs (callPackage ../servers/roundcube/plugins { });