git.iko.soy/typeable/nixpkgs
on master help sign in
ripasso-cursive: 0.4.0 -> 0.5.1
commit89f642c010065d9dbdc035aef8bf20c1098b2107 authorStig Palmquist <stig@stig.io> dateTue 15 Jun 2021, 20:43 (5 years ago) parentee25ce0
2 files changed+74−25
pkgs/tools/security/ripasso/cursive.nix+12−10 pkgs/tools/security/ripasso/fix-tests.patch+62−15
pkgs/tools/security/ripasso/cursive.nix+12−10
@@ -1,32 +1,34 @@
1−{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, ncurses, python3, openssl, libgpgerror, gpgme, xorg, AppKit, Security }:
1+{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, ncurses, python3, openssl, libgpgerror, gpgme, xorg, AppKit, Security, installShellFiles }:
22
33with rustPlatform;
44buildRustPackage rec {
5− version = "0.4.0";
5+ version = "0.5.1";
66 pname = "ripasso-cursive";
77
88 src = fetchFromGitHub {
99 owner = "cortex";
1010 repo = "ripasso";
1111 rev = "release-${version}";
12− sha256 = "164da20j727p8l7hh37j2r8pai9sj402nhswvg0nrlgj53nr6083";
12+ sha256 = "1jx6qv7skikl1ap3g1r34rkz4ab756kra7dgwwv45vl2fb6x74k4";
1313 };
1414
1515 patches = [ ./fix-tests.patch ];
1616
17− cargoSha256 = "1sv5czhrafk15yj5xyd1x9jdqn1dz6aqpxxnyz49icx53qlg9f8g";
17+ cargoSha256 = "1li1gmcs7lnjr4qhzs0rrgngdcxy1paiibjwk9zx2rrs71021cgk";
1818
19− cargoBuildFlags = [ "-p ripasso-cursive -p ripasso-man" ];
19+ cargoBuildFlags = [ "-p ripasso-cursive" ];
2020
21− nativeBuildInputs = [ pkg-config gpgme python3 ];
21+ nativeBuildInputs = [ pkg-config gpgme python3 installShellFiles ];
2222 buildInputs = [
2323 ncurses openssl libgpgerror gpgme xorg.libxcb
2424 ] ++ lib.optionals stdenv.isDarwin [ AppKit Security ];
2525
26− preFixup = ''
27− mkdir -p "$out/man/man1"
28− $out/bin/ripasso-man > $out/man/man1/ripasso-cursive.1
29− rm $out/bin/ripasso-man
26+ preCheck = ''
27+ export HOME=$TMPDIR
28+ '';
29+
30+ postInstall = ''
31+ installManPage target/man-page/cursive/ripasso-cursive.1
3032 '';
3133
3234 meta = with lib; {
pkgs/tools/security/ripasso/fix-tests.patch+62−15
@@ -1,35 +1,82 @@
1−diff --git a/src/pass/test.rs b/src/pass/test.rs
2−index c980a2f..2e6c8cc 100644
31--- a/src/pass/test.rs
4−+++ b/src/pass/test.rs
5−@@ -56,6 +56,7 @@ fn populate_password_list_small_repo() {
2++++ a/src/pass/test.rs
3+@@ -83,6 +83,7 @@
64 base_path.pop();
75 base_path.pop();
86 base_path.pop();
97+ base_path.pop();
108 base_path.push("testres");
119
12− let mut password_dir: PathBuf = base_path.clone();
13−@@ -84,6 +85,7 @@ fn populate_password_list_repo_with_deleted_files() {
10+ let home: PathBuf = base_path.clone();
11+@@ -114,6 +115,7 @@
1412 base_path.pop();
1513 base_path.pop();
1614 base_path.pop();
1715+ base_path.pop();
1816 base_path.push("testres");
1917
20− let mut password_dir: PathBuf = base_path.clone();
21−@@ -112,6 +114,7 @@ fn populate_password_list_directory_without_git() {
18+ let home: PathBuf = base_path.clone();
19+@@ -144,6 +146,7 @@
2220 base_path.pop();
2321 base_path.pop();
2422 base_path.pop();
2523+ base_path.pop();
2624 base_path.push("testres");
2725
28− let mut password_dir: PathBuf = base_path.clone();
29−@@ -149,4 +152,4 @@ fn parse_signing_keys_empty() {
30− let result = PasswordStore::parse_signing_keys(&None).unwrap();
26+ let home: PathBuf = base_path.clone();
27+@@ -185,6 +188,7 @@
28+ base_path.pop();
29+ base_path.pop();
30+ base_path.pop();
31++ base_path.pop();
32+ base_path.push("testres");
33+
34+ let home: PathBuf = base_path.clone();
35+@@ -220,6 +224,7 @@
36+ base_path.pop();
37+ base_path.pop();
38+ base_path.pop();
39++ base_path.pop();
40+ base_path.push("testres");
41+
42+ let home: PathBuf = base_path.clone();
43+@@ -267,6 +272,7 @@
44+ base_path.pop();
45+ base_path.pop();
46+ base_path.pop();
47++ base_path.pop();
48+ base_path.push("testres");
49+
50+ let home: PathBuf = base_path.clone();
51+@@ -298,6 +304,7 @@
52+ base_path.pop();
53+ base_path.pop();
54+ base_path.pop();
55++ base_path.pop();
56+ base_path.push("testres");
57+
58+ let home: PathBuf = base_path.clone();
59+@@ -337,6 +344,7 @@
60+ base_path.pop();
61+ base_path.pop();
62+ base_path.pop();
63++ base_path.pop();
64+ base_path.push("testres");
65+
66+ let home: PathBuf = base_path.clone();
67+@@ -828,6 +836,7 @@
68+ base_path.pop();
69+ base_path.pop();
70+ base_path.pop();
71++ base_path.pop();
72+ base_path.push("testres");
73+
74+ let home: PathBuf = base_path.clone();
75+@@ -860,6 +869,7 @@
76+ base_path.pop();
77+ base_path.pop();
78+ base_path.pop();
79++ base_path.pop();
80+ base_path.pop();
81+ base_path.push("testres");
3182
32− assert_eq!(result.len(), 0);
33−-}
34−\ No newline at end of file
35−+}