diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-03-23 19:18:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-23 19:18:08 +0100 |
commit | e2a73469df88d26d4e7ac3dcda8c219d1e524fd9 (patch) | |
tree | 1e883c79e9fc140eebb5d81cdddaf216e0ae2f02 /pkgs/by-name/re | |
parent | 0880fda831740996db10fbd915c09f18dd2ccc1e (diff) | |
parent | bc54360b999bd059634d53a40db882bc969c2935 (diff) |
Merge pull request #292645 from soispha/add-redlib
redlib: init at 0.31.0
Diffstat (limited to 'pkgs/by-name/re')
-rw-r--r-- | pkgs/by-name/re/redlib/package.nix | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/by-name/re/redlib/package.nix b/pkgs/by-name/re/redlib/package.nix new file mode 100644 index 0000000000000..c3778b9cd0fab --- /dev/null +++ b/pkgs/by-name/re/redlib/package.nix @@ -0,0 +1,61 @@ +{ lib +, stdenv +, cacert +, nixosTests +, rustPlatform +, fetchFromGitHub +, darwin +}: +rustPlatform.buildRustPackage rec { + pname = "redlib"; + version = "0.31.0"; + + src = fetchFromGitHub { + owner = "redlib-org"; + repo = "redlib"; + rev = "refs/tags/v${version}"; + hash = "sha256-d3Jjs/a2EgdqRBTjXKwDDRnU6orb7RQGl1CVz9b9SdI="; + }; + + cargoHash = "sha256-2MugS0/MO85lQvDbiFwnsX4LYdk7TACDFR8OOLEFGUQ="; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + checkFlags = [ + # All these test try to connect to Reddit. + "--skip=test_fetching_subreddit_quarantined" + "--skip=test_fetching_nsfw_subreddit" + "--skip=test_fetching_ws" + + "--skip=test_obfuscated_share_link" + "--skip=test_share_link_strip_json" + + "--skip=test_localization_popular" + "--skip=test_fetching_subreddit" + "--skip=test_fetching_user" + + # These try to connect to the oauth client + "--skip=test_oauth_client" + "--skip=test_oauth_client_refresh" + "--skip=test_oauth_token_exists" + ]; + + env = { + SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; + }; + + passthru.tests = { + inherit (nixosTests) redlib; + }; + + meta = { + changelog = "https://github.com/redlib-org/redlib/releases/tag/v${version}"; + description = "Private front-end for Reddit (Continued fork of Libreddit)"; + homepage = "https://github.com/redlib-org/redlib"; + license = lib.licenses.agpl3Only; + mainProgram = "redlib"; + maintainers = with lib.maintainers; [ soispha ]; + }; +} |