2021-08-05 21:33:18 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, nixosTests
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "libreddit";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.22.9";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spikecodes";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-xsWV3DWAFekWliFRdea2J+Mygl/58d92qTXJ7/4YVEg=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
cargoSha256 = "sha256-eLfKfl7CYH2V9WJksLps6uAckQEPB5dFKBY2B6CMa/8=";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) libreddit;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Private front-end for Reddit";
|
|
|
|
homepage = "https://github.com/spikecodes/libreddit";
|
|
|
|
license = with licenses; [ agpl3Only ];
|
2021-12-30 13:39:12 +00:00
|
|
|
maintainers = with maintainers; [ fab jojosch ];
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
}
|