|
4 | 4 | nixpkgs.url = "nixpkgs/nixos-25.05"; |
5 | 5 | flake-utils.url = "github:numtide/flake-utils"; |
6 | 6 | uv2nix.url = "github:pyproject-nix/uv2nix/680e2f8e637bc79b84268949d2f2b2f5e5f1d81c"; |
7 | | - # stale nixpkgs is missing the alias `lib.match` -> `builtins.match` |
8 | | - # therefore point uv2nix to a patched nixpkgs, which introduces this alias |
9 | | - # this is a temporary solution until nixpkgs us up-to-date again |
10 | | - uv2nix.inputs.nixpkgs.url = "github:runtimeverification/nixpkgs/libmatch"; |
11 | | - # inputs.nixpkgs.follows = "nixpkgs"; |
| 7 | + # uv2nix requires a newer version of nixpkgs |
| 8 | + # therefore, we pin uv2nix specifically to a newer version of nixpkgs |
| 9 | + # until we replaced our stale version of nixpkgs with an upstream one as well |
| 10 | + # but also uv2nix requires us to call it with `callPackage`, so we add stuff |
| 11 | + # from the newer nixpkgs to our stale nixpkgs via an overlay |
| 12 | + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; |
| 13 | + uv2nix.inputs.nixpkgs.follows = "nixpkgs-unstable"; |
| 14 | + # uv2nix.inputs.nixpkgs.follows = "nixpkgs"; |
12 | 15 | pyproject-build-systems.url = "github:pyproject-nix/build-system-pkgs/7dba6dbc73120e15b558754c26024f6c93015dd7"; |
13 | 16 | pyproject-build-systems = { |
14 | 17 | inputs.nixpkgs.follows = "uv2nix/nixpkgs"; |
|
17 | 20 | }; |
18 | 21 | pyproject-nix.follows = "uv2nix/pyproject-nix"; |
19 | 22 | }; |
20 | | - outputs = { self, nixpkgs, flake-utils, pyproject-nix, pyproject-build-systems, uv2nix }: |
| 23 | + outputs = { self, nixpkgs, flake-utils, pyproject-nix, pyproject-build-systems, uv2nix, nixpkgs-unstable }: |
21 | 24 | let |
22 | 25 | pythonVer = "310"; |
23 | 26 | in flake-utils.lib.eachSystem [ |
|
27 | 30 | "aarch64-darwin" |
28 | 31 | ] (system: |
29 | 32 | let |
| 33 | + pkgs-unstable = import nixpkgs-unstable { |
| 34 | + inherit system; |
| 35 | + }; |
| 36 | + # for uv2nix, remove this once we updated to a newer version of nixpkgs |
| 37 | + staleNixpkgsOverlay = final: prev: { |
| 38 | + inherit (pkgs-unstable) replaceVars; |
| 39 | + }; |
30 | 40 | # due to the nixpkgs that we use in this flake being outdated, uv is also heavily outdated |
31 | 41 | # we can instead use the binary release of uv provided by uv2nix for now |
32 | 42 | uvOverlay = final: prev: { |
|
41 | 51 | pkgs = import nixpkgs { |
42 | 52 | inherit system; |
43 | 53 | overlays = [ |
| 54 | + staleNixpkgsOverlay |
44 | 55 | uvOverlay |
45 | 56 | kriscvOverlay |
46 | 57 | ]; |
|
0 commit comments