nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, nixosTests
4, rustPlatform
5, fetchFromGitHub
6, Security
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "libreddit";
11 version = "0.22.7";
12
13 src = fetchFromGitHub {
14 owner = "spikecodes";
15 repo = pname;
16 rev = "v${version}";
17 sha256 = "sha256-kM+XvkSxc+OsHq2hGPdpy32jQ/35AJo75PlpbeWjef0=";
18 };
19
20 cargoSha256 = "sha256-md56axw3tpl++wP3ga0iMX63ixu/35lhT4TA2Uo8GpI=";
21
22 buildInputs = lib.optional stdenv.isDarwin Security;
23
24 passthru.tests = {
25 inherit (nixosTests) libreddit;
26 };
27
28 meta = with lib; {
29 description = "Private front-end for Reddit";
30 homepage = "https://github.com/spikecodes/libreddit";
31 license = with licenses; [ agpl3Only ];
32 maintainers = with maintainers; [ fab jojosch ];
33 };
34}