bump flake deps, use apple sdk 11.0 on x86_64-darwin

This commit is contained in:
Clément DOUIN 2024-10-29 11:21:27 +01:00
parent 7c17f801eb
commit 52aa6336a0
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72
2 changed files with 19 additions and 41 deletions

View file

@ -79,11 +79,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1725001927, "lastModified": 1729973466,
"narHash": "sha256-eV+63gK0Mp7ygCR0Oy4yIYSNcum2VQwnZamHxYTNi+M=", "narHash": "sha256-knnVBGfTCZlQgxY1SgH0vn2OyehH9ykfF8geZgS95bk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6e99f2a27d600612004fbd2c3282d614bfee6421", "rev": "cd3e8833d70618c4eea8df06f95b364b016d4950",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -72,38 +72,17 @@
}; };
}; };
x86_64-darwin = { x86_64-darwin.x86_64-darwin = {
x86_64-darwin = {
rustTarget = "x86_64-apple-darwin"; rustTarget = "x86_64-apple-darwin";
mkPackage = { pkgs, ... }: package: mkPackage = { pkgs, ... }: package:
let inherit (pkgs.darwin.apple_sdk.frameworks) AppKit Cocoa Security; let inherit (pkgs.darwin.apple_sdk_11_0.frameworks) AppKit Cocoa;
in package // { in package // {
buildInputs = [ AppKit Cocoa Security ];
NIX_LDFLAGS = "-F${AppKit}/Library/Frameworks -framework AppKit -F${Security}/Library/Frameworks -framework Security";
};
};
# FIXME: https://github.com/NixOS/nixpkgs/issues/273442
aarch64-darwin = {
rustTarget = "aarch64-apple-darwin";
runner = { pkgs, himalaya }: "${pkgs.qemu}/bin/qemu-aarch64 ${himalaya}";
mkPackage = { system, pkgs }: package:
let
inherit ((mkPkgsCross system "aarch64-darwin").pkgsStatic) stdenv darwin;
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa;
cc = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc";
in
package // {
buildInputs = [ Cocoa ]; buildInputs = [ Cocoa ];
NIX_LDFLAGS = "-F${AppKit}/Library/Frameworks -framework AppKit"; NIX_LDFLAGS = "-F${AppKit}/Library/Frameworks -framework AppKit";
TARGET_CC = cc;
CARGO_BUILD_RUSTFLAGS = package.CARGO_BUILD_RUSTFLAGS ++ [ "-Clinker=${cc}" ];
};
}; };
}; };
aarch64-darwin = { aarch64-darwin.aarch64-darwin = {
aarch64-darwin = {
rustTarget = "aarch64-apple-darwin"; rustTarget = "aarch64-apple-darwin";
mkPackage = { pkgs, ... }: package: mkPackage = { pkgs, ... }: package:
let inherit (pkgs.darwin.apple_sdk.frameworks) AppKit Cocoa; let inherit (pkgs.darwin.apple_sdk.frameworks) AppKit Cocoa;
@ -113,7 +92,6 @@
}; };
}; };
}; };
};
eachBuildSystem = lib.genAttrs (builtins.attrNames crossSystems); eachBuildSystem = lib.genAttrs (builtins.attrNames crossSystems);