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,54 @@
{stdenv, lib, fetchurl, ocaml, findlib, ounit, expat}:
let
pname = "ocaml-expat";
testcase = fetchurl {
url = "http://www.w3.org/TR/1998/REC-xml-19980210.xml";
sha256 = "00a3gsfvlkdhmcbziqhvpvy1zmcgbcihfqwcvl6ay03zf7gvw0k1";
};
in
stdenv.mkDerivation rec {
name = "${pname}-${version}";
version = "0.9.1";
src = fetchurl {
url = "http://www.xs4all.nl/~mmzeeman/ocaml/${pname}-${version}.tar.gz";
sha256 = "16n2j3y0jc9xgqyshw9plrwqnjiz30vnpbhahmgxlidbycw8rgjz";
};
nativeBuildInputs = [ocaml findlib ];
buildInputs = [ ounit expat];
strictDeps = true;
createFindlibDestdir = true;
patches = [ ./unittest.patch ];
postPatch = ''
substituteInPlace "unittest.ml" \
--replace "/home/maas/xml-samples/REC-xml-19980210.xml.txt" "${testcase}"
substituteInPlace Makefile --replace "EXPAT_LIBDIR=/usr/local/lib" "EXPAT_LIBDIR=${expat.out}/lib" \
--replace "EXPAT_INCDIR=/usr/local/include" "EXPAT_INCDIR=${expat.dev}/include" \
--replace "gcc" "\$(CC)"
'';
dontConfigure = true; # Skip configure
buildPhase = ''
make all allopt
'';
doCheck = true;
checkTarget = "testall";
meta = {
homepage = "http://www.xs4all.nl/~mmzeeman/ocaml/";
description = "An ocaml wrapper for the Expat XML parsing library";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.roconnor ];
};
}

View file

@ -0,0 +1,35 @@
{ stdenv, lib, fetchFromGitHub, expat, ocaml, findlib, ounit }:
stdenv.mkDerivation rec {
pname = "ocaml${ocaml.version}-expat";
version = "1.1.0";
src = fetchFromGitHub {
owner = "whitequark";
repo = "ocaml-expat";
rev = "v${version}";
sha256 = "07wm9663z744ya6z2lhiz5hbmc76kkipg04j9vw9dqpd1y1f2x3q";
};
prePatch = ''
substituteInPlace Makefile --replace "gcc" "\$(CC)"
'';
nativeBuildInputs = [ ocaml findlib ];
buildInputs = [ expat ounit ];
strictDeps = true;
doCheck = lib.versionOlder ocaml.version "4.06";
checkTarget = "testall";
createFindlibDestdir = true;
meta = {
description = "OCaml wrapper for the Expat XML parsing library";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.vbgl ];
inherit (src.meta) homepage;
inherit (ocaml.meta) platforms;
};
}

View file

@ -0,0 +1,15 @@
--- old/Makefile 2005-03-13 09:00:29.000000000 -0500
+++ new/Makefile 2010-08-26 14:20:34.515785557 -0400
@@ -67,10 +67,10 @@
testall: test testopt
.PHONY: test
test: unittest
- ./unittest
+ LD_LIBRARY_PATH=. ./unittest
.PHONY: testopt
testopt: unittest.opt
- ./unittest.opt
+ LD_LIBRARY_PATH=. ./unittest.opt
unittest: all unittest.ml
$(OCAMLFIND) ocamlc -o unittest -package oUnit -ccopt -L. -linkpkg \
$(ARCHIVE) unittest.ml