Files
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

73 lines
1.8 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
openssl,
pkg-config,
installShellFiles,
buildPackages,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rattler-build";
version = "0.48.0";
src = fetchFromGitHub {
owner = "prefix-dev";
repo = "rattler-build";
tag = "v${finalAttrs.version}";
hash = "sha256-Z3FRPk7FGqOraATtrdrrhwMr1mVC4lStDp3seCrKPGw=";
};
cargoHash = "sha256-tzW3za0cn8qMsqEs+U10ud/tvU+eFxtolmyJDpf6WoY=";
doCheck = false; # test requires network access
buildInputs = [
openssl
];
nativeBuildInputs = [
pkg-config
installShellFiles
];
cargoBuildFlags = [ "--bin rattler-build" ]; # other bin like `generate-cli-docs` shouldn't be distributed.
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
let
emulator = stdenv.hostPlatform.emulator buildPackages;
in
''
installShellCompletion --cmd rattler-build \
--bash <(${emulator} $out/bin/rattler-build completion --shell bash) \
--fish <(${emulator} $out/bin/rattler-build completion --shell fish) \
--zsh <(${emulator} $out/bin/rattler-build completion --shell zsh)
''
);
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
description = "Universal package builder for Windows, macOS and Linux";
homepage = "https://rattler.build/";
changelog = "https://github.com/prefix-dev/rattler-build/releases/tag/v${finalAttrs.version}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
genga898
xiaoxiangmoe
];
mainProgram = "rattler-build";
};
})