From f398d979d1c47538ed7ca1f3241bb4237c45b5e1 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 4 Oct 2024 11:29:13 -0700 Subject: feat(pkgs): package suzuri --- pkgs/suzuri.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pkgs/suzuri.nix (limited to 'pkgs') diff --git a/pkgs/suzuri.nix b/pkgs/suzuri.nix new file mode 100644 index 0000000..d1b6fe1 --- /dev/null +++ b/pkgs/suzuri.nix @@ -0,0 +1,43 @@ +{ + stdenvNoCC, + fetchFromGitHub, + lib, + pkgs, + html2md, +}: +let + owner = "Fuwn"; +in +stdenvNoCC.mkDerivation rec { + pname = "suzuri"; + version = "3b0de76"; + + src = fetchFromGitHub { + inherit owner; + + repo = pname; + rev = "3b0de76c51e88b7be70c85e1dffc2346aa5e1303"; + hash = "sha256-t+9DW2nLEIJyVnF/gpvBnSL+l59t+TQ7z0irfrYV5Yw="; + }; + + installPhase = '' + mkdir -p $out/bin + cp ${pname} $out/bin + ''; + + patchPhase = with pkgs; '' + sed -i 's|pup|${pup}/bin/pup|g' ${pname} + sed -i 's|glow|${glow}/bin/glow|g' ${pname} + sed -i 's|html2md|${html2md}/bin/html2md|g' ${pname} + sed -i "s|'curl'|'${curl}/bin/curl'|g" ${pname} + ''; + + meta = with lib; { + description = "Command-line Interface to sumi.news"; + homepage = "https://github.com/${owner}/${pname}"; + license = licenses.gpl3Only; + platforms = platforms.unix; + mainProgram = pname; + maintainers = [ maintainers.Fuwn ]; + }; +} -- cgit v1.2.3