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
35
pkgs/tools/security/pinentry/autoconf-ar.patch
Normal file
35
pkgs/tools/security/pinentry/autoconf-ar.patch
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
diff -ur a/configure.ac b/configure.ac
|
||||
--- a/configure.ac 2019-09-14 11:30:11.584847746 +0000
|
||||
+++ b/configure.ac 2019-09-14 11:31:26.692355265 +0000
|
||||
@@ -81,6 +81,7 @@
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
+AC_CHECK_TOOL(AR, ar)
|
||||
# We need to check for cplusplus here because we may not do the test
|
||||
# for Qt and autoconf does does not allow that.
|
||||
AC_PROG_CXX
|
||||
diff -ur a/pinentry/Makefile.in b/pinentry/Makefile.in
|
||||
--- a/pinentry/Makefile.in 2017-12-03 17:43:23.000000000 +0000
|
||||
+++ b/pinentry/Makefile.in 2019-09-14 11:32:02.532000236 +0000
|
||||
@@ -113,7 +113,7 @@
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
-AR = ar
|
||||
+AR = @AR@
|
||||
ARFLAGS = cru
|
||||
AM_V_AR = $(am__v_AR_@AM_V@)
|
||||
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
|
||||
diff -ur a/secmem/Makefile.in b/secmem/Makefile.in
|
||||
--- a/secmem/Makefile.in 2017-12-03 17:43:23.000000000 +0000
|
||||
+++ b/secmem/Makefile.in 2019-09-14 11:31:58.764934552 +0000
|
||||
@@ -113,7 +113,7 @@
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
-AR = ar
|
||||
+AR = @AR@
|
||||
ARFLAGS = cru
|
||||
AM_V_AR = $(am__v_AR_@AM_V@)
|
||||
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
|
||||
105
pkgs/tools/security/pinentry/default.nix
Normal file
105
pkgs/tools/security/pinentry/default.nix
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
{ fetchurl, mkDerivation, fetchpatch, stdenv, lib, pkg-config, autoreconfHook, wrapGAppsHook
|
||||
, libgpg-error, libassuan, qtbase, wrapQtAppsHook
|
||||
, ncurses, gtk2, gcr, libcap, libsecret
|
||||
, enabledFlavors ? [ "curses" "tty" "gtk2" "emacs" ]
|
||||
++ lib.optionals stdenv.isLinux [ "gnome3" ]
|
||||
++ lib.optionals (!stdenv.isDarwin) [ "qt" ]
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
assert isList enabledFlavors && enabledFlavors != [];
|
||||
|
||||
let
|
||||
pinentryMkDerivation =
|
||||
if (builtins.elem "qt" enabledFlavors)
|
||||
then mkDerivation
|
||||
else stdenv.mkDerivation;
|
||||
|
||||
mkFlag = pfxTrue: pfxFalse: cond: name:
|
||||
"--${if cond then pfxTrue else pfxFalse}-${name}";
|
||||
mkEnable = mkFlag "enable" "disable";
|
||||
mkWith = mkFlag "with" "without";
|
||||
|
||||
mkEnablePinentry = f:
|
||||
let
|
||||
info = flavorInfo.${f};
|
||||
flag = flavorInfo.${f}.flag or null;
|
||||
in
|
||||
optionalString (flag != null)
|
||||
(mkEnable (elem f enabledFlavors) ("pinentry-" + flag));
|
||||
|
||||
flavorInfo = {
|
||||
curses = { bin = "curses"; flag = "curses"; buildInputs = [ ncurses ]; };
|
||||
tty = { bin = "tty"; flag = "tty"; };
|
||||
gtk2 = { bin = "gtk-2"; flag = "gtk2"; buildInputs = [ gtk2 ]; };
|
||||
gnome3 = { bin = "gnome3"; flag = "gnome3"; buildInputs = [ gcr ]; nativeBuildInputs = [ wrapGAppsHook ]; };
|
||||
qt = { bin = "qt"; flag = "qt"; buildInputs = [ qtbase ]; nativeBuildInputs = [ wrapQtAppsHook ]; };
|
||||
emacs = { bin = "emacs"; flag = "emacs"; buildInputs = []; };
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
pinentryMkDerivation rec {
|
||||
pname = "pinentry";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnupg/pinentry/${pname}-${version}.tar.bz2";
|
||||
sha256 = "sha256-EAcgRaPgQ9BYH5HNVnb8rH/+6VehZjat7apPWDphZHA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoreconfHook ]
|
||||
++ concatMap(f: flavorInfo.${f}.nativeBuildInputs or []) enabledFlavors;
|
||||
buildInputs = [ libgpg-error libassuan libsecret ]
|
||||
++ lib.optional (!stdenv.isDarwin) libcap
|
||||
++ concatMap(f: flavorInfo.${f}.buildInputs or []) enabledFlavors;
|
||||
|
||||
dontWrapGApps = true;
|
||||
dontWrapQtApps = true;
|
||||
|
||||
patches = [
|
||||
./autoconf-ar.patch
|
||||
] ++ optionals (elem "gtk2" enabledFlavors) [
|
||||
(fetchpatch {
|
||||
url = "https://salsa.debian.org/debian/pinentry/raw/debian/1.1.0-1/debian/patches/0007-gtk2-When-X11-input-grabbing-fails-try-again-over-0..patch";
|
||||
sha256 = "15r1axby3fdlzz9wg5zx7miv7gqx2jy4immaw4xmmw5skiifnhfd";
|
||||
})
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
(mkWith (libcap != null) "libcap")
|
||||
(mkEnable (libsecret != null) "libsecret")
|
||||
] ++ (map mkEnablePinentry (attrNames flavorInfo));
|
||||
|
||||
postInstall =
|
||||
concatStrings (flip map enabledFlavors (f:
|
||||
let
|
||||
binary = "pinentry-" + flavorInfo.${f}.bin;
|
||||
in ''
|
||||
moveToOutput bin/${binary} ${placeholder f}
|
||||
ln -sf ${placeholder f}/bin/${binary} ${placeholder f}/bin/pinentry
|
||||
'' + optionalString (f == "gnome3") ''
|
||||
wrapGApp ${placeholder f}/bin/${binary}
|
||||
'' + optionalString (f == "qt") ''
|
||||
wrapQtApp ${placeholder f}/bin/${binary}
|
||||
'')) + ''
|
||||
ln -sf ${placeholder (head enabledFlavors)}/bin/pinentry-${flavorInfo.${head enabledFlavors}.bin} $out/bin/pinentry
|
||||
'';
|
||||
|
||||
outputs = [ "out" ] ++ enabledFlavors;
|
||||
|
||||
passthru = { flavors = enabledFlavors; };
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://gnupg.org/aegypten2/";
|
||||
description = "GnuPG’s interface to passphrase input";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.all;
|
||||
longDescription = ''
|
||||
Pinentry provides a console and (optional) GTK and Qt GUIs allowing users
|
||||
to enter a passphrase when `gpg' or `gpg2' is run and needs it.
|
||||
'';
|
||||
maintainers = with maintainers; [ ttuegel fpletz ];
|
||||
};
|
||||
}
|
||||
38
pkgs/tools/security/pinentry/mac.nix
Normal file
38
pkgs/tools/security/pinentry/mac.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchFromGitHub, xcbuildHook, libiconv, ncurses, Cocoa }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "pinentry-mac";
|
||||
version = "0.9.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "matthewbauer";
|
||||
repo = "pinentry-mac";
|
||||
rev = "6dfef256c8ea32d642fea847f27d800f024cf51e";
|
||||
sha256 = "0g75302697gqcxyf2hyqzvcbd5pyss1bl2xvfd40wqav7dlyvj83";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ libiconv ncurses Cocoa ];
|
||||
|
||||
preBuild = ''
|
||||
# Only build for what we care about (also allows arm64)
|
||||
substituteInPlace pinentry-mac.xcodeproj/project.pbxproj \
|
||||
--replace "i386 x86_64 ppc" "${stdenv.targetPlatform.darwinArch}"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/Applications
|
||||
mv Products/Release/pinentry-mac.app $out/Applications
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
binaryPath = "Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Pinentry for GPG on Mac";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
homepage = "https://github.com/GPGTools/pinentry-mac";
|
||||
platforms = lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue