git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #113960 from adisbladis/geth-multi-out

go-ethereum: Make multi output

commitc670db33d75b31dda902b1aab6dde716458b1dd3 authoradisbladis <adisbladis@gmail.com> dateTue 23 Feb 2021, 07:55 (6 years ago) parent40bc4f7a47ff57
1 file changed+15−2
pkgs/applications/blockchains/go-ethereum.nix+15−2
pkgs/applications/blockchains/go-ethereum.nix+15−2
@@ -1,6 +1,12 @@
11{ lib, stdenv, buildGoModule, fetchFromGitHub, libobjc, IOKit }:
22
3−buildGoModule rec {
3+let
4+ # A list of binaries to put into separate outputs
5+ bins = [
6+ "geth"
7+ ];
8+
9+in buildGoModule rec {
410 pname = "go-ethereum";
511 version = "1.9.25";
612
@@ -16,6 +22,13 @@ buildGoModule rec {
1622
1723 doCheck = false;
1824
25+ outputs = [ "out" ] ++ bins;
26+
27+ # Move binaries to separate outputs and symlink them back to $out
28+ postInstall = lib.concatStringsSep "\n" (
29+ builtins.map (bin: "mkdir -p \$${bin}/bin && mv $out/bin/${bin} \$${bin}/bin/ && ln -s \$${bin}/bin/${bin} $out/bin/") bins
30+ );
31+
1932 subPackages = [
2033 "cmd/abidump"
2134 "cmd/abigen"
@@ -40,7 +53,7 @@ buildGoModule rec {
4053 meta = with lib; {
4154 homepage = "https://geth.ethereum.org/";
4255 description = "Official golang implementation of the Ethereum protocol";
43− license = with licenses; [ lgpl3 gpl3 ];
56+ license = with licenses; [ lgpl3Plus gpl3Plus ];
4457 maintainers = with maintainers; [ adisbladis lionello xrelkd RaghavSood ];
4558 };
4659}