summary refs log tree commit diff
path: root/pkgs/applications/misc/leetcode-cli/default.nix
diff options
context:
space:
mode:
authorCongee <congeec@qq.com>2022-02-08 18:45:07 -0500
committerCole Helbling <cole.e.helbling@outlook.com>2022-02-09 19:41:46 -0800
commit3b93e99c670e311a86ebf702e34322c8aeb04828 (patch)
tree4b9a8556b6011698ec2b762d5847e5f5d158fcb2 /pkgs/applications/misc/leetcode-cli/default.nix
parent564d59b339e29a5728fd295f45a42d8bcc1e2baa (diff)
downloadnixpkgs-3b93e99c670e311a86ebf702e34322c8aeb04828.tar
nixpkgs-3b93e99c670e311a86ebf702e34322c8aeb04828.tar.gz
nixpkgs-3b93e99c670e311a86ebf702e34322c8aeb04828.tar.bz2
nixpkgs-3b93e99c670e311a86ebf702e34322c8aeb04828.tar.lz
nixpkgs-3b93e99c670e311a86ebf702e34322c8aeb04828.tar.xz
nixpkgs-3b93e99c670e311a86ebf702e34322c8aeb04828.tar.zst
nixpkgs-3b93e99c670e311a86ebf702e34322c8aeb04828.zip
leetcode-cli: init at 0.3.10
Diffstat (limited to 'pkgs/applications/misc/leetcode-cli/default.nix')
-rw-r--r--pkgs/applications/misc/leetcode-cli/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/applications/misc/leetcode-cli/default.nix b/pkgs/applications/misc/leetcode-cli/default.nix
new file mode 100644
index 00000000000..03f25588682
--- /dev/null
+++ b/pkgs/applications/misc/leetcode-cli/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, fetchCrate
+, rustPlatform
+, pkg-config
+, openssl
+, dbus
+, sqlite
+, stdenv
+, darwin
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "leetcode-cli";
+  version = "0.3.10";
+
+  src = fetchCrate {
+    inherit pname version;
+    sha256 = "SkJLA49AXNTpiWZByII2saYLyN3bAAJTlCvhamlOEXA=";
+  };
+
+  cargoSha256 = "xhKF4qYOTdt8iCSPY5yT8tH3l54HdkOAIS2SBGzqsdo=";
+
+  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";
+  };
+}