nixpkgs/pkgs/servers/libreddit/default.nix
2024-06-17 01:12:11 +00:00

39 lines
880 B
Nix

{ lib
, stdenv
, nixosTests
, rustPlatform
, fetchFromGitHub
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "libreddit";
version = "0.30.1";
src = fetchFromGitHub {
owner = "libreddit";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Z+COSDiJoWHHZQM4BJca0JA5RrJKYjhfkFj8yx/0gZA=";
};
cargoHash = "sha256-42xtt5dCcV6+TcssFjufkVtDSRiDGaatAaiP6K8DT8I=";
buildInputs = lib.optionals stdenv.isDarwin [
Security
];
passthru.tests = {
inherit (nixosTests) libreddit;
};
meta = with lib; {
description = "Private front-end for Reddit";
mainProgram = "libreddit";
homepage = "https://github.com/libreddit/libreddit";
changelog = "https://github.com/libreddit/libreddit/releases/tag/v${version}";
license = with licenses; [ agpl3Only ];
maintainers = with maintainers; [ fab jojosch ];
};
}