Skip to content

Commit

Permalink
Merge pull request NixOS#332300 from aykevl/tinygo-v0.32.0
Browse files Browse the repository at this point in the history
tinygo: 0.31.2 -> 0.32.0
  • Loading branch information
drupol authored Aug 5, 2024
2 parents aaab543 + d07fa3c commit 95c0089
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
26 changes: 13 additions & 13 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 = 14 13 12 11
@@ -14,11 +14,6 @@ LLVM_VERSIONS = 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,7 +13,7 @@ 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)
@@ -707,9 +702,8 @@ endif
@@ -816,9 +811,8 @@ endif
wasmtest:
$(GO) test ./tests/wasm

Expand All @@ -24,26 +24,26 @@ diff --git a/GNUmakefile b/GNUmakefile
@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
@@ -721,15 +715,8 @@ build/release: tinygo gen-device wasi-libc $(if $(filter 1,$(USE_SYSTEM_BINARYEN
@mkdir -p build/release/tinygo/lib/picolibc/newlib/libc
@mkdir -p build/release/tinygo/lib/picolibc/newlib/libm
@mkdir -p build/release/tinygo/lib/wasi-libc
@@ -832,15 +826,11 @@ build/release: tinygo gen-device wasi-libc $(if $(filter 1,$(USE_SYSTEM_BINARYEN
@mkdir -p build/release/tinygo/lib/wasi-libc/libc-bottom-half/headers
@mkdir -p build/release/tinygo/lib/wasi-libc/libc-top-half/musl/arch
@mkdir -p build/release/tinygo/lib/wasi-libc/libc-top-half/musl/src
- @mkdir -p build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0
- @mkdir -p build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0plus
- @mkdir -p build/release/tinygo/pkg/thumbv7em-unknown-unknown-eabi-cortex-m4
@echo copying source files
@cp -p build/tinygo$(EXE) build/release/tinygo/bin
-ifneq ($(USE_SYSTEM_BINARYEN),1)
- @cp -p build/wasm-opt$(EXE) build/release/tinygo/bin
-endif
ifneq ($(USE_SYSTEM_BINARYEN),1)
@cp -p build/wasm-opt$(EXE) build/release/tinygo/bin
endif
- @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
@@ -768,16 +755,9 @@ endif
@cp -rp lib/picolibc/newlib/libm/common build/release/tinygo/lib/picolibc/newlib/libm
@cp -rp lib/picolibc-stdio.c build/release/tinygo/lib
@cp -rp lib/wasi-libc/sysroot build/release/tinygo/lib/wasi-libc/sysroot
@@ -891,16 +881,9 @@ endif
@cp -rp lib/wasi-libc/libc-top-half/musl/src/string build/release/tinygo/lib/wasi-libc/libc-top-half/musl/src
@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 llvm-project/compiler-rt/lib/builtins build/release/tinygo/lib/compiler-rt-builtins
- @cp -rp llvm-project/compiler-rt/LICENSE.TXT build/release/tinygo/lib/compiler-rt-builtins
+ @cp -rp lib/compiler-rt-builtins build/release/tinygo/lib/compiler-rt-builtins
Expand Down
8 changes: 4 additions & 4 deletions pkgs/development/compilers/tinygo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ in

buildGoModule rec {
pname = "tinygo";
version = "0.31.2";
version = "0.32.0";

src = fetchFromGitHub {
owner = "tinygo-org";
repo = "tinygo";
rev = "v${version}";
hash = "sha256-e0zXxIdAtJZXJdP/S6lHRnPm5Rsf638Fhox8XcqOWrk=";
hash = "sha256-zoXruGoWitx6kietF3HKTYCtUrXp5SOrf2FEGgVPzkQ=";
fetchSubmodules = true;
};

vendorHash = "sha256-HZiyAgsTEBQv+Qp0T9RXTV1lkxvIGh7Q45rd45cfvjo=";
vendorHash = "sha256-rJ8AfJkIpxDkk+9Tf7ORnn7ueJB1kjJUBiLMDV5tias=";

patches = [
./0001-GNUmakefile.patch
Expand Down Expand Up @@ -110,7 +110,7 @@ buildGoModule rec {
installPhase = ''
runHook preInstall
make build/release
make build/release USE_SYSTEM_BINARYEN=1
wrapProgram $out/bin/tinygo \
--prefix PATH : ${lib.makeBinPath runtimeDeps }
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16428,7 +16428,7 @@ with pkgs;
tinycc = darwin.apple_sdk_11_0.callPackage ../development/compilers/tinycc { };

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

tinyscheme = callPackage ../development/interpreters/tinyscheme { };
Expand Down

0 comments on commit 95c0089

Please sign in to comment.