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,45 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "memorymapping";
version = "unstable-2014-02-20";
src = fetchFromGitHub {
owner = "NimbusKit";
repo = "memorymapping";
rev = "fc285afe13cb9d56a40c647b8ed6d6bd40636af7";
sha256 = "sha256-9u/QvK9TDsKxcubINH2OAbx5fXXkKF0+YT7LoLDaF0M=";
};
dontConfigure = true;
buildPhase = ''
runHook preBuild
$CC -c src/fmemopen.c
$AR rcs libmemorymapping.a fmemopen.o
sed -e '1i#include <stdio.h>' -i src/fmemopen.h
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -D libmemorymapping.a "$out"/lib/libmemorymapping.a
install -D src/fmemopen.h "$out"/include/fmemopen.h
runHook postInstall
'';
meta = with lib; {
homepage = "https://nimbuskit.github.io/memorymapping/";
description = "fmemopen for Mac OS and iOS";
license = licenses.asl20;
maintainers = with maintainers; [ veprbl ];
# Uses BSD-style funopen() to implement glibc-style fmemopen().
# Add more BSDs if you need to.
platforms = platforms.darwin;
broken = stdenv.isAarch64;
};
}

View file

@ -0,0 +1,6 @@
useMemorymapping () {
export NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE-}${NIX_CFLAGS_COMPILE:+ }-include fmemopen.h";
export NIX_LDFLAGS="${NIX_LDFLAGS-}${NIX_LDFLAGS:+ }-lmemorymapping";
}
postHooks+=(useMemorymapping)