Merge pull request #113960 from adisbladis/geth-multi-out

go-ethereum: Make multi output
This commit is contained in:
adisbladis 2021-02-23 07:55:11 +01:00 committed by GitHub
commit c670db33d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,12 @@
{ lib, stdenv, buildGoModule, fetchFromGitHub, libobjc, IOKit }:
buildGoModule rec {
let
# A list of binaries to put into separate outputs
bins = [
"geth"
];
in buildGoModule rec {
pname = "go-ethereum";
version = "1.9.25";
@ -16,6 +22,13 @@ buildGoModule rec {
doCheck = false;
outputs = [ "out" ] ++ bins;
# Move binaries to separate outputs and symlink them back to $out
postInstall = lib.concatStringsSep "\n" (
builtins.map (bin: "mkdir -p \$${bin}/bin && mv $out/bin/${bin} \$${bin}/bin/ && ln -s \$${bin}/bin/${bin} $out/bin/") bins
);
subPackages = [
"cmd/abidump"
"cmd/abigen"
@ -40,7 +53,7 @@ buildGoModule rec {
meta = with lib; {
homepage = "https://geth.ethereum.org/";
description = "Official golang implementation of the Ethereum protocol";
license = with licenses; [ lgpl3 gpl3 ];
license = with licenses; [ lgpl3Plus gpl3Plus ];
maintainers = with maintainers; [ adisbladis lionello xrelkd RaghavSood ];
};
}