flake: update to Nix 24.11

This commit is contained in:
Mitchell Hashimoto
2024-12-05 11:00:02 -08:00
parent 711f94776e
commit 1ee7da174b
5 changed files with 27 additions and 19 deletions

14
flake.lock generated
View File

@ -20,27 +20,27 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1726062281, "lastModified": 1733423277,
"narHash": "sha256-PyFVySdGj3enKqm8RQuo4v1KLJLmNLOq2yYOHsI6e2Q=", "narHash": "sha256-TxabjxEgkNbCGFRHgM/b9yZWlBj60gUOUnRT/wbVQR8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e65aa8301ba4f0ab8cb98f944c14aa9da07394f8", "rev": "e36963a147267afc055f7cf65225958633e536bf",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "release-24.05", "ref": "release-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1719082008, "lastModified": 1733229606,
"narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=", "narHash": "sha256-FLYY5M0rpa5C2QAE3CKLYAM6TwbKicdRK6qNrSHlNrE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9693852a2070b398ee123a329e68f0dab5526681", "rev": "566e53c2ad750c84f6d31f9ccb9d00f823165550",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -7,7 +7,7 @@
# 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.05"; nixpkgs-stable.url = "github:nixos/nixpkgs/release-24.11";
zig = { zig = {
url = "github:mitchellh/zig-overlay"; url = "github:mitchellh/zig-overlay";
@ -36,7 +36,6 @@
packages.${system} = let packages.${system} = let
mkArgs = optimize: { mkArgs = optimize: {
inherit (pkgs-unstable) zig_0_13 stdenv;
inherit optimize; inherit optimize;
revision = self.shortRev or self.dirtyShortRev or "dirty"; revision = self.shortRev or self.dirtyShortRev or "dirty";

View File

@ -159,11 +159,20 @@ in
# it to be "portable" across the system. # it to be "portable" across the system.
LD_LIBRARY_PATH = lib.makeLibraryPath rpathLibs; LD_LIBRARY_PATH = lib.makeLibraryPath rpathLibs;
# On Linux we need to setup the environment so that all GTK data shellHook =
# is available (namely icons). (lib.optionalString stdenv.hostPlatform.isLinux ''
shellHook = lib.optionalString stdenv.hostPlatform.isLinux '' # On Linux we need to setup the environment so that all GTK data
# Minimal subset of env set by wrapGAppsHook4 for icons and global settings # is available (namely icons).
export XDG_DATA_DIRS=$XDG_DATA_DIRS:${hicolor-icon-theme}/share:${gnome.adwaita-icon-theme}/share
export XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH # from glib setup hook # Minimal subset of env set by wrapGAppsHook4 for icons and global settings
''; export XDG_DATA_DIRS=$XDG_DATA_DIRS:${hicolor-icon-theme}/share:${gnome.adwaita-icon-theme}/share
export XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH # from glib setup hook
'')
+ (lib.optionalString stdenv.hostPlatform.isDarwin ''
# On macOS, we unset the macOS SDK env vars that Nix sets up because
# we rely on a system installation. Nix only provides a macOS SDK
# and we need iOS too.
unset SDKROOT
unset DEVELOPER_DIR
'');
} }

View File

@ -42,7 +42,7 @@ pub fn create(b: *std.Build, opts: Options) *MetallibStep {
b, b,
b.fmt("metal {s}", .{opts.name}), b.fmt("metal {s}", .{opts.name}),
); );
run_ir.addArgs(&.{ "xcrun", "-sdk", sdk, "metal", "-o" }); run_ir.addArgs(&.{ "/usr/bin/xcrun", "-sdk", sdk, "metal", "-o" });
const output_ir = run_ir.addOutputFileArg(b.fmt("{s}.ir", .{opts.name})); const output_ir = run_ir.addOutputFileArg(b.fmt("{s}.ir", .{opts.name}));
run_ir.addArgs(&.{"-c"}); run_ir.addArgs(&.{"-c"});
for (opts.sources) |source| run_ir.addFileArg(source); for (opts.sources) |source| run_ir.addFileArg(source);
@ -62,7 +62,7 @@ pub fn create(b: *std.Build, opts: Options) *MetallibStep {
b, b,
b.fmt("metallib {s}", .{opts.name}), b.fmt("metallib {s}", .{opts.name}),
); );
run_lib.addArgs(&.{ "xcrun", "-sdk", sdk, "metallib", "-o" }); run_lib.addArgs(&.{ "/usr/bin/xcrun", "-sdk", sdk, "metallib", "-o" });
const output_lib = run_lib.addOutputFileArg(b.fmt("{s}.metallib", .{opts.name})); const output_lib = run_lib.addOutputFileArg(b.fmt("{s}.metallib", .{opts.name}));
run_lib.addFileArg(output_ir); run_lib.addFileArg(output_ir);
run_lib.step.dependOn(&run_ir.step); run_lib.step.dependOn(&run_ir.step);

View File

@ -690,7 +690,7 @@ pub const ImageStorage = struct {
br.x = @min( br.x = @min(
// We need to sub one here because the x value is // We need to sub one here because the x value is
// one width already. So if the image is width "1" // one width already. So if the image is width "1"
// then we add zero to X because X itelf is width 1. // then we add zero to X because X itself is width 1.
pin.x + (grid_size.cols - 1), pin.x + (grid_size.cols - 1),
t.cols - 1, t.cols - 1,
); );