Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / re / redlib / package.nix
blob3497bc9ba4d132868aa28f34b264f911c6dc7bbd
1 { lib
2 , stdenv
3 , cacert
4 , nixosTests
5 , rustPlatform
6 , fetchFromGitHub
7 , darwin
8 }:
9 rustPlatform.buildRustPackage rec {
10   pname = "redlib";
11   version = "0.35.1";
13   src = fetchFromGitHub {
14     owner = "redlib-org";
15     repo = "redlib";
16     rev = "refs/tags/v${version}";
17     hash = "sha256-W1v7iOE60/6UyZSHQW+L+wHCoKnKUNb3kpm4LVLPZ6c=";
18   };
20   cargoHash = "sha256-3NQWiu/nTtHrivYL1pgxqQxEuIW0xfjxwK0ZEa2y1Kk=";
22   buildInputs = lib.optionals stdenv.isDarwin [
23     darwin.apple_sdk.frameworks.Security
24   ];
26   checkFlags = [
27     # All these test try to connect to Reddit.
28     "--skip=test_fetching_subreddit_quarantined"
29     "--skip=test_fetching_nsfw_subreddit"
30     "--skip=test_fetching_ws"
32     "--skip=test_obfuscated_share_link"
33     "--skip=test_share_link_strip_json"
35     "--skip=test_localization_popular"
36     "--skip=test_fetching_subreddit"
37     "--skip=test_fetching_user"
39     # These try to connect to the oauth client
40     "--skip=test_oauth_client"
41     "--skip=test_oauth_client_refresh"
42     "--skip=test_oauth_token_exists"
43   ];
45   env = {
46     SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
47   };
49   passthru.tests = {
50     inherit (nixosTests) redlib;
51   };
53   meta = {
54     changelog = "https://github.com/redlib-org/redlib/releases/tag/v${version}";
55     description = "Private front-end for Reddit (Continued fork of Libreddit)";
56     homepage = "https://github.com/redlib-org/redlib";
57     license = lib.licenses.agpl3Only;
58     mainProgram = "redlib";
59     maintainers = with lib.maintainers; [ soispha ];
60   };