2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, fetchCrate
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, dbus
|
|
|
|
, sqlite
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "leetcode-cli";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.4.1";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-8v10Oe3J0S9xp4b2UDOnv+W0UDgveK+mAyV3I/zZUGw=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
cargoHash = "sha256-MdHk8i/murKcWi9gydyPyq/6r1SovKP04PMJyXXrCiQ=";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
dbus
|
|
|
|
sqlite
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "May the code be with you 👻";
|
|
|
|
longDescription = "Use leetcode.com in command line";
|
|
|
|
homepage = "https://github.com/clearloop/leetcode-cli";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ congee ];
|
|
|
|
mainProgram = "leetcode";
|
|
|
|
};
|
|
|
|
}
|