ripasso-cursive: 0.4.0 -> 0.5.1

This commit is contained in:
Stig Palmquist 2021-06-15 20:43:05 +02:00
parent ee25ce0408
commit 89f642c010
2 changed files with 74 additions and 25 deletions

View file

@ -1,32 +1,34 @@
{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, ncurses, python3, openssl, libgpgerror, gpgme, xorg, AppKit, Security }: { stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, ncurses, python3, openssl, libgpgerror, gpgme, xorg, AppKit, Security, installShellFiles }:
with rustPlatform; with rustPlatform;
buildRustPackage rec { buildRustPackage rec {
version = "0.4.0"; version = "0.5.1";
pname = "ripasso-cursive"; pname = "ripasso-cursive";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cortex"; owner = "cortex";
repo = "ripasso"; repo = "ripasso";
rev = "release-${version}"; rev = "release-${version}";
sha256 = "164da20j727p8l7hh37j2r8pai9sj402nhswvg0nrlgj53nr6083"; sha256 = "1jx6qv7skikl1ap3g1r34rkz4ab756kra7dgwwv45vl2fb6x74k4";
}; };
patches = [ ./fix-tests.patch ]; patches = [ ./fix-tests.patch ];
cargoSha256 = "1sv5czhrafk15yj5xyd1x9jdqn1dz6aqpxxnyz49icx53qlg9f8g"; cargoSha256 = "1li1gmcs7lnjr4qhzs0rrgngdcxy1paiibjwk9zx2rrs71021cgk";
cargoBuildFlags = [ "-p ripasso-cursive -p ripasso-man" ]; cargoBuildFlags = [ "-p ripasso-cursive" ];
nativeBuildInputs = [ pkg-config gpgme python3 ]; nativeBuildInputs = [ pkg-config gpgme python3 installShellFiles ];
buildInputs = [ buildInputs = [
ncurses openssl libgpgerror gpgme xorg.libxcb ncurses openssl libgpgerror gpgme xorg.libxcb
] ++ lib.optionals stdenv.isDarwin [ AppKit Security ]; ] ++ lib.optionals stdenv.isDarwin [ AppKit Security ];
preFixup = '' preCheck = ''
mkdir -p "$out/man/man1" export HOME=$TMPDIR
$out/bin/ripasso-man > $out/man/man1/ripasso-cursive.1 '';
rm $out/bin/ripasso-man
postInstall = ''
installManPage target/man-page/cursive/ripasso-cursive.1
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,35 +1,82 @@
diff --git a/src/pass/test.rs b/src/pass/test.rs
index c980a2f..2e6c8cc 100644
--- a/src/pass/test.rs --- a/src/pass/test.rs
+++ b/src/pass/test.rs +++ a/src/pass/test.rs
@@ -56,6 +56,7 @@ fn populate_password_list_small_repo() { @@ -83,6 +83,7 @@
base_path.pop(); base_path.pop();
base_path.pop(); base_path.pop();
base_path.pop(); base_path.pop();
+ base_path.pop(); + base_path.pop();
base_path.push("testres"); base_path.push("testres");
let mut password_dir: PathBuf = base_path.clone(); let home: PathBuf = base_path.clone();
@@ -84,6 +85,7 @@ fn populate_password_list_repo_with_deleted_files() { @@ -114,6 +115,7 @@
base_path.pop(); base_path.pop();
base_path.pop(); base_path.pop();
base_path.pop(); base_path.pop();
+ base_path.pop(); + base_path.pop();
base_path.push("testres"); base_path.push("testres");
let mut password_dir: PathBuf = base_path.clone(); let home: PathBuf = base_path.clone();
@@ -112,6 +114,7 @@ fn populate_password_list_directory_without_git() { @@ -144,6 +146,7 @@
base_path.pop(); base_path.pop();
base_path.pop(); base_path.pop();
base_path.pop(); base_path.pop();
+ base_path.pop(); + base_path.pop();
base_path.push("testres"); base_path.push("testres");
let mut password_dir: PathBuf = base_path.clone(); let home: PathBuf = base_path.clone();
@@ -149,4 +152,4 @@ fn parse_signing_keys_empty() { @@ -185,6 +188,7 @@
let result = PasswordStore::parse_signing_keys(&None).unwrap(); base_path.pop();
base_path.pop();
base_path.pop();
+ base_path.pop();
base_path.push("testres");
let home: PathBuf = base_path.clone();
@@ -220,6 +224,7 @@
base_path.pop();
base_path.pop();
base_path.pop();
+ base_path.pop();
base_path.push("testres");
let home: PathBuf = base_path.clone();
@@ -267,6 +272,7 @@
base_path.pop();
base_path.pop();
base_path.pop();
+ base_path.pop();
base_path.push("testres");
let home: PathBuf = base_path.clone();
@@ -298,6 +304,7 @@
base_path.pop();
base_path.pop();
base_path.pop();
+ base_path.pop();
base_path.push("testres");
let home: PathBuf = base_path.clone();
@@ -337,6 +344,7 @@
base_path.pop();
base_path.pop();
base_path.pop();
+ base_path.pop();
base_path.push("testres");
let home: PathBuf = base_path.clone();
@@ -828,6 +836,7 @@
base_path.pop();
base_path.pop();
base_path.pop();
+ base_path.pop();
base_path.push("testres");
let home: PathBuf = base_path.clone();
@@ -860,6 +869,7 @@
base_path.pop();
base_path.pop();
base_path.pop();
+ base_path.pop();
base_path.pop();
base_path.push("testres");
assert_eq!(result.len(), 0);
-}
\ No newline at end of file
+}