2021-04-11 22:37:30 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, nixosTests
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "libreddit";
|
2021-11-15 08:11:26 +00:00
|
|
|
version = "0.19.1";
|
2021-04-11 22:37:30 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spikecodes";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-11-15 08:11:26 +00:00
|
|
|
sha256 = "sha256-d6MDyFwQGvPQ1o+oYzZWhG2vFhBrFwMoV7a9vqFj+gs=";
|
2021-04-11 22:37:30 +01:00
|
|
|
};
|
|
|
|
|
2021-11-15 08:11:26 +00:00
|
|
|
cargoSha256 = "sha256-Dpfs4kC8wijmEd2HejT/RfWAbfxqO701uFcUtBGmCjo=";
|
2021-04-11 22:37:30 +01: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 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|