nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 59 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 rustPlatform, 5 fetchFromGitHub, 6 nix-update-script, 7 makeWrapper, 8 installShellFiles, 9 writableTmpDirAsHomeHook, 10 ninja, 11 versionCheckHook, 12}: 13 14rustPlatform.buildRustPackage (finalAttrs: { 15 pname = "laze"; 16 version = "0.1.39"; 17 18 src = fetchFromGitHub { 19 owner = "kaspar030"; 20 repo = "laze"; 21 tag = finalAttrs.version; 22 hash = "sha256-6jpsrRsBqowPL0TXke5gbgl6twuQLUsQ9yMGh4bJVds="; 23 }; 24 25 cargoHash = "sha256-kxbMkz3vEhXXzJ8yVDPAkCrALOq9+dNw9NoknCmGPIE="; 26 27 passthru.updateScript = nix-update-script { }; 28 29 nativeBuildInputs = [ 30 makeWrapper 31 installShellFiles 32 writableTmpDirAsHomeHook 33 ]; 34 35 postInstall = '' 36 wrapProgram "$out/bin/laze" \ 37 --suffix PATH : ${lib.makeBinPath [ ninja ]} 38 '' 39 + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 40 installShellCompletion --cmd laze \ 41 --bash <($out/bin/laze completion --generate bash) \ 42 --fish <($out/bin/laze completion --generate fish) \ 43 --zsh <($out/bin/laze completion --generate zsh) 44 ''; 45 46 nativeInstallCheckInputs = [ 47 versionCheckHook 48 ]; 49 doInstallCheck = true; 50 51 meta = { 52 description = "Fast, declarative meta build system for C/C++/Rust projects, based on Ninja"; 53 mainProgram = "laze"; 54 homepage = "https://github.com/kaspar030/laze"; 55 changelog = "https://github.com/kaspar030/laze/blob/${finalAttrs.version}/CHANGELOG.md"; 56 license = with lib.licenses; [ asl20 ]; 57 maintainers = with lib.maintainers; [ dannixon ]; 58 }; 59})