Unverified Commit d98abf5c authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

bold: init at 0.1.0 (#373289)

parents a09e851d 58caa683
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
# generated by zon2nix (https://github.com/nix-community/zon2nix)

{ linkFarm, fetchzip }:

linkFarm "zig-packages" [
  {
    name = "12207252f0592e53e8794d5a41409791d5c8c70e0de67bfba48844406619847cc971";
    path = fetchzip {
      url = "https://github.com/kubkon/zig-dis-x86_64/archive/5203b9affc5045e000ae7963d988e155e98e396d.tar.gz";
      hash = "sha256-JmrutmOUQ+UEs9CDSM46AFQMcmBNzj/n1c1lzQBuAbA=";
    };
  }
  {
    name = "1220e8870ca83e47b98807e89b5b636072413f6c09f9b26037e4c98c55e4960ac55a";
    path = fetchzip {
      url = "https://github.com/kubkon/zig-yaml/archive/325dbdd276604dccf184c32fef9600b0ac48343d.tar.gz";
      hash = "sha256-09r+LTrYHExHo1OtAMKIPTF9cj5GsDEd0FKCj++vwaw=";
    };
  }
]
+47 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  callPackage,
  zig_0_13,
  versionCheckHook,
  gitUpdater,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "bold";
  version = "0.1.0";

  src = fetchFromGitHub {
    owner = "kubkon";
    repo = "bold";
    tag = "v${finalAttrs.version}";
    hash = "sha256-7sn/8SIoT/JGdza8SpX+8usiVhqugVVMaLU1a1oMdj8=";
  };

  postPatch = ''
    ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
  '';

  nativeBuildInputs = [
    zig_0_13.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";
  };
})