Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions pkgs/development/compilers/tinygo/0001-GNUmakefile.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/GNUmakefile b/GNUmakefile
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -14,11 +14,6 @@ LLVM_VERSIONS = 18 17 16 15
@@ -14,11 +14,6 @@ LLVM_VERSIONS = 19 18 17 16 15
errifempty = $(if $(1),$(1),$(error $(2)))
detect = $(shell which $(call errifempty,$(firstword $(foreach p,$(2),$(shell command -v $(p) 2> /dev/null && echo $(p)))),failed to locate $(1) at any of: $(2)))
toolSearchPathsVersion = $(1)-$(2)
Expand All @@ -13,26 +13,27 @@ diff --git a/GNUmakefile b/GNUmakefile
# First search for a custom built copy, then move on to explicitly version-tagged binaries, then just see if the tool is in path with its normal name.
findLLVMTool = $(call detect,$(1),$(abspath llvm-build/bin/$(1)) $(foreach ver,$(LLVM_VERSIONS),$(call toolSearchPathsVersion,$(1),$(ver))) $(1))
CLANG ?= $(call findLLVMTool,clang)
@@ -848,9 +843,8 @@ endif
@@ -939,10 +934,9 @@ endif
wasmtest:
$(GO) test ./tests/wasm

-build/release: tinygo gen-device wasi-libc $(if $(filter 1,$(USE_SYSTEM_BINARYEN)),,binaryen)
+build/release:
@mkdir -p build/release/tinygo/bin
@mkdir -p build/release/tinygo/lib/bdwgc
- @mkdir -p build/release/tinygo/lib/clang/include
@mkdir -p build/release/tinygo/lib/CMSIS/CMSIS
@mkdir -p build/release/tinygo/lib/macos-minimal-sdk
@mkdir -p build/release/tinygo/lib/mingw-w64/mingw-w64-crt/lib-common
@@ -871,7 +865,6 @@ build/release: tinygo gen-device wasi-libc $(if $(filter 1,$(USE_SYSTEM_BINARYEN
ifneq ($(USE_SYSTEM_BINARYEN),1)
@@ -964,7 +958,6 @@ ifneq ($(USE_SYSTEM_BINARYEN),1)
@cp -p build/wasm-opt$(EXE) build/release/tinygo/bin
endif
@cp -rp lib/bdwgc/* build/release/tinygo/lib/bdwgc
- @cp -p $(abspath $(CLANG_SRC))/lib/Headers/*.h build/release/tinygo/lib/clang/include
@cp -rp lib/CMSIS/CMSIS/Include build/release/tinygo/lib/CMSIS/CMSIS
@cp -rp lib/CMSIS/README.md build/release/tinygo/lib/CMSIS
@cp -rp lib/macos-minimal-sdk/* build/release/tinygo/lib/macos-minimal-sdk
@@ -927,8 +920,7 @@ endif
@@ -1026,8 +1019,7 @@ endif
@cp -rp lib/wasi-libc/libc-top-half/musl/include build/release/tinygo/lib/wasi-libc/libc-top-half/musl
@cp -rp lib/wasi-libc/sysroot build/release/tinygo/lib/wasi-libc/sysroot
@cp -rp lib/wasi-cli/wit build/release/tinygo/lib/wasi-cli/wit
Expand All @@ -43,5 +44,5 @@ diff --git a/GNUmakefile b/GNUmakefile
@cp -rp targets build/release/tinygo/targets

--
2.37.2
2.48.1

6 changes: 3 additions & 3 deletions pkgs/development/compilers/tinygo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ in

buildGoModule rec {
pname = "tinygo";
version = "0.35.0";
version = "0.37.0";

src = fetchFromGitHub {
owner = "tinygo-org";
repo = "tinygo";
rev = "v${version}";
hash = "sha256-oy6797o3lMMRJ+bPHY59Bv7mX25aEwBn4OslAohfY2g=";
hash = "sha256-I/9JXjt6aF/80Mh3iRgUYXv4l+m3XIpmKsIBviOuWCo=";
fetchSubmodules = true;
# The public hydra server on `hydra.nixos.org` is configured with
# `max_output_size` of 3GB. The purpose of this `postFetch` step
Expand All @@ -51,7 +51,7 @@ buildGoModule rec {
'';
};

vendorHash = "sha256-aY1gX++Dc5/G6VFXnP7sBdekk2IKHlenOC0erlB/Quw=";
vendorHash = "sha256-juADakh+s8oEY9UXUwxknvVeL1TgB/zRi8Xtzt/4qPA=";

patches = [
./0001-GNUmakefile.patch
Expand Down
4 changes: 1 addition & 3 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6676,9 +6676,7 @@ with pkgs;

tinycc = darwin.apple_sdk_11_0.callPackage ../development/compilers/tinycc { };

tinygo = callPackage ../development/compilers/tinygo {
llvmPackages = llvmPackages_18;
};
tinygo = callPackage ../development/compilers/tinygo { };

urweb = callPackage ../development/compilers/urweb {
icu = icu67;
Expand Down