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
42
pkgs/development/libraries/ustr/default.nix
Normal file
42
pkgs/development/libraries/ustr/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ustr";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.and.org/ustr/${version}/${pname}-${version}.tar.bz2";
|
||||
sha256 = "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx";
|
||||
};
|
||||
|
||||
# Fixes bogus warnings that failed libsemanage
|
||||
patches = [ ./va_args.patch ];
|
||||
|
||||
# Work around gcc5 switch to gnu11
|
||||
NIX_CFLAGS_COMPILE = "-std=gnu89";
|
||||
|
||||
# Fix detection of stdint.h
|
||||
postPatch = ''
|
||||
sed -i 's,\(have_stdint_h\)=0,\1=1,g' Makefile
|
||||
sed -i 's,\(USTR_CONF_HAVE_STDINT_H\) 0,\1 1,g' ustr-import.in
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray+=("prefix=$out")
|
||||
makeFlagsArray+=("LDCONFIG=echo")
|
||||
makeFlagsArray+=("HIDE=")
|
||||
'';
|
||||
|
||||
# Remove debug libraries
|
||||
postInstall = ''
|
||||
find $out/lib -name \*debug\* -delete
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.and.org/ustr/";
|
||||
description = "Micro String API for C language";
|
||||
license = licenses.bsd2;
|
||||
maintainers = [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
23
pkgs/development/libraries/ustr/va_args.patch
Normal file
23
pkgs/development/libraries/ustr/va_args.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/ustr-compiler.h b/ustr-compiler.h
|
||||
index 9e71276..c5f847a 100644
|
||||
--- a/ustr-compiler.h
|
||||
+++ b/ustr-compiler.h
|
||||
@@ -11,17 +11,11 @@
|
||||
#define USTR_CONF_HAVE_ATTR_FMT 1
|
||||
#endif
|
||||
|
||||
+#include <stdarg.h>
|
||||
/* We assume this is enough,
|
||||
* C99 specifies that va_copy() exists and is a macro */
|
||||
-#ifdef va_copy
|
||||
# define USTR_CONF_HAVE_VA_COPY 1
|
||||
# define USTR__VA_COPY(x, y) va_copy(x, y)
|
||||
-#elif __va_copy
|
||||
-# define USTR_CONF_HAVE_VA_COPY 1
|
||||
-# define USTR__VA_COPY(x, y) __va_copy(x, y)
|
||||
-#else
|
||||
-# define USTR_CONF_HAVE_VA_COPY 0
|
||||
-#endif
|
||||
|
||||
#ifndef USTR_CONF_HAVE_ATTR_NONNULL
|
||||
#if defined(__GNUC__) && (__GNUC__ > 3) /* not sure */
|
||||
Loading…
Add table
Add a link
Reference in a new issue