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
82
pkgs/servers/shishi/default.nix
Normal file
82
pkgs/servers/shishi/default.nix
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config
|
||||
, libgcrypt, libgpg-error, libtasn1
|
||||
|
||||
# Optional Dependencies
|
||||
, pam ? null, libidn ? null, gnutls ? null
|
||||
}:
|
||||
|
||||
let
|
||||
mkFlag = trueStr: falseStr: cond: name: val: "--"
|
||||
+ (if cond then trueStr else falseStr)
|
||||
+ name
|
||||
+ lib.optionalString (val != null && cond != false) "=${val}";
|
||||
mkEnable = mkFlag "enable-" "disable-";
|
||||
mkWith = mkFlag "with-" "without-";
|
||||
mkOther = mkFlag "" "" true;
|
||||
|
||||
shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
|
||||
|
||||
optPam = shouldUsePkg pam;
|
||||
optLibidn = shouldUsePkg libidn;
|
||||
optGnutls = shouldUsePkg gnutls;
|
||||
in
|
||||
with lib;
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "shishi";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/shishi/shishi-${version}.tar.gz";
|
||||
sha256 = "032qf72cpjdfffq1yq54gz3ahgqf2ijca4vl31sfabmjzq9q370d";
|
||||
};
|
||||
|
||||
# Fixes support for gcrypt 1.6+
|
||||
patches = [ ./gcrypt-fix.patch ./freebsd-unistd.patch ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libgcrypt libgpg-error libtasn1 optPam optLibidn optGnutls ];
|
||||
|
||||
configureFlags = [
|
||||
(mkOther "sysconfdir" "/etc")
|
||||
(mkOther "localstatedir" "/var")
|
||||
(mkEnable true "libgcrypt" null)
|
||||
(mkEnable (optPam != null) "pam" null)
|
||||
(mkEnable true "ipv6" null)
|
||||
(mkWith (optLibidn != null) "stringprep" null)
|
||||
(mkEnable (optGnutls != null) "starttls" null)
|
||||
(mkEnable true "des" null)
|
||||
(mkEnable true "3des" null)
|
||||
(mkEnable true "aes" null)
|
||||
(mkEnable true "md" null)
|
||||
(mkEnable false "null" null)
|
||||
(mkEnable true "arcfour" null)
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE
|
||||
= optionalString stdenv.isDarwin "-DBIND_8_COMPAT";
|
||||
|
||||
doCheck = true;
|
||||
|
||||
installFlags = [ "sysconfdir=\${out}/etc" ];
|
||||
|
||||
# Fix *.la files
|
||||
postInstall = ''
|
||||
sed -i $out/lib/libshi{sa,shi}.la \
|
||||
'' + optionalString (optLibidn != null) ''
|
||||
-e 's,\(-lidn\),-L${optLibidn.out}/lib \1,' \
|
||||
'' + optionalString (optGnutls != null) ''
|
||||
-e 's,\(-lgnutls\),-L${optGnutls.out}/lib \1,' \
|
||||
'' + ''
|
||||
-e 's,\(-lgcrypt\),-L${libgcrypt.out}/lib \1,' \
|
||||
-e 's,\(-lgpg-error\),-L${libgpg-error.out}/lib \1,' \
|
||||
-e 's,\(-ltasn1\),-L${libtasn1.out}/lib \1,'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.gnu.org/software/shishi/";
|
||||
description = "An implementation of the Kerberos 5 network security system";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ bjg lovek323 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
12
pkgs/servers/shishi/freebsd-unistd.patch
Normal file
12
pkgs/servers/shishi/freebsd-unistd.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
|
||||
index 2ea9af4..ed58960 100644
|
||||
--- a/gl/unistd.in.h
|
||||
+++ b/gl/unistd.in.h
|
||||
@@ -116,6 +116,7 @@
|
||||
# include <getopt.h>
|
||||
#endif
|
||||
|
||||
+#include "config.h"
|
||||
_GL_INLINE_HEADER_BEGIN
|
||||
#ifndef _GL_UNISTD_INLINE
|
||||
# define _GL_UNISTD_INLINE _GL_INLINE
|
||||
34
pkgs/servers/shishi/gcrypt-fix.patch
Normal file
34
pkgs/servers/shishi/gcrypt-fix.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
diff --git a/configure b/configure
|
||||
index c9a442b..a596bfe 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -24491,12 +24491,6 @@ else
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <gcrypt.h>
|
||||
-/* GCRY_MODULE_ID_USER was added in 1.4.4 and gc-libgcrypt.c
|
||||
- will fail on startup if we don't have 1.4.4 or later, so
|
||||
- test for it early. */
|
||||
-#if !defined GCRY_MODULE_ID_USER
|
||||
-error too old libgcrypt
|
||||
-#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
diff --git a/gl/m4/gc.m4 b/gl/m4/gc.m4
|
||||
index b352e33..4bab9f4 100644
|
||||
--- a/gl/m4/gc.m4
|
||||
+++ b/gl/m4/gc.m4
|
||||
@@ -12,12 +12,6 @@ AC_DEFUN([gl_GC],
|
||||
if test "$libgcrypt" != no; then
|
||||
AC_LIB_HAVE_LINKFLAGS([gcrypt], [gpg-error], [
|
||||
#include <gcrypt.h>
|
||||
-/* GCRY_MODULE_ID_USER was added in 1.4.4 and gc-libgcrypt.c
|
||||
- will fail on startup if we don't have 1.4.4 or later, so
|
||||
- test for it early. */
|
||||
-#if !defined GCRY_MODULE_ID_USER
|
||||
-error too old libgcrypt
|
||||
-#endif
|
||||
])
|
||||
fi
|
||||
])
|
||||
Loading…
Add table
Add a link
Reference in a new issue