flake.*: upgrade to nixpkgs 25.05, LLVM 20

Add a work around for #4819.
This commit is contained in:
Elias Naur
2025-05-24 11:42:49 +02:00
committed by Ron Evans
parent 5c35bad590
commit 3f4f4e0ead
2 changed files with 12 additions and 9 deletions
Generated
+4 -4
View File
@@ -20,16 +20,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1728500571,
"narHash": "sha256-dOymOQ3AfNI4Z337yEwHGohrVQb4yPODCW9MDUyAc4w=",
"lastModified": 1747953325,
"narHash": "sha256-y2ZtlIlNTuVJUZCqzZAhIw5rrKP4DOSklev6c8PyCkQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d51c28603def282a24fa034bcb007e2bcb5b5dd0",
"rev": "55d1f923c480dadce40f5231feb472e81b0bab48",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.05",
"ref": "nixos-25.05",
"type": "indirect"
}
},
+8 -5
View File
@@ -34,7 +34,7 @@
inputs = {
# Use a recent stable release, but fix the version to make it reproducible.
# This version should be updated from time to time.
nixpkgs.url = "nixpkgs/nixos-24.05";
nixpkgs.url = "nixpkgs/nixos-25.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
@@ -48,11 +48,11 @@
buildInputs = [
# These dependencies are required for building tinygo (go install).
go
llvmPackages_18.llvm
llvmPackages_18.libclang
llvmPackages_20.llvm
llvmPackages_20.libclang
# Additional dependencies needed at runtime, for building and/or
# flashing.
llvmPackages_18.lld
llvmPackages_20.lld
avrdude
binaryen
# Additional dependencies needed for on-chip debugging.
@@ -67,8 +67,11 @@
# has `md5sum`).
export MD5SUM=md5sum
# Work around #4819, missing support for generic type aliases.
export GODEBUG=gotypesalias=0
# Ugly hack to make the Clang resources directory available.
export GOFLAGS="\"-ldflags=-X github.com/tinygo-org/tinygo/goenv.clangResourceDir=${llvmPackages_18.clang.cc.lib}/lib/clang/18\" -tags=llvm18"
export GOFLAGS="\"-ldflags=-X github.com/tinygo-org/tinygo/goenv.clangResourceDir=${llvmPackages_20.clang.cc.lib}/lib/clang/20\" -tags=llvm20"
'';
};
}