uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,43 @@
|
|||
From a2d5d973f53efb11bdcaecbd0099df9714bc287f Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Bosch <maximilian@mbosch.me>
|
||||
Date: Tue, 8 Feb 2022 19:35:35 +0100
|
||||
Subject: [PATCH] Set `base` to an empty value
|
||||
|
||||
`DESTDIR` ensures that everything lands in the correct location (i.e.
|
||||
the target store-path on Nix), within this path, everything should be
|
||||
moved into `/lib` and `/share`.
|
||||
---
|
||||
setup.py | 17 ++---------------
|
||||
1 file changed, 2 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 1f0a58b..f7baa41 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -8,21 +8,8 @@ from pathlib import Path
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
-share = Path(sys.prefix, 'share')
|
||||
-base = '/usr'
|
||||
-if os.uname().sysname == 'Darwin':
|
||||
- base = '/usr/local'
|
||||
-lib = Path(base, 'lib', 'password-store', 'extensions')
|
||||
-
|
||||
-if '--user' in sys.argv:
|
||||
- if 'PASSWORD_STORE_EXTENSIONS_DIR' in os.environ:
|
||||
- lib = Path(os.environ['PASSWORD_STORE_EXTENSIONS_DIR'])
|
||||
- else:
|
||||
- lib = Path.home() / '.password-store' / '.extensions'
|
||||
- if 'XDG_DATA_HOME' in os.environ:
|
||||
- share = Path(os.environ['XDG_DATA_HOME'])
|
||||
- else:
|
||||
- share = Path.home() / '.local' / 'share'
|
||||
+share = Path('share')
|
||||
+lib = Path('lib', 'password-store', 'extensions')
|
||||
|
||||
setup(
|
||||
data_files=[
|
||||
--
|
||||
2.33.1
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
From 8f76b32946430737f97f2702afd828b09536afd2 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Bosch <maximilian@mbosch.me>
|
||||
Date: Sun, 15 Mar 2020 20:10:11 +0100
|
||||
Subject: [PATCH 2/2] Fix audit.bash setup
|
||||
|
||||
This sets PASSWORD_STORE_DIR (needed by the python-code) to
|
||||
PASSWORD_STORE_DIR and properly falls back to `~/.password-store` if
|
||||
it's not set.
|
||||
---
|
||||
audit.bash | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/audit.bash b/audit.bash
|
||||
index 7a973dc..c40ff76 100755
|
||||
--- a/audit.bash
|
||||
+++ b/audit.bash
|
||||
@@ -17,7 +17,7 @@
|
||||
#
|
||||
|
||||
cmd_audit() {
|
||||
- export PASSWORD_STORE_DIR=$PREFIX GIT_DIR PASSWORD_STORE_GPG_OPTS
|
||||
+ export PASSWORD_STORE_DIR=${PASSWORD_STORE_DIR:-$HOME/.password-store} GIT_DIR PASSWORD_STORE_GPG_OPTS
|
||||
export X_SELECTION CLIP_TIME PASSWORD_STORE_UMASK GENERATED_LENGTH
|
||||
export CHARACTER_SET CHARACTER_SET_NO_SYMBOLS EXTENSIONS PASSWORD_STORE_KEY
|
||||
export PASSWORD_STORE_ENABLE_EXTENSIONS PASSWORD_STORE_SIGNING_KEY
|
||||
--
|
||||
2.25.0
|
||||
|
||||
55
pkgs/tools/security/pass/extensions/audit/default.nix
Normal file
55
pkgs/tools/security/pass/extensions/audit/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, stdenv, pass, fetchFromGitHub, pythonPackages, makeWrapper, gnupg }:
|
||||
|
||||
let
|
||||
pythonEnv = pythonPackages.python.withPackages (p: [ p.requests p.setuptools p.zxcvbn ]);
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "pass-audit";
|
||||
version = "1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "roddhjav";
|
||||
repo = "pass-audit";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-xigP8LxRXITLF3X21zhWx6ooFNSTKGv46yFSt1dd4vs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./0001-Set-base-to-an-empty-value.patch
|
||||
./0002-Fix-audit.bash-setup.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace audit.bash \
|
||||
--replace 'python3' "${pythonEnv}/bin/python3"
|
||||
substituteInPlace Makefile \
|
||||
--replace "install --root" "install --prefix ''' --root"
|
||||
'';
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
buildInputs = [ pythonEnv ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
# Tests freeze on darwin with: pass-audit-1.1 (checkPhase): EOFError
|
||||
doCheck = !stdenv.isDarwin;
|
||||
checkInputs = [ pythonPackages.green pass gnupg ];
|
||||
checkPhase = ''
|
||||
${pythonEnv}/bin/python3 setup.py green -q
|
||||
'';
|
||||
|
||||
installFlags = [ "DESTDIR=${placeholder "out"}" "PREFIX=" ];
|
||||
postInstall = ''
|
||||
wrapProgram $out/lib/password-store/extensions/audit.bash \
|
||||
--prefix PYTHONPATH : "$out/lib/${pythonEnv.libPrefix}/site-packages" \
|
||||
--run "export COMMAND"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pass extension for auditing your password repository.";
|
||||
homepage = "https://github.com/roddhjav/pass-audit";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ ma27 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue