Merge staging-next into staging
This commit is contained in:
48
pkgs/tools/security/prs/default.nix
Normal file
48
pkgs/tools/security/prs/default.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitLab
|
||||
, pkg-config
|
||||
, python3
|
||||
, dbus
|
||||
, glib
|
||||
, gpgme
|
||||
, gtk3
|
||||
, libxcb
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "prs";
|
||||
version = "0.2.2";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "timvisee";
|
||||
repo = "prs";
|
||||
rev = "v${version}";
|
||||
sha256 = "05l9zaaadv2a7ngwkxggp5vrjlnpvf2wr4ijhprx3jkw8b2cxii7";
|
||||
};
|
||||
|
||||
cargoSha256 = "0fjkvr5mdqiy70qx4liwnh78y6mqdv6vbg3nayinh2h34p0z609y";
|
||||
|
||||
postPatch = ''
|
||||
# The GPGME backend is recommended
|
||||
for f in "gtk3/Cargo.toml" "cli/Cargo.toml"; do
|
||||
substituteInPlace "$f" --replace \
|
||||
'default = ["backend-gnupg-bin"' 'default = ["backend-gpgme"'
|
||||
done
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ gpgme pkg-config python3 ];
|
||||
|
||||
buildInputs = [ dbus glib gpgme gtk3 libxcb ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Secure, fast & convenient password manager CLI using GPG and git to sync";
|
||||
homepage = "https://gitlab.com/timvisee/prs";
|
||||
changelog = "https://gitlab.com/timvisee/prs/-/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [
|
||||
lgpl3Only # lib
|
||||
gpl3Only # everything else
|
||||
];
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
{ lib, stdenv
|
||||
, fetchpatch
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, pcre
|
||||
@@ -10,14 +11,14 @@
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "4.0.1";
|
||||
version = "4.0.5";
|
||||
pname = "yara";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "VirusTotal";
|
||||
repo = "yara";
|
||||
rev = "v${version}";
|
||||
sha256 = "0dy8jf0pdn0wilxy1pj6pqjxg7icxkwax09w54np87gl9p00f5rk";
|
||||
sha256 = "1gkdll2ygdlqy1f27a5b84gw2bq75ss7acsx06yhiss90qwdaalq";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
@@ -30,6 +31,19 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preConfigure = "./bootstrap.sh";
|
||||
|
||||
# If static builds are disabled, `make all-am` will fail to find libyara.a and
|
||||
# cause a build failure. It appears that somewhere between yara 4.0.1 and
|
||||
# 4.0.5, linking the yara binaries dynamically against libyara.so was broken.
|
||||
#
|
||||
# This was already fixed in yara master. Backport the patch to yara 4.0.5.
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "fix-build-with-no-static.patch";
|
||||
url = "https://github.com/VirusTotal/yara/commit/52e6866023b9aca26571c78fb8759bc3a51ba6dc.diff";
|
||||
sha256 = "074cf99j0rqiyacp60j1hkvjqxia7qwd11xjqgcr8jmfwihb38nr";
|
||||
})
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
(lib.withFeature withCrypto "crypto")
|
||||
(lib.enableFeature enableMagic "magic")
|
||||
|
||||
Reference in New Issue
Block a user