containerd: use removeReferencesTo

This commit is contained in:
Joachim Fasting 2017-03-11 15:07:56 +01:00
parent 061ff21bbf
commit 0c6a1eaa43
No known key found for this signature in database
GPG Key ID: 7544761007FE4E08

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub
{ stdenv, lib, fetchFromGitHub, removeReferencesTo
, go, libapparmor, apparmor-parser, libseccomp }:
with lib;
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
sha256 = "16p8kixhzdx8afpciyf3fjx43xa3qrqpx06r5aqxdrqviw851zh8";
};
buildInputs = [ go ];
buildInputs = [ removeReferencesTo go ];
preBuild = ''
ln -s $(pwd) vendor/src/github.com/docker/containerd
@ -26,10 +26,7 @@ stdenv.mkDerivation rec {
'';
preFixup = ''
# remove references to go compiler
while read file; do
sed -ri "s,${go},$(echo "${go}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" $file
done < <(find $out/bin -type f 2>/dev/null)
find $out -type f -exec remove-references-to -t ${go} '{}' +
'';
meta = {