diff --git a/pkgs/bazelisk-env/default.nix b/pkgs/bazelisk-env/default.nix index 62e928b..56e2dd2 100644 --- a/pkgs/bazelisk-env/default.nix +++ b/pkgs/bazelisk-env/default.nix @@ -27,7 +27,7 @@ buildFHSUserEnv { targetPkgs = pkgs: with pkgs; [ # include no more than this # crt1.o is already taken care of by buildFHSEnv.nix - gcc_multi.out + (pkgs.callPackage ./gcc_multi_patched.nix {}) binutils pkg-config @@ -38,6 +38,7 @@ buildFHSUserEnv { which python3 patch + curl # debugging iputils diff --git a/pkgs/bazelisk-env/gcc_multi_patched.nix b/pkgs/bazelisk-env/gcc_multi_patched.nix new file mode 100644 index 0000000..efcbb0a --- /dev/null +++ b/pkgs/bazelisk-env/gcc_multi_patched.nix @@ -0,0 +1,23 @@ +{ + gcc_multi, + stdenv, +}: + +stdenv.mkDerivation { + name = gcc_multi.name + "-fhs"; + + src = gcc_multi; + + buildPhase = '' + find . -type f -exec sed -i \ + -e s,${gcc_multi.out},$out,g \ + -e s,${gcc_multi.cc.lib},,g \ + -e s,${gcc_multi.libc},,g \ + -e s,${gcc_multi.libc.dev},/usr,g \ + {} + + ''; + + installPhase = '' + cp -rp . $out + ''; +}