From 36ee158783244d2809218363cc642b01c43b5564 Mon Sep 17 00:00:00 2001 From: Manoj Karthick Date: Mon, 11 Jan 2021 05:17:58 -0800 Subject: [PATCH] reddsaver: init at 0.2.2 Motivation: Command line tool to download saved images from Reddit --- pkgs/applications/misc/reddsaver/default.nix | 36 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/misc/reddsaver/default.nix diff --git a/pkgs/applications/misc/reddsaver/default.nix b/pkgs/applications/misc/reddsaver/default.nix new file mode 100644 index 00000000000000..2a6d613ed577e6 --- /dev/null +++ b/pkgs/applications/misc/reddsaver/default.nix @@ -0,0 +1,36 @@ +{ stdenv +, fetchFromGitHub +, rustPlatform +, openssl +, pkg-config +, Security +}: + +rustPlatform.buildRustPackage rec { + version = "0.2.2"; + pname = "reddsaver"; + + src = fetchFromGitHub { + owner = "manojkarthick"; + repo = "reddsaver"; + rev = "v${version}"; + sha256 = "0802jz503jhyz5q6mg1fj2bvkl4nggvs8y03zddd298ymplx5dbx"; + }; + + cargoSha256 = "0z8q187331j3rxj8hzym25pwrikxbd0r829v29y8w6v5n0hb47fs"; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ openssl ] + ++ stdenv.lib.optional stdenv.isDarwin Security; + + # package does not contain tests as of v0.2.2 + docCheck = false; + + meta = with stdenv.lib; { + description = "CLI tool to download saved images from Reddit"; + homepage = "https://github.com/manojkarthick/reddsaver"; + license = with licenses; [ mit /* or */ asl20 ]; + maintainers = [ maintainers.manojkarthick ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9196cad2077a60..9f6b84221ce0f5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24250,6 +24250,10 @@ in recode = callPackage ../tools/text/recode { }; + reddsaver = callPackage ../applications/misc/reddsaver { + inherit (darwin.apple_sdk.frameworks) Security; + }; + rednotebook = python3Packages.callPackage ../applications/editors/rednotebook { }; remotebox = callPackage ../applications/virtualization/remotebox { };