From 3c93d355b477c4297ef462da2bb79358d03767f9 Mon Sep 17 00:00:00 2001 From: Austin Butler Date: Thu, 13 May 2021 20:54:26 -0700 Subject: [PATCH] wrap: init at 0.3.1 --- pkgs/tools/text/wrap/default.nix | 36 ++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/tools/text/wrap/default.nix diff --git a/pkgs/tools/text/wrap/default.nix b/pkgs/tools/text/wrap/default.nix new file mode 100644 index 000000000000..e228f946a8c8 --- /dev/null +++ b/pkgs/tools/text/wrap/default.nix @@ -0,0 +1,36 @@ +{ lib, buildGoModule, fetchFromGitHub, fetchpatch, makeWrapper, courier-prime }: + +buildGoModule rec { + pname = "wrap"; + version = "0.3.1"; + + src = fetchFromGitHub { + owner = "Wraparound"; + repo = "wrap"; + rev = "v${version}"; + sha256 = "0scf7v83p40r9k7k5v41rwiy9yyanfv3jm6jxs9bspxpywgjrk77"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + vendorSha256 = "03q5a5lm8zj1523gxkbc0y6a3mjj1z2h7nrr2qcz8nlghvp4cfaz"; + + patches = [ + (fetchpatch { + name = "courier-prime-variants.patch"; + url = "https://github.com/Wraparound/wrap/commit/b72c280b6eddba9ec7b3507c1f143eb28a85c9c1.patch"; + sha256 = "1d9v0agfd7mgd17k4a8l6vr2kyswyfsyq3933dz56pgs5d3jric5"; + }) + ]; + + postInstall = '' + wrapProgram $out/bin/wrap --prefix XDG_DATA_DIRS : ${courier-prime}/share/ + ''; + + meta = with lib; { + description = "A Fountain export tool with some extras"; + homepage = "https://github.com/Wraparound/wrap"; + license = licenses.gpl3Only; + maintainers = [ maintainers.austinbutler ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ea5e3a4b4310..1e6477bcdd39 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9639,6 +9639,8 @@ in wpgtk = callPackage ../tools/X11/wpgtk { }; + wrap = callPackage ../tools/text/wrap { }; + wring = nodePackages.wring; wrk = callPackage ../tools/networking/wrk { };