nixpkgs-suyu/pkgs/applications/misc/wtf/default.nix
Mario Rodas ad4a1e0f85 wtf: Use Go 1.13 and drop overrideModAttrs
This no longer uses gocenter.io as a proxy, but the official Go module proxy
instead.
2019-11-11 08:51:55 +01:00

39 lines
916 B
Nix

{ buildGoModule
, fetchFromGitHub
, lib
, makeWrapper
, ncurses
}:
buildGoModule rec {
pname = "wtf";
version = "0.24.0";
src = fetchFromGitHub {
owner = "wtfutil";
repo = pname;
rev = "v${version}";
sha256 = "0jz7hjcm0hfxcih2zplp47wx6lyvhhzj9ka4ljqrx0i4l7cm9ahs";
};
modSha256 = "04d8hvd90f7v853p23xcx38qz3ryv7kz7zjk9b131cjnd4mcv0sm";
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
subPackages = [ "." ];
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
mv "$out/bin/wtf" "$out/bin/wtfutil"
wrapProgram "$out/bin/wtfutil" --prefix PATH : "${ncurses.dev}/bin"
'';
meta = with lib; {
description = "The personal information dashboard for your terminal";
homepage = "https://wtfutil.com/";
license = licenses.mpl20;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}