Files
nixpkgs/pkgs/by-name/la/laze/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

61 lines
1.5 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
nix-update-script,
makeWrapper,
installShellFiles,
writableTmpDirAsHomeHook,
ninja,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "laze";
version = "0.1.38";
src = fetchFromGitHub {
owner = "kaspar030";
repo = "laze";
tag = finalAttrs.version;
hash = "sha256-8n22euQquEuMDcF7TN7rJkBK6jrZuYlRWegiXccWXFY=";
};
cargoHash = "sha256-M0RrtEAs7nYNr3nnISGX+/49PLdxNU0CkIhZn9wRJjU=";
passthru.updateScript = nix-update-script { };
nativeBuildInputs = [
makeWrapper
installShellFiles
writableTmpDirAsHomeHook
];
postInstall = ''
wrapProgram "$out/bin/laze" \
--suffix PATH : ${lib.makeBinPath [ ninja ]}
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd laze \
--bash <($out/bin/laze completion --generate bash) \
--fish <($out/bin/laze completion --generate fish) \
--zsh <($out/bin/laze completion --generate zsh)
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
meta = {
description = "Fast, declarative meta build system for C/C++/Rust projects, based on Ninja";
mainProgram = "laze";
homepage = "https://github.com/kaspar030/laze";
changelog = "https://github.com/kaspar030/laze/blob/${finalAttrs.version}/CHANGELOG.md";
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [ dannixon ];
};
})