1{ lib
2, stdenv
3, nixosTests
4, rustPlatform
5, fetchFromGitHub
6, Security
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "libreddit";
11 version = "0.30.0";
12
13 src = fetchFromGitHub {
14 owner = "libreddit";
15 repo = pname;
16 rev = "refs/tags/v${version}";
17 hash = "sha256-jV8U7znBFCYBmtI6fm+/5oKsLJ3/tQG16GUvNnBlp7A=";
18 };
19
20 cargoHash = "sha256-V7bT1uwSk9IW5rhKHW+6yHv+o+H3w7O/yuRpPDrcFic=";
21
22 buildInputs = lib.optionals stdenv.isDarwin [
23 Security
24 ];
25
26 passthru.tests = {
27 inherit (nixosTests) libreddit;
28 };
29
30 meta = with lib; {
31 description = "Private front-end for Reddit";
32 homepage = "https://github.com/libreddit/libreddit";
33 changelog = "https://github.com/libreddit/libreddit/releases/tag/v${version}";
34 license = with licenses; [ agpl3Only ];
35 maintainers = with maintainers; [ fab jojosch ];
36 };
37}