From 35461141898fcf83892fbbf607bfff0284118cf9 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Mon, 22 Feb 2021 00:27:17 +0100 Subject: [PATCH 1/2] 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. --- pkgs/applications/blockchains/go-ethereum.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/blockchains/go-ethereum.nix b/pkgs/applications/blockchains/go-ethereum.nix index 776253ac9cd..2513303cf29 100644 --- a/pkgs/applications/blockchains/go-ethereum.nix +++ b/pkgs/applications/blockchains/go-ethereum.nix @@ -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" From a47ff5780ee6fdf59cc645b4b295775acd5261b7 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Mon, 22 Feb 2021 00:54:19 +0100 Subject: [PATCH 2/2] go-ethereum: Clarify lgpl3/gpl3 licenses --- pkgs/applications/blockchains/go-ethereum.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/blockchains/go-ethereum.nix b/pkgs/applications/blockchains/go-ethereum.nix index 2513303cf29..dd3904b27cb 100644 --- a/pkgs/applications/blockchains/go-ethereum.nix +++ b/pkgs/applications/blockchains/go-ethereum.nix @@ -53,7 +53,7 @@ in 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 ]; }; }