mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 01:24:09 +01:00
rqbit: Add versionCheckHook and tests (#490240)
This commit is contained in:
commit
ce9803307f
1 changed files with 16 additions and 2 deletions
|
|
@ -3,12 +3,14 @@
|
|||
stdenv,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
pkg-config,
|
||||
openssl,
|
||||
buildNpmPackage,
|
||||
nodejs,
|
||||
nix-update-script,
|
||||
nixosTests,
|
||||
versionCheckHook,
|
||||
}:
|
||||
let
|
||||
pname = "rqbit";
|
||||
|
|
@ -46,7 +48,10 @@ rustPlatform.buildRustPackage {
|
|||
|
||||
cargoHash = "sha256-gYasOjrG0oeT/6Ben57MKAvBtgpoSmZ93RZQqSXAxIc=";
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ];
|
||||
|
||||
|
|
@ -61,7 +66,16 @@ rustPlatform.buildRustPackage {
|
|||
rm crates/librqbit/build.rs
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
for shell in bash fish zsh; do
|
||||
installShellCompletion --cmd rqbit --$shell <($out/bin/rqbit completions $shell)
|
||||
done
|
||||
'';
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru = {
|
||||
webui = rqbit-webui;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue