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
71
pkgs/tools/misc/toybox/default.nix
Normal file
71
pkgs/tools/misc/toybox/default.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
stdenv, lib, fetchFromGitHub, which,
|
||||
buildPackages,
|
||||
enableStatic ? stdenv.hostPlatform.isStatic,
|
||||
enableMinimal ? false,
|
||||
extraConfig ? ""
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "toybox";
|
||||
version = "0.8.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "landley";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-NbONJten685wekfCwbOOQxdS3B2/Ljfp/jdTa7D4U+M=";
|
||||
};
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ]; # needed for cross
|
||||
buildInputs = lib.optionals (enableStatic && stdenv.cc.libc ? static)
|
||||
[ stdenv.cc.libc stdenv.cc.libc.static ];
|
||||
|
||||
postPatch = "patchShebangs .";
|
||||
|
||||
inherit extraConfig;
|
||||
passAsFile = [ "extraConfig" ];
|
||||
|
||||
configurePhase = ''
|
||||
make ${if enableMinimal then
|
||||
"allnoconfig"
|
||||
else
|
||||
if stdenv.isFreeBSD then
|
||||
"freebsd_defconfig"
|
||||
else
|
||||
if stdenv.isDarwin then
|
||||
"macos_defconfig"
|
||||
else
|
||||
"defconfig"
|
||||
}
|
||||
|
||||
cat $extraConfigPath .config > .config-
|
||||
mv .config- .config
|
||||
|
||||
make oldconfig
|
||||
'';
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)/bin" ] ++ lib.optional enableStatic "LDFLAGS=--static";
|
||||
|
||||
installTargets = [ "install_flat" ];
|
||||
|
||||
# tests currently (as of 0.8.0) get stuck in an infinite loop...
|
||||
# ...this is fixed in latest git, so doCheck can likely be enabled for next release
|
||||
# see https://github.com/landley/toybox/commit/b928ec480cd73fd83511c0f5ca786d1b9f3167c3
|
||||
#doCheck = true;
|
||||
checkInputs = [ which ]; # used for tests with checkFlags = [ "DEBUG=true" ];
|
||||
checkTarget = "tests";
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Lightweight implementation of some Unix command line utilities";
|
||||
homepage = "https://landley.net/toybox/";
|
||||
license = licenses.bsd0;
|
||||
platforms = with platforms; linux ++ darwin ++ freebsd;
|
||||
# https://github.com/NixOS/nixpkgs/issues/101229
|
||||
broken = stdenv.isDarwin;
|
||||
maintainers = with maintainers; [ hhm ];
|
||||
priority = 10;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue