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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,77 @@
{ lib, stdenv, fetchurl
# TODO: links -lsigsegv but loses the reference for some reason
, withSigsegv ? (false && stdenv.hostPlatform.system != "x86_64-cygwin"), libsigsegv
, interactive ? false, readline
/* Test suite broke on:
stdenv.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1
|| stdenv.isDarwin # XXX: `locale' segfaults
|| stdenv.isSunOS # XXX: `_backsmalls1' fails, locale stuff?
|| stdenv.isFreeBSD
*/
, doCheck ? (interactive && stdenv.isLinux), glibcLocales ? null
, locale ? null
}:
assert (doCheck && stdenv.isLinux) -> glibcLocales != null;
stdenv.mkDerivation rec {
pname = "gawk" + lib.optionalString interactive "-interactive";
version = "5.1.1";
src = fetchurl {
url = "mirror://gnu/gawk/gawk-${version}.tar.xz";
sha256 = "18kybw47fb1sdagav7aj95r9pp09r5gm202y3ahvwjw9dqw2jxnq";
};
# When we do build separate interactive version, it makes sense to always include man.
outputs = [ "out" "info" ]
++ lib.optional (!interactive) "man";
nativeBuildInputs = lib.optional (doCheck && stdenv.isLinux) glibcLocales;
buildInputs = lib.optional withSigsegv libsigsegv
++ lib.optional interactive readline
++ lib.optional stdenv.isDarwin locale;
configureFlags = [
(if withSigsegv then "--with-libsigsegv-prefix=${libsigsegv}" else "--without-libsigsegv")
(if interactive then "--with-readline=${readline.dev}" else "--without-readline")
];
makeFlags = [
"AR=${stdenv.cc.targetPrefix}ar"
];
inherit doCheck;
postInstall = ''
rm "$out"/bin/gawk-*
ln -s gawk.1 "''${!outputMan}"/share/man/man1/awk.1
'';
passthru = {
libsigsegv = if withSigsegv then libsigsegv else null; # for stdenv bootstrap
};
meta = with lib; {
homepage = "https://www.gnu.org/software/gawk/";
description = "GNU implementation of the Awk programming language";
longDescription = ''
Many computer users need to manipulate text files: extract and then
operate on data from parts of certain lines while discarding the rest,
make changes in various text files wherever certain patterns appear,
and so on. To write a program to do these things in a language such as
C or Pascal is a time-consuming inconvenience that may take many lines
of code. The job is easy with awk, especially the GNU implementation:
Gawk.
The awk utility interprets a special-purpose programming language that
makes it possible to handle many data-reformatting jobs with just a few
lines of code.
'';
license = licenses.gpl3Plus;
platforms = platforms.unix ++ platforms.windows;
maintainers = [ ];
};
}

View file

@ -0,0 +1,13 @@
{ runCommand, gawk, extensions, makeWrapper }:
runCommand "gawk-with-extensions" {
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ gawk ] ++ extensions;
} ''
mkdir -p $out/bin
for i in ${gawk}/bin/*; do
name="$(basename "$i")"
makeWrapper $i $out/bin/$name \
--prefix AWKLIBPATH : "${gawk}/lib/gawk:''${AWKLIBPATH:-}"
done
''

View file

@ -0,0 +1,149 @@
{ lib, stdenv, recurseIntoAttrs, fetchgit, writeText, pkg-config, autoreconfHook
, autoconf, automake, libiconv, libtool, texinfo, gettext, gawk, rapidjson, gd
, shapelib, libharu, lmdb, gmp, glibcLocales, mpfr, more, postgresql, hiredis
, expat, tre, makeWrapper }:
let
buildExtension = lib.makeOverridable
({ name, gawkextlib, extraBuildInputs ? [ ], doCheck ? true }:
let is_extension = !isNull gawkextlib;
in stdenv.mkDerivation rec {
pname = "gawkextlib-${name}";
version = "unstable-2019-11-21";
src = fetchgit {
url = "git://git.code.sf.net/p/gawkextlib/code";
rev = "f70f10da2804e4fd0a0bac57736e9c1cf21e345d";
sha256 = "0r8fz89n3l4dfszs1980yqj0ah95430lj0y1lb7blfkwxa6c2xik";
};
postPatch = ''
cd ${name}
'';
nativeBuildInputs = [
autoconf
automake
libtool
autoreconfHook
pkg-config
texinfo
gettext
];
buildInputs = [ gawk ] ++ extraBuildInputs;
propagatedBuildInputs = lib.optional is_extension gawkextlib;
setupHook = if is_extension then ./setup-hook.sh else null;
inherit gawk;
inherit doCheck;
checkInputs = [ more ];
meta = with lib; {
homepage = "https://sourceforge.net/projects/gawkextlib/";
description = "Dynamically loaded extension libraries for GNU AWK";
longDescription = ''
The gawkextlib project provides several extension libraries for
gawk (GNU AWK), as well as libgawkextlib containing some APIs that
are useful for building gawk extension libraries. These libraries
enable gawk to process XML data, interact with a PostgreSQL
database, use the GD graphics library, and perform unlimited
precision MPFR calculations.
'';
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ tomberek ];
};
});
gawkextlib = buildExtension {
gawkextlib = null;
name = "lib";
};
libs = {
abort = buildExtension {
inherit gawkextlib;
name = "abort";
};
aregex = buildExtension {
inherit gawkextlib;
name = "aregex";
extraBuildInputs = [ tre ];
};
csv = buildExtension {
inherit gawkextlib;
name = "csv";
};
errno = buildExtension {
inherit gawkextlib;
name = "errno";
};
gd = buildExtension {
inherit gawkextlib;
name = "gd";
extraBuildInputs = [ gd ];
};
haru = buildExtension {
inherit gawkextlib;
name = "haru";
extraBuildInputs = [ libharu ];
};
json = buildExtension {
inherit gawkextlib;
name = "json";
extraBuildInputs = [ rapidjson ];
};
lmdb = buildExtension {
inherit gawkextlib;
name = "lmdb";
extraBuildInputs = [ lmdb ];
# mdb_env_open(env, /dev/null)
#! No such device
# mdb_env_open(env, /dev/null)
#! Operation not supported by device
doCheck = !stdenv.isDarwin;
};
mbs = buildExtension {
inherit gawkextlib;
name = "mbs";
extraBuildInputs = [ glibcLocales ];
#! "spät": length: 5, mbs_length: 6, wcswidth: 4
doCheck = !stdenv.isDarwin;
};
mpfr = buildExtension {
inherit gawkextlib;
name = "mpfr";
extraBuildInputs = [ gmp mpfr ];
};
nl_langinfo = buildExtension {
inherit gawkextlib;
name = "nl_langinfo";
};
pgsql = buildExtension {
inherit gawkextlib;
name = "pgsql";
extraBuildInputs = [ postgresql ];
};
redis = buildExtension {
inherit gawkextlib;
name = "redis";
extraBuildInputs = [ hiredis ];
};
select = buildExtension {
inherit gawkextlib;
name = "select";
};
timex = buildExtension {
inherit gawkextlib;
name = "timex";
};
xml = buildExtension {
inherit gawkextlib;
name = "xml";
extraBuildInputs = [ expat libiconv ];
};
};
in recurseIntoAttrs (libs // {
inherit gawkextlib buildExtension;
full = builtins.attrValues libs;
})

View file

@ -0,0 +1,6 @@
local oldOpts="-u"
shopt -qo nounset || oldOpts="+u"
set +u
. @gawk@/etc/profile.d/gawk.sh
gawklibpath_append @out@/lib/gawk
set "$oldOpts"