nix: update to Nix 25.05 and Zig 0.14.1

Update to Nix 25.05 which gets us GTK 4.18, libadwaita 1.7, and Zig 0.14.1.

Since Nix updated to Zig 0.14.1, the devshell has been switched to Zig 0.14.1
from zig-overlay as well.

Fixes #7305
pull/7447/head
Jeffrey C. Ollie 2025-05-26 10:47:43 -05:00
parent 3f6c02b49e
commit 98309e3226
No known key found for this signature in database
GPG Key ID: 6F86035A6D97044E
2 changed files with 34 additions and 62 deletions

View File

@ -3,11 +3,11 @@
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1733328505, "lastModified": 1747046372,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -34,44 +34,24 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1741992157, "lastModified": 1748189127,
"narHash": "sha256-nlIfTsTrMSksEJc1f7YexXiPVuzD1gOfeN1ggwZyUoc=", "narHash": "sha256-zRDR+EbbeObu4V2X5QCd2Bk5eltfDlCr5yvhBwUT6pY=",
"owner": "nixos", "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334",
"repo": "nixpkgs", "type": "tarball",
"rev": "da4b122f63095ca1199bd4d526f9e26426697689", "url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.802491.7c43f080a7f2/nixexprs.tar.xz"
"type": "github"
}, },
"original": { "original": {
"owner": "nixos", "type": "tarball",
"ref": "release-24.11", "url": "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz"
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1741865919,
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"zig": "zig", "zig": "zig",
"zon2nix": "zon2nix" "zon2nix": "zon2nix"
} }
@ -98,15 +78,15 @@
"flake-utils" "flake-utils"
], ],
"nixpkgs": [ "nixpkgs": [
"nixpkgs-stable" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1741825901, "lastModified": 1748261582,
"narHash": "sha256-aeopo+aXg5I2IksOPFN79usw7AeimH1+tjfuMzJHFdk=", "narHash": "sha256-3i0IL3s18hdDlbsf0/E+5kyPRkZwGPbSFngq5eToiAA=",
"owner": "mitchellh", "owner": "mitchellh",
"repo": "zig-overlay", "repo": "zig-overlay",
"rev": "0b14285e283f5a747f372fb2931835dd937c4383", "rev": "aafb1b093fb838f7a02613b719e85ec912914221",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -121,7 +101,7 @@
"flake-utils" "flake-utils"
], ],
"nixpkgs": [ "nixpkgs": [
"nixpkgs-unstable" "nixpkgs"
] ]
}, },
"locked": { "locked": {

View File

@ -2,12 +2,10 @@
description = "👻"; description = "👻";
inputs = { inputs = {
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# We want to stay as up to date as possible but need to be careful that the # We want to stay as up to date as possible but need to be careful that the
# glibc versions used by our dependencies from Nix are compatible with the # glibc versions used by our dependencies from Nix are compatible with the
# system glibc that the user is building for. # system glibc that the user is building for.
nixpkgs-stable.url = "github:nixos/nixpkgs/release-24.11"; nixpkgs.url = "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
# Used for shell.nix # Used for shell.nix
@ -19,7 +17,7 @@
zig = { zig = {
url = "github:mitchellh/zig-overlay"; url = "github:mitchellh/zig-overlay";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs-stable"; nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
flake-compat.follows = ""; flake-compat.follows = "";
}; };
@ -28,7 +26,7 @@
zon2nix = { zon2nix = {
url = "github:jcollie/zon2nix?ref=56c159be489cc6c0e73c3930bd908ddc6fe89613"; url = "github:jcollie/zon2nix?ref=56c159be489cc6c0e73c3930bd908ddc6fe89613";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs-unstable"; nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
}; };
}; };
@ -36,24 +34,19 @@
outputs = { outputs = {
self, self,
nixpkgs-unstable, nixpkgs,
nixpkgs-stable,
zig, zig,
zon2nix, zon2nix,
... ...
}: }:
builtins.foldl' nixpkgs-stable.lib.recursiveUpdate {} ( builtins.foldl' nixpkgs.lib.recursiveUpdate {} (
builtins.map ( builtins.map (
system: let system: let
pkgs-stable = nixpkgs-stable.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
in { in {
devShell.${system} = pkgs-stable.callPackage ./nix/devShell.nix { devShell.${system} = pkgs.callPackage ./nix/devShell.nix {
zig = zig.packages.${system}."0.14.0"; zig = zig.packages.${system}."0.14.1";
wraptest = pkgs-stable.callPackage ./nix/wraptest.nix {}; wraptest = pkgs.callPackage ./nix/wraptest.nix {};
uv = pkgs-unstable.uv;
# remove once blueprint-compiler 0.16.0 is in the stable nixpkgs
blueprint-compiler = pkgs-unstable.blueprint-compiler;
zon2nix = zon2nix; zon2nix = zon2nix;
}; };
@ -64,30 +57,29 @@
revision = self.shortRev or self.dirtyShortRev or "dirty"; revision = self.shortRev or self.dirtyShortRev or "dirty";
}; };
in rec { in rec {
deps = pkgs-unstable.callPackage ./build.zig.zon.nix {}; deps = pkgs.callPackage ./build.zig.zon.nix {};
ghostty-debug = pkgs-unstable.callPackage ./nix/package.nix (mkArgs "Debug"); ghostty-debug = pkgs.callPackage ./nix/package.nix (mkArgs "Debug");
ghostty-releasesafe = pkgs-unstable.callPackage ./nix/package.nix (mkArgs "ReleaseSafe"); ghostty-releasesafe = pkgs.callPackage ./nix/package.nix (mkArgs "ReleaseSafe");
ghostty-releasefast = pkgs-unstable.callPackage ./nix/package.nix (mkArgs "ReleaseFast"); ghostty-releasefast = pkgs.callPackage ./nix/package.nix (mkArgs "ReleaseFast");
ghostty = ghostty-releasefast; ghostty = ghostty-releasefast;
default = ghostty; default = ghostty;
}; };
formatter.${system} = pkgs-stable.alejandra; formatter.${system} = pkgs.alejandra;
apps.${system} = let apps.${system} = let
runVM = ( runVM = (
module: let module: let
vm = import ./nix/vm/create.nix { vm = import ./nix/vm/create.nix {
inherit system module; inherit system module nixpkgs;
nixpkgs = nixpkgs-unstable;
overlay = self.overlays.debug; overlay = self.overlays.debug;
}; };
program = pkgs-unstable.writeShellScript "run-ghostty-vm" '' program = pkgs.writeShellScript "run-ghostty-vm" ''
SHARED_DIR=$(pwd) SHARED_DIR=$(pwd)
export SHARED_DIR export SHARED_DIR
${pkgs-unstable.lib.getExe vm.config.system.build.vm} "$@" ${pkgs.lib.getExe vm.config.system.build.vm} "$@"
''; '';
in { in {
type = "app"; type = "app";