Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
stdenv,
fetchFromGitHub,
callPackage,
zig_0_14,
versionCheckHook,
gitUpdater,
fetchpatch,
}:
let
zig = zig_0_14;
in
stdenv.mkDerivation (finalAttrs: {
pname = "bold";
version = "0.2.0";
src = fetchFromGitHub {
owner = "kubkon";
repo = "bold";
tag = "v${finalAttrs.version}";
hash = "sha256-9qq0RIeplv/Y/6ilr6Nv+DAT8xx3e2SoDugCckxXw+M=";
};
patches = [
# Correct version
(fetchpatch {
url = "https://github.com/kubkon/bold/commit/e8a3245b1f03ea8ba7136d76807400610c068bac.patch";
hash = "sha256-UdicLUoH7ApnKxoI91hDcuO/NSINLkxb2h9sA9NShfw=";
})
];
postPatch = ''
ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
'';
nativeBuildInputs = [
zig.hook
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "-v";
passthru = {
updateScript = gitUpdater { rev-prefix = "v"; };
};
meta = {
description = "Drop-in replacement for Apple system linker ld";
homepage = "https://github.com/kubkon/bold";
changelog = "https://github.com/kubkon/bold/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ DimitarNestorov ];
platforms = lib.platforms.darwin;
mainProgram = "bold";
};
})