nixpkgs/pkgs/servers/libreddit/default.nix

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

48 lines
1.1 KiB
Nix
Raw Normal View History

2021-04-11 21:37:30 +00:00
{ lib
, stdenv
, nixosTests
, rustPlatform
, fetchFromGitHub
2023-01-04 09:53:28 +00:00
, fetchpatch
2021-04-11 21:37:30 +00:00
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "libreddit";
2023-01-04 09:53:28 +00:00
version = "0.27.0";
2021-04-11 21:37:30 +00:00
src = fetchFromGitHub {
2022-11-01 10:55:16 +00:00
owner = "libreddit";
2021-04-11 21:37:30 +00:00
repo = pname;
2022-11-26 15:38:45 +00:00
rev = "refs/tags/v${version}";
2023-01-04 09:53:28 +00:00
hash = "sha256-+sSzYewqN3VjTl+wjgan3yxlFiuCg2rprJDpDktuQHo=";
2021-04-11 21:37:30 +00:00
};
2023-01-04 09:53:28 +00:00
cargoSha256 = "sha256-HhtslN6JV9DUBhuyesciZGGYVz7mvpdyxVps9xAc+Rs=";
patches = [
# https://github.com/libreddit/libreddit/pull/687
(fetchpatch {
name = "fix-cfg-test.patch";
url = "https://github.com/libreddit/libreddit/commit/dff91da8777dc42d38abf8b5d63addbd71fdabff.patch";
sha256 = "sha256-6np5gf8cyKotF7KJ19mCtRAF7SxDpNFpQCgdy/XDsng=";
})
];
2021-04-11 21:37:30 +00:00
buildInputs = lib.optionals stdenv.isDarwin [
2022-11-01 10:55:16 +00:00
Security
];
2021-04-11 21:37:30 +00:00
passthru.tests = {
inherit (nixosTests) libreddit;
};
meta = with lib; {
description = "Private front-end for Reddit";
2022-11-01 10:55:16 +00:00
homepage = "https://github.com/libreddit/libreddit";
2022-11-26 15:38:45 +00:00
changelog = "https://github.com/libreddit/libreddit/releases/tag/v${version}";
2021-04-11 21:37:30 +00:00
license = with licenses; [ agpl3Only ];
maintainers = with maintainers; [ fab jojosch ];
2021-04-11 21:37:30 +00:00
};
}