{ lib, stdenv , fetchFromGitHub , rustPlatform , openssl , pkg-config , Security }: rustPlatform.buildRustPackage rec { pname = "reddsaver"; version = "0.3.0"; src = fetchFromGitHub { owner = "manojkarthick"; repo = "reddsaver"; rev = "v${version}"; sha256 = "0wiyzbl9vqx5aq3lpaaqkm3ivj77lqd8bmh8ipgshdflgm1z6yvp"; }; cargoSha256 = "0kw5gk7pf4xkmjffs2jxm6sc4chybns88cii2wlgpyvgn4c3cwaa"; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security; # package does not contain tests as of v0.3.0 docCheck = false; meta = with lib; { description = "CLI tool to download saved media from Reddit"; homepage = "https://github.com/manojkarthick/reddsaver"; license = with licenses; [ mit /* or */ asl20 ]; maintainers = [ maintainers.manojkarthick ]; }; }