Files
nixpkgs/pkgs/by-name/bl/bleep/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

82 lines
2.1 KiB
Nix

{
stdenvNoCC,
fetchzip,
autoPatchelfHook,
installShellFiles,
makeWrapper,
lib,
zlib,
testers,
}:
let
platform =
{
x86_64-linux = "x86_64-pc-linux";
x86_64-darwin = "x86_64-apple-darwin";
aarch64-darwin = "arm64-apple-darwin";
}
."${stdenvNoCC.system}" or (throw "unsupported system ${stdenvNoCC.hostPlatform.system}");
hash =
{
x86_64-linux = "sha256-SGV0fEuwmGwpqmD42a+x0fIK50RWSHEYDesH4obgRhg=";
x86_64-darwin = "sha256-fOeYUchUE1Jj4xSrYjljEUpGrW8cvev7d/qywc81vFo=";
aarch64-darwin = "sha256-qL0hjEdfkN62NDvhlzVgW4TYWv0IReo2Fo5eVhUaOrI=";
}
."${stdenvNoCC.system}" or (throw "unsupported system ${stdenvNoCC.hostPlatform.system}");
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "bleep";
version = "0.0.13";
src = fetchzip {
url = "https://github.com/oyvindberg/bleep/releases/download/v${finalAttrs.version}/bleep-${platform}.tar.gz";
hash = hash;
};
nativeBuildInputs = [
installShellFiles
makeWrapper
]
++ lib.optional stdenvNoCC.hostPlatform.isLinux autoPatchelfHook;
buildInputs = [ zlib ];
installPhase = ''
runHook preInstall
install -Dm755 bleep -t $out/bin/
runHook postInstall
'';
dontAutoPatchelf = true;
postFixup =
lib.optionalString stdenvNoCC.hostPlatform.isLinux ''
autoPatchelf $out
''
+ lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
export PATH=$PATH:$out/bin
installShellCompletion --cmd bleep \
--bash <(bleep install-tab-completions-bash --stdout) \
--zsh <(bleep install-tab-completions-zsh --stdout) \
'';
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "bleep --help | sed -n '/Bleeping/s/[^0-9.]//gp'";
};
meta = {
homepage = "https://bleep.build/";
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
license = lib.licenses.mit;
description = "Bleeping fast scala build tool";
mainProgram = "bleep";
platforms = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
maintainers = with lib.maintainers; [ kristianan ];
};
})