nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 rustPlatform,
5 fetchFromGitHub,
6
7 # nativeBuildInputs
8 gpgme,
9 installShellFiles,
10 pkg-config,
11 python3,
12 writableTmpDirAsHomeHook,
13
14 # buildInputs
15 libgpg-error,
16 nettle,
17 openssl,
18 xorg,
19
20 nix-update-script,
21}:
22
23rustPlatform.buildRustPackage (finalAttrs: {
24 version = "0.7.0";
25 pname = "ripasso-cursive";
26
27 src = fetchFromGitHub {
28 owner = "cortex";
29 repo = "ripasso";
30 tag = "release-${finalAttrs.version}";
31 hash = "sha256-j98X/+UTea4lCtFfMpClnfcKlvxm4DpOujLc0xc3VUY=";
32 };
33
34 cargoHash = "sha256-4/87+SOUXLoOxd3a4Kptxa98mh/BWlEhK55uu7+Jrec=";
35
36 patches = [
37 ./fix-tests.patch
38 ];
39
40 cargoBuildFlags = [ "-p ripasso-cursive" ];
41
42 nativeBuildInputs = [
43 gpgme
44 installShellFiles
45 pkg-config
46 python3
47 rustPlatform.bindgenHook
48 writableTmpDirAsHomeHook
49 ];
50
51 buildInputs = [
52 gpgme
53 libgpg-error
54 nettle
55 openssl
56 xorg.libxcb
57 ];
58
59 checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
60 # Fails in the darwin sandbox with:
61 # Attempted to create a NULL object.
62 # event loop thread panicked
63 "--skip=pass::pass_tests::test_add_recipient_not_in_key_ring"
64 ];
65
66 postInstall = ''
67 installManPage target/man-page/cursive/ripasso-cursive.1
68 '';
69
70 passthru = {
71 updateScript = nix-update-script { };
72 };
73
74 meta = {
75 description = "Simple password manager written in Rust";
76 mainProgram = "ripasso-cursive";
77 homepage = "https://github.com/cortex/ripasso";
78 license = lib.licenses.gpl3;
79 maintainers = with lib.maintainers; [ sgo ];
80 platforms = lib.platforms.unix;
81 };
82})