From e8c3c99049943a1e2070b146b0043fee73f9f7bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Kr=C3=BCger?= Date: Thu, 5 Dec 2024 12:00:26 +0000 Subject: [PATCH 1/2] Nix: Upgrade `nixpkgs` --- default.nix | 2 +- flake.lock | 19 +++++++++---------- flake.nix | 2 +- shell.nix | 2 +- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/default.nix b/default.nix index 1535c8082ef8..09a46c57509d 100644 --- a/default.nix +++ b/default.nix @@ -6,7 +6,7 @@ overlays = pkgs.callPackage ./nix/overlays.nix {}; - packageSet = pkgs.opamPackages.overrideScope' (pkgs.lib.composeManyExtensions [ + packageSet = pkgs.opamPackages.overrideScope (pkgs.lib.composeManyExtensions [ # Set the opam-repository which has the package descriptions. (final: prev: { repository = prev.repository.override {src = sources.opam-repository;}; diff --git a/flake.lock b/flake.lock index 0183fddfbe45..628d2b938afd 100644 --- a/flake.lock +++ b/flake.lock @@ -52,27 +52,26 @@ }, "nixpkgs": { "locked": { - "lastModified": 1717179513, - "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=", + "lastModified": 1733409684, + "narHash": "sha256-Kg8bvWdJ1u/IH8Ro/RGlG5mvAsqnC3VnlsgjIG/FtwQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0", + "rev": "4bd660accd40798001cb010e0f7f85903bd61c09", "type": "github" }, "original": { "owner": "NixOS", - "ref": "24.05", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1688587528, - "narHash": "sha256-a1WlbVZyFtXVwqU/Ut+tl8aTgexp/GKloQtGA1Hfwjw=", + "lastModified": 1733413205, + "narHash": "sha256-J/Mr9HW5kT+pfOQoXF6U4a8NdPr/yKqTttkjaut4a64=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "08c696c8d702e98d6693efea6d0be94b54849a16", + "rev": "7822cb34f86bcdd0b9f31f2955062216857a6757", "type": "github" }, "original": { @@ -106,11 +105,11 @@ ] }, "locked": { - "lastModified": 1728662094, - "narHash": "sha256-tOAquEaPr15wNWbfsxNqV6s6oCfC0yQvC5D5MRKm+ig=", + "lastModified": 1733485420, + "narHash": "sha256-8tdWH9ojaXR95yvskNO62ugSMpZdsOX/ipU0rPPWsok=", "owner": "vapourismo", "repo": "opam-nix-integration", - "rev": "576bfd60b8fc1cf548ae71b842496a15a797f4fd", + "rev": "698b636dc194511a818bdf9ba2f9d5639e268bea", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 10b625aecfc5..8618029db0ba 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ # continue to work in the future. { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/24.05"; + nixpkgs.url = "github:NixOS/nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; opam-nix-integration = { url = "github:vapourismo/opam-nix-integration"; diff --git a/shell.nix b/shell.nix index 1595743a898c..ed961721b1e7 100644 --- a/shell.nix +++ b/shell.nix @@ -30,7 +30,7 @@ src = null; }); - devPackageSet = pkgs.opamPackages.overrideScope' ( + devPackageSet = pkgs.opamPackages.overrideScope ( pkgs.lib.composeManyExtensions [ # Set the opam-repository which has the package descriptions. (final: prev: { -- GitLab From ef50a6ca861d90a6782fc2737d50d35bd07569cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Kr=C3=BCger?= Date: Thu, 5 Dec 2024 12:00:26 +0000 Subject: [PATCH 2/2] Nix: Use Musl-style toolchain for RISC-V --- nix/sources.nix | 2 +- shell.nix | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nix/sources.nix b/nix/sources.nix index 348f37913acf..d32be0abf5d4 100644 --- a/nix/sources.nix +++ b/nix/sources.nix @@ -46,7 +46,7 @@ in }; riscv64Pkgs = import pkgs-src { - crossSystem.config = "riscv64-unknown-linux-gnu"; + crossSystem.config = "riscv64-unknown-linux-musl"; }; opam-repository = pkgs.callPackage ./opam-repo.nix {}; diff --git a/shell.nix b/shell.nix index ed961721b1e7..6781fe766155 100644 --- a/shell.nix +++ b/shell.nix @@ -13,7 +13,7 @@ pkgs.wabt # Cross-compilation for RISC-V - sources.riscv64Pkgs.clangStdenv.cc + sources.pkgs.pkgsCross.riscv64.pkgsStatic.stdenv.cc # Formatter/LSP for Cargo manifests (and TOML in general) pkgs.taplo @@ -127,6 +127,7 @@ in # targeting other architectures. CC_wasm32_unknown_unknown = "${clangNoArch}/bin/clang"; CC_riscv64gc_unknown_linux_gnu = "${clangNoArch}/bin/clang"; + CC_riscv64gc_unknown_linux_musl = "${clangNoArch}/bin/clang"; CC_riscv64gc_unknown_none_elf = "${clangNoArch}/bin/clang"; CC_riscv64gc_unknown_hermit = "${clangNoArch}/bin/clang"; } -- GitLab