From 54b6c586a615bb7c615092874ce2e4963a12e3b1 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Fri, 7 Dec 2018 21:13:42 +0000 Subject: [PATCH 1/2] cni: Remove go from runtime closure --- pkgs/applications/networking/cluster/cni/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/cni/default.nix b/pkgs/applications/networking/cluster/cni/default.nix index 0f232772f076..130ccdc83111 100644 --- a/pkgs/applications/networking/cluster/cni/default.nix +++ b/pkgs/applications/networking/cluster/cni/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, go }: +{ stdenv, fetchFromGitHub, go, removeReferencesTo }: stdenv.mkDerivation rec { name = "cni-${version}"; @@ -11,7 +11,9 @@ stdenv.mkDerivation rec { sha256 = "00ajs2r5r2z3l0vqwxrcwhjfc9px12qbcv5vnvs2mdipvvls1y2y"; }; - buildInputs = [ go ]; + buildInputs = [ removeReferencesTo go ]; + + GOCACHE = "off"; buildPhase = '' patchShebangs build.sh @@ -23,6 +25,10 @@ stdenv.mkDerivation rec { mv bin/cnitool $out/bin ''; + preFixup = '' + find $out/bin -type f -exec remove-references-to -t ${go} '{}' + + ''; + meta = with stdenv.lib; { description = "Container Network Interface - networking for Linux containers"; license = licenses.asl20; From 2a7b82ca449c98eaba1bbb7870d2bbfcc1da71be Mon Sep 17 00:00:00 2001 From: adisbladis Date: Fri, 7 Dec 2018 21:14:03 +0000 Subject: [PATCH 2/2] cni-plugins: Remove go from runtime closure --- pkgs/applications/networking/cluster/cni/plugins.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/cni/plugins.nix b/pkgs/applications/networking/cluster/cni/plugins.nix index 148e98ced80c..27e0a038310b 100644 --- a/pkgs/applications/networking/cluster/cni/plugins.nix +++ b/pkgs/applications/networking/cluster/cni/plugins.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, go }: +{ stdenv, lib, fetchFromGitHub, go, removeReferencesTo }: stdenv.mkDerivation rec { name = "cni-plugins-${version}"; @@ -11,7 +11,9 @@ stdenv.mkDerivation rec { sha256 = "1sywllwnr6lc812sgkqjdd3y10r82shl88dlnwgnbgzs738q2vp2"; }; - buildInputs = [ go ]; + buildInputs = [ removeReferencesTo go ]; + + GOCACHE = "off"; buildPhase = '' patchShebangs build.sh @@ -23,6 +25,10 @@ stdenv.mkDerivation rec { mv bin/* $out/bin ''; + preFixup = '' + find $out/bin -type f -exec remove-references-to -t ${go} '{}' + + ''; + meta = with lib; { description = "Some standard networking plugins, maintained by the CNI team"; homepage = https://github.com/containernetworking/plugins;