about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorAyke van Laethem <aykevanlaethem@gmail.com>2023-10-20 17:54:54 +0200
committerAyke van Laethem <aykevanlaethem@gmail.com>2024-03-04 20:17:45 +0100
commitc8f5054348a4d7670f565633f9c920e4709e383c (patch)
treedb2130eda9a566a8e75619d88f579332d3a53f21 /pkgs/development/compilers
parent044b2be6a1a39874a5081dc5fdee2e90e6e31e66 (diff)
downloadnixlib-c8f5054348a4d7670f565633f9c920e4709e383c.tar
nixlib-c8f5054348a4d7670f565633f9c920e4709e383c.tar.gz
nixlib-c8f5054348a4d7670f565633f9c920e4709e383c.tar.bz2
nixlib-c8f5054348a4d7670f565633f9c920e4709e383c.tar.lz
nixlib-c8f5054348a4d7670f565633f9c920e4709e383c.tar.xz
nixlib-c8f5054348a4d7670f565633f9c920e4709e383c.tar.zst
nixlib-c8f5054348a4d7670f565633f9c920e4709e383c.zip
tinygo: move runtime dependencies out of bootstrapTools
This looks cleaner to me, although I don't know the usual Nix convention
for this sort of thing.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/tinygo/default.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/development/compilers/tinygo/default.nix b/pkgs/development/compilers/tinygo/default.nix
index bbd9ad44cca9..9a2739f1b74b 100644
--- a/pkgs/development/compilers/tinygo/default.nix
+++ b/pkgs/development/compilers/tinygo/default.nix
@@ -25,10 +25,6 @@ let
   bootstrapTools = runCommand "tinygo-bootstap-tools" { } ''
     mkdir -p $out
     ln -s ${lib.getBin clang.cc}/bin/clang $out/clang-${llvmMajor}
-    ln -s ${lib.getBin lld}/bin/ld.lld $out/ld.lld-${llvmMajor}
-    ln -s ${lib.getBin lld}/bin/wasm-ld $out/wasm-ld-${llvmMajor}
-    # GDB upstream does not support ARM darwin
-    ${lib.optionalString (!(stdenv.isDarwin && stdenv.isAarch64)) "ln -s ${gdb}/bin/gdb $out/gdb-multiarch" }
   '';
 in
 
@@ -51,7 +47,7 @@ buildGoModule rec {
   ];
 
   nativeCheckInputs = [ binaryen ];
-  nativeBuildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper lld ];
   buildInputs = [ llvm clang.cc ]
     ++ lib.optionals stdenv.isDarwin [ xar ];
 
@@ -105,13 +101,17 @@ buildGoModule rec {
     make ''${tinygoTests[@]} TINYGO="$(pwd)/build/tinygo" MD5SUM=md5sum XTENSA=0
   '';
 
+  # GDB upstream does not support ARM darwin
+  runtimeDeps = [ go clang.cc lld avrdude openocd binaryen ]
+    ++ lib.optionals (!(stdenv.isDarwin && stdenv.isAarch64)) [ gdb ];
+
   installPhase = ''
     runHook preInstall
 
     make build/release
 
     wrapProgram $out/bin/tinygo \
-      --prefix PATH : ${lib.makeBinPath [ go avrdude openocd binaryen ]}:${bootstrapTools}
+      --prefix PATH : ${lib.makeBinPath runtimeDeps }
 
     runHook postInstall
   '';