go-ethereum: Make multi output
Put geth in a separate output and prepare the expression for more derivation outputs. For now we only have a separate `geth` output since that's the most relevant.
This commit is contained in:
parent
fb6f9b7eb0
commit
3546114189
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user