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
43
pkgs/development/compilers/go/binary.nix
Normal file
43
pkgs/development/compilers/go/binary.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, stdenv, fetchurl, version, hashes }:
|
||||
let
|
||||
toGoKernel = platform:
|
||||
if platform.isDarwin then "darwin"
|
||||
else platform.parsed.kernel.name;
|
||||
|
||||
toGoCPU = platform: {
|
||||
"i686" = "386";
|
||||
"x86_64" = "amd64";
|
||||
"aarch64" = "arm64";
|
||||
"armv6l" = "armv6l";
|
||||
"armv7l" = "armv6l";
|
||||
"powerpc64le" = "ppc64le";
|
||||
}.${platform.parsed.cpu.name} or (throw "Unsupported CPU ${platform.parsed.cpu.name}");
|
||||
|
||||
toGoPlatform = platform: "${toGoKernel platform}-${toGoCPU platform}";
|
||||
|
||||
platform = toGoPlatform stdenv.hostPlatform;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "go-${version}-${platform}-bootstrap";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://go.dev/dl/go${version}.${platform}.tar.gz";
|
||||
sha256 = hashes.${platform} or (throw "Missing Go bootstrap hash for platform ${platform}");
|
||||
};
|
||||
|
||||
# We must preserve the signature on Darwin
|
||||
dontStrip = stdenv.hostPlatform.isDarwin;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/go $out/bin
|
||||
mv bin/* $out/bin
|
||||
cp -r . $out/share/go
|
||||
${lib.optionalString stdenv.isLinux (''
|
||||
patchelf \
|
||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
$out/bin/go
|
||||
'')}
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue