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
60
pkgs/development/tools/build-managers/gn/generic.nix
Normal file
60
pkgs/development/tools/build-managers/gn/generic.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{ stdenv, lib, fetchgit, darwin, writeText
|
||||
, ninja, python3
|
||||
, ...
|
||||
}:
|
||||
|
||||
{ rev, revNum, version, sha256 }:
|
||||
|
||||
let
|
||||
revShort = builtins.substring 0 7 rev;
|
||||
lastCommitPosition = writeText "last_commit_position.h" ''
|
||||
#ifndef OUT_LAST_COMMIT_POSITION_H_
|
||||
#define OUT_LAST_COMMIT_POSITION_H_
|
||||
|
||||
#define LAST_COMMIT_POSITION_NUM ${revNum}
|
||||
#define LAST_COMMIT_POSITION "${revNum} (${revShort})"
|
||||
|
||||
#endif // OUT_LAST_COMMIT_POSITION_H_
|
||||
'';
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "gn-unstable";
|
||||
inherit version;
|
||||
|
||||
src = fetchgit {
|
||||
# Note: The TAR-Archives (+archive/${rev}.tar.gz) are not deterministic!
|
||||
url = "https://gn.googlesource.com/gn";
|
||||
inherit rev sha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ ninja python3 ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [
|
||||
libobjc
|
||||
cctools
|
||||
|
||||
# frameworks
|
||||
ApplicationServices
|
||||
Foundation
|
||||
AppKit
|
||||
]);
|
||||
|
||||
buildPhase = ''
|
||||
python build/gen.py --no-last-commit-position
|
||||
ln -s ${lastCommitPosition} out/last_commit_position.h
|
||||
ninja -j $NIX_BUILD_CORES -C out gn
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -vD out/gn "$out/bin/gn"
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A meta-build system that generates build files for Ninja";
|
||||
homepage = "https://gn.googlesource.com/gn";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ stesie matthewbauer primeos ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue