2021-04-11 23:37:30 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, nixosTests
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "libreddit";
|
2021-08-15 10:17:37 +02:00
|
|
|
version = "0.14.14";
|
2021-04-11 23:37:30 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spikecodes";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-08-15 10:17:37 +02:00
|
|
|
sha256 = "sha256-duirX+X8moByV1urdgXjzTQ2zOfCfz7etzjDxkSKvhk=";
|
2021-04-11 23:37:30 +02:00
|
|
|
};
|
|
|
|
|
2021-08-15 10:17:37 +02:00
|
|
|
cargoSha256 = "sha256-pFCERBnN386rW8ajpLWUHteCTWRmEiR19Sp5d8HXc5Y=";
|
2021-04-11 23:37:30 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|