Skip to content

Commit

Permalink
build: update to nixos-24.11
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
  • Loading branch information
rvolosatovs committed Dec 2, 2024
1 parent cc0b76f commit 3791126
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 41 deletions.
19 changes: 0 additions & 19 deletions examples/rust-complex/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,5 @@
clippy.workspace = true;
test.allTargets = true;
test.workspace = true;

buildOverrides = {
pkgs,
pkgsCross ? pkgs,
...
}: {
buildInputs ? [],
depsBuildBuild ? [],
...
}:
with pkgs.lib; {
buildInputs =
buildInputs
++ optional pkgs.stdenv.hostPlatform.isDarwin pkgs.libiconv;

depsBuildBuild =
depsBuildBuild
++ optional pkgsCross.stdenv.hostPlatform.isDarwin pkgsCross.xcbuild.xcrun;
};
};
}
16 changes: 8 additions & 8 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
inputs.nix-filter.url = "github:numtide/nix-filter";
inputs.nix-log.url = "github:rvolosatovs/nix-log";
inputs.nixlib.url = "github:nix-community/nixpkgs.lib";
inputs.nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
inputs.nixpkgs-nixos.url = "github:nixos/nixpkgs/nixos-24.05";
inputs.nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.11-darwin";
inputs.nixpkgs-nixos.url = "github:nixos/nixpkgs/nixos-24.11";
inputs.rust-overlay.inputs.nixpkgs.follows = "nixpkgs-nixos";
inputs.rust-overlay.url = "github:oxalica/rust-overlay";

Expand Down
15 changes: 3 additions & 12 deletions lib/rust/mkAttrs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,13 @@ with self.lib.rust.targets;
final
hostRustToolchain;

mkHostArgs = {depsBuildBuild ? [], ...} @ craneArgs:
mkHostArgs = craneArgs:
trace' "mkHostArgs" {
inherit craneArgs;
}
{
craneArgs =
craneArgs
// {
depsBuildBuild = depsBuildBuild ++ optional final.stdenv.hostPlatform.isDarwin final.darwin.apple_sdk.frameworks.Security;
};
inherit craneArgs;

craneLib = hostCraneLib;

overrideArgs.pkgs = final;
Expand Down Expand Up @@ -307,8 +304,6 @@ with self.lib.rust.targets;
useRosetta = final.stdenv.buildPlatform.isDarwin && final.stdenv.buildPlatform.isAarch64 && pkgsCross.stdenv.hostPlatform.isDarwin && pkgsCross.stdenv.hostPlatform.isx86_64;
useEmu = final.stdenv.buildPlatform.system != pkgsCross.stdenv.hostPlatform.system && !useRosetta && !pkgsCross.stdenv.hostPlatform.isDarwin;

buildInputs = optional final.stdenv.buildPlatform.isDarwin final.darwin.apple_sdk.frameworks.Security;

crossZigCC = let
target' =
if target == aarch64-apple-darwin
Expand All @@ -328,10 +323,6 @@ with self.lib.rust.targets;

targetArgs =
{
inherit
buildInputs
;

HOST_AR = "${final.stdenv.cc.targetPrefix}ar";
HOST_CC = "${final.stdenv.cc.targetPrefix}cc";

Expand Down

0 comments on commit 3791126

Please sign in to comment.