nixpkgs/pkgs/applications/misc/leetcode-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1015 B
Nix
Raw Normal View History

2022-02-08 23:45:07 +00:00
{ lib
, fetchCrate
, rustPlatform
, pkg-config
, openssl
, dbus
, sqlite
, stdenv
, darwin
2023-08-14 02:50:34 +00:00
, testers
, leetcode-cli
2022-02-08 23:45:07 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "leetcode-cli";
2023-08-14 02:50:34 +00:00
version = "0.4.2";
2022-02-08 23:45:07 +00:00
src = fetchCrate {
inherit pname version;
2023-08-14 02:50:34 +00:00
sha256 = "sha256-Yr8Jsy8863O6saaFRAxssni+PtK7XYe+Iifgxu8Rx6Q=";
2022-02-08 23:45:07 +00:00
};
2023-08-14 02:50:34 +00:00
cargoHash = "sha256-rab/oLr27UOlnwUUB1RXC/egLoYyzmVtzN1L+AGed8o=";
2022-02-08 23:45:07 +00:00
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
dbus
sqlite
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
2023-08-14 02:50:54 +00:00
passthru.tests = testers.testVersion {
package = leetcode-cli;
command = "leetcode -V";
version = "leetcode ${version}";
};
2022-02-08 23:45:07 +00:00
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";
};
}