Comments (6)
OK, I see what you're saying now. My tests (specifically, decrypt_file_into_bytes
and decrypt_file_into_strings
) fail when using rustPlatform.buildRustPackage
due to No data (gpg error 58)
. I'll look into it.
from passrs.
Good point about cargo test
operating on your store by default. I've added a little "helper" that overrides the PASSWORD_STORE_DIR
env var to point where it should in 614df96.
Could you maybe reword what you mean in your second paragraph? I'm having trouble parsing. nix-shell --pure --run "cargo test --test util"
works fine for me, if that's what you were talking about.
from passrs.
I've found the issue! Unfortunately, I don't think there's anything I can do here. The tests require the presence of my test key located at tests/[email protected]
-- it's on my system, since I created it, but it won't be in the sandbox. The following derivation should work:
{ rustPlatform
, fetchFromGitHub
, libgpgerror
, gpgme
, libgit2
, gnupg
}:
rustPlatform.buildRustPackage {
pname = "passrs";
version = "0.1.0";
# src = fetchFromGitHub { ... };
cargoSha256 = "09vqz51hg3zw48zygp4ask8d7sdml7qw6d33pcabq9advxvg9bwr";
nativeBuildInputs = [
gpgme # `gpgme-config` required by crate gpgme
libgpgerror # `gpg-error-config` required by crate libgpg-error-sys
];
buildInputs = [
gpgme
libgit2
libgpgerror
];
checkInputs = [
gnupg
];
# Some tests require the presence of a test key.
preCheck = ''
export GNUPGHOME=$(mktemp -d)
gpg --import tests/[email protected]
echo "4B0D9BBAC5C8329C035B125CF6EF0D39C5F84192:6:" | gpg --import-ownertrust
'';
}
from passrs.
Sorry, I closed this by accident. I still need to find a solution to being able to run tests without the above workaround. gpgme
might be able to import and set the trust level of a key.
from passrs.
As of 6f01544, this should be solved. Please let me know if that's not the case.
It doesn't look like gpgme
has a way to manipulate ownertrust (though it can import keys), so I took the path of least resistance and spawn two gpg
processes -- one to import the secret key itself, and one to import the ownertrust.
from passrs.
As of ce690f6, I've checked in the contents of a dummy GNUPGHOME
, which will allow the tests to run without running gpg
.
Thanks for bringing this to my attention!
from passrs.
Related Issues (8)
- Tweak completions for bash and zsh
- Support age as a backend
- Display find results in a tree like password-store does HOT 2
- Freedesktop Secrets API provider (libsecret dbus provider) HOT 4
- Handle clipboard history properly
- Rewrite GitHub Actions integration to utilize Nix
- relax case sensitivity? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from passrs.