2024-02-29 20:09:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
, fetchFromGitHub
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
2024-04-21 15:54:59 +00:00
|
|
|
, nix-update-script
|
2024-02-29 20:09:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "crunchy-cli";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "3.6.7";
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "crunchy-labs";
|
|
|
|
repo = "crunchy-cli";
|
|
|
|
rev = "v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-qBIfDkd4a0m1GNgK4tSq2/dLP8K5Pp4m/M468eHgIAg=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-07-01 15:47:52 +00:00
|
|
|
"native-tls-0.2.12" = "sha256-YqiX3xj2ionDlDRzkClqkt0E4HY4zt0B6+rGf850ZCk=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isLinux [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
|
|
];
|
|
|
|
|
|
|
|
env = {
|
|
|
|
OPENSSL_NO_VENDOR = true;
|
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
2024-02-29 20:09:43 +00:00
|
|
|
description = "Command-line downloader for Crunchyroll";
|
|
|
|
homepage = "https://github.com/crunchy-labs/crunchy-cli";
|
2024-04-21 15:54:59 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ stepbrobd ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "crunchy-cli";
|
|
|
|
};
|
|
|
|
}
|