From f04a15faf605f82d150b7aa7f14ecfaaa4bf4d90 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Wed, 11 Sep 2024 11:45:38 +0200 Subject: [PATCH] tinygo: 0.32.0 -> 0.33.0 --- .../compilers/tinygo/0001-GNUmakefile.patch | 24 ++++--------------- pkgs/development/compilers/tinygo/default.nix | 6 ++--- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/pkgs/development/compilers/tinygo/0001-GNUmakefile.patch b/pkgs/development/compilers/tinygo/0001-GNUmakefile.patch index 4bfefe1aeaa2..db4feeb9af66 100644 --- a/pkgs/development/compilers/tinygo/0001-GNUmakefile.patch +++ b/pkgs/development/compilers/tinygo/0001-GNUmakefile.patch @@ -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) -@@ -816,9 +811,8 @@ endif +@@ -848,9 +843,8 @@ endif wasmtest: $(GO) test ./tests/wasm @@ -24,15 +24,7 @@ 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 -@@ -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 +@@ -871,7 +865,6 @@ build/release: tinygo gen-device wasi-libc $(if $(filter 1,$(USE_SYSTEM_BINARYEN ifneq ($(USE_SYSTEM_BINARYEN),1) @cp -p build/wasm-opt$(EXE) build/release/tinygo/bin endif @@ -40,24 +32,16 @@ diff --git a/GNUmakefile b/GNUmakefile @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 -@@ -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 +@@ -927,8 +920,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 - @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 @cp -rp src build/release/tinygo/src @cp -rp targets build/release/tinygo/targets -- ./build/release/tinygo/bin/tinygo build-library -target=cortex-m0 -o build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0/compiler-rt compiler-rt -- ./build/release/tinygo/bin/tinygo build-library -target=cortex-m0plus -o build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0plus/compiler-rt compiler-rt -- ./build/release/tinygo/bin/tinygo build-library -target=cortex-m4 -o build/release/tinygo/pkg/thumbv7em-unknown-unknown-eabi-cortex-m4/compiler-rt compiler-rt -- ./build/release/tinygo/bin/tinygo build-library -target=cortex-m0 -o build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0/picolibc picolibc -- ./build/release/tinygo/bin/tinygo build-library -target=cortex-m0plus -o build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0plus/picolibc picolibc -- ./build/release/tinygo/bin/tinygo build-library -target=cortex-m4 -o build/release/tinygo/pkg/thumbv7em-unknown-unknown-eabi-cortex-m4/picolibc picolibc - release: - tar -czf build/release.tar.gz -C build/release tinygo -- 2.37.2 diff --git a/pkgs/development/compilers/tinygo/default.nix b/pkgs/development/compilers/tinygo/default.nix index 751da950005d..a32e516633a8 100644 --- a/pkgs/development/compilers/tinygo/default.nix +++ b/pkgs/development/compilers/tinygo/default.nix @@ -28,13 +28,13 @@ in buildGoModule rec { pname = "tinygo"; - version = "0.32.0"; + version = "0.33.0"; src = fetchFromGitHub { owner = "tinygo-org"; repo = "tinygo"; rev = "v${version}"; - hash = "sha256-ehXkYOMQz6zEmofK+3ajwxLK9vIRZava/F3Ki5jTzYo="; + hash = "sha256-YqjMk7EF/fyOhsMLcG56FGHfOZSdaFhUbiiHk+SXajY="; fetchSubmodules = true; # The public hydra server on `hydra.nixos.org` is configured with # `max_output_size` of 3GB. The purpose of this `postFetch` step @@ -45,7 +45,7 @@ buildGoModule rec { ''; }; - vendorHash = "sha256-rJ8AfJkIpxDkk+9Tf7ORnn7ueJB1kjJUBiLMDV5tias="; + vendorHash = "sha256-cTqrvh0w3KQg3P1lCfAez0kqAMBJHQbqS3sx8uqGvEs="; patches = [ ./0001-GNUmakefile.patch