|
15 | 15 |
|
16 | 16 | flake-utils.follows = "llvm-backend/utils"; |
17 | 17 |
|
18 | | - uv2nix.url = "github:pyproject-nix/uv2nix/680e2f8e637bc79b84268949d2f2b2f5e5f1d81c"; |
19 | | - # stale nixpkgs is missing the alias `lib.match` -> `builtins.match` |
20 | | - # therefore point uv2nix to a patched nixpkgs, which introduces this alias |
21 | | - # this is a temporary solution until nixpkgs us up-to-date again |
22 | | - uv2nix.inputs.nixpkgs.url = "github:runtimeverification/nixpkgs/libmatch"; |
| 18 | + uv2nix.url = "github:pyproject-nix/uv2nix/be511633027f67beee87ab499f7b16d0a2f7eceb"; |
| 19 | + # uv2nix requires a newer version of nixpkgs |
| 20 | + # therefore, we pin uv2nix specifically to a newer version of nixpkgs |
| 21 | + # until we replaced our stale version of nixpkgs with an upstream one as well |
| 22 | + # but also uv2nix requires us to call it with `callPackage`, so we add stuff |
| 23 | + # from the newer nixpkgs to our stale nixpkgs via an overlay |
| 24 | + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; |
| 25 | + uv2nix.inputs.nixpkgs.follows = "nixpkgs-unstable"; |
23 | 26 | # uv2nix.inputs.nixpkgs.follows = "nixpkgs"; |
24 | 27 | pyproject-build-systems.url = "github:pyproject-nix/build-system-pkgs/7dba6dbc73120e15b558754c26024f6c93015dd7"; |
25 | 28 | pyproject-build-systems = { |
|
31 | 34 | }; |
32 | 35 |
|
33 | 36 | outputs = { self, nixpkgs, flake-utils, rv-nix-tools, haskell-backend |
34 | | - , llvm-backend, pyproject-nix, pyproject-build-systems , uv2nix }: |
| 37 | + , llvm-backend, pyproject-nix, pyproject-build-systems, uv2nix, nixpkgs-unstable }: |
35 | 38 | let |
36 | 39 | # due to the nixpkgs that we use in this flake being outdated, uv is also heavily outdated |
37 | 40 | # we can instead use the binary release of uv provided by uv2nix for now |
|
190 | 193 | "aarch64-darwin" |
191 | 194 | ] (system: |
192 | 195 | let |
| 196 | + pkgs-unstable = import nixpkgs-unstable { |
| 197 | + inherit system; |
| 198 | + }; |
| 199 | + # for uv2nix, remove this once we updated to a newer version of nixpkgs |
| 200 | + staleNixpkgsOverlay = final: prev: { |
| 201 | + inherit (pkgs-unstable) replaceVars; |
| 202 | + }; |
193 | 203 | pkgs = nixpkgs.lib.trivial.warnIf (llvm-backend.inputs.nixpkgs.rev |
194 | 204 | != haskell-backend.inputs.nixpkgs.rev) |
195 | 205 | "The version of nixpkgs in Haskell backend and LLVM backend has diverged!" |
|
200 | 210 | config.allowBroken = system == "aarch64-darwin"; |
201 | 211 | overlays = |
202 | 212 | [ (final: prev: { llvm-backend-build-type = "FastBuild"; }) ] |
203 | | - ++ allOverlays; |
| 213 | + ++ allOverlays |
| 214 | + ++ [ |
| 215 | + staleNixpkgsOverlay |
| 216 | + ]; |
204 | 217 | }; |
205 | 218 |
|
206 | 219 | in rec { |
|
0 commit comments