herdr: fix Darwin builds (#536015)

This commit is contained in:
Ryan Burns
2026-07-03 01:15:03 +00:00
committed by GitHub
+22 -5
View File
@@ -1,11 +1,14 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
zig_0_15,
cctools,
xcbuild,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "herdr";
version = "0.7.1";
@@ -28,7 +31,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
hash = "sha256-pgGu8+NwvFcj6SrN4VaTHLeHdA7QY731ctyrHZwgFAc=";
};
nativeBuildInputs = [ zig_0_15.hook ];
nativeBuildInputs = [
zig_0_15.hook
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
cctools
xcbuild
];
# Upstream binary tests are renamed, added, or changed between releases and
# depend on host process details, so Nix-only patches for them are brittle.
@@ -44,13 +53,21 @@ rustPlatform.buildRustPackage (finalAttrs: {
chmod -R u+w "$ZIG_GLOBAL_CACHE_DIR/p"
'';
passthru.updateScript = nix-update-script { };
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru.updateScript = nix-update-script {
extraArgs = [
"--custom-dep"
"zigDeps"
];
};
meta = {
description = "Agent multiplexer that lives in your terminal";
homepage = "https://github.com/ogulcancelik/herdr";
homepage = "https://herdr.dev";
changelog = "https://github.com/ogulcancelik/herdr/releases/tag/v${finalAttrs.version}";
license = lib.licenses.agpl3Only;
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ kevinpita ];
mainProgram = "herdr";
platforms = lib.platforms.unix;