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
|
|
@ -0,0 +1,52 @@
|
|||
{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gh";
|
||||
version = "2.11.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cli";
|
||||
repo = "cli";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-b00bP0usTpYr5EShyckmZ+a1Mw48payU/KllSck47fI=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-soNQXtpQ217scP606UA05+r9WIrUAMOCDBsfLKrVD+Q=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
# upstream unsets these to handle cross but it breaks our build
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "GOOS= GOARCH= GOARM= GOFLAGS= CGO_ENABLED=" ""
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
make GO_LDFLAGS="-s -w" GH_VERSION=${version} bin/gh manpages
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 bin/gh -t $out/bin
|
||||
installManPage share/man/*/*.[1-9]
|
||||
|
||||
for shell in bash fish zsh; do
|
||||
$out/bin/gh completion -s $shell > gh.$shell
|
||||
installShellCompletion gh.$shell
|
||||
done
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# fails with `unable to find git executable in PATH`
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "GitHub CLI tool";
|
||||
homepage = "https://cli.github.com/";
|
||||
changelog = "https://github.com/cli/cli/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ zowoq ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue