Skip to content

Commit

Permalink
Update rcodesign for recent MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Oct 22, 2024
1 parent e2b53b3 commit ed42119
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ let
cacheCompilerDeps = import ./cache-compiler-deps.nix;
fetch-source = import ./fetch-source.nix;
lazy-inputs = import ../lazy-inputs;
rcodesign = import ./rcodesign.nix;
};

composeExtensions = f: g: final: prev:
Expand Down Expand Up @@ -133,6 +134,7 @@ let
cacheCompilerDeps
fetch-source
lazy-inputs
rcodesign
];
combined = builtins.foldl' composeExtensions (_: _: { }) ordered;
in overlays // { inherit combined; }
32 changes: 32 additions & 0 deletions overlays/rcodesign.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# nixpkgs is using `rcodesign` 0.22 and it fails to build on recent
# versions of macOS (one of the tests fails validating signatures
# in `/usr/bin`).
final: prev: {
rcodesign = prev.rcodesign.override (old: {
rustPlatform = old.rustPlatform // {
buildRustPackage = args: old.rustPlatform.buildRustPackage (args // {
version = "0.27.0";

src = final.fetchFromGitHub {
owner = "hamishmack";
repo = "apple-platform-rs";
rev = "hkm/cargo-update";
hash = "sha256-gma2e73m2MDC8BAcIuclG/RPLhAHRLkehCa56f5835g=";
};

cargoHash = "sha256-4ra1oBQK/kXZTKvvq17kX2+49iKyXXT484Z6ON4bFbU=";

buildInputs = final.lib.optionals final.stdenv.hostPlatform.isDarwin [
final.darwin.apple_sdk_11_0.frameworks.Security
final.darwin.apple_sdk_11_0.frameworks.SystemConfiguration
];

checkFlags = [
# Does network IO
"--skip=ticket_lookup::test::lookup_ticket"
"--skip=cli_tests"
];
});
};
});
}

0 comments on commit ed42119

Please sign in to comment.