nixpkgs/pkgs/applications/misc/wtf/default.nix

42 lines
1001 B
Nix
Raw Normal View History

2019-08-16 00:45:22 +00:00
{ buildGoModule
2018-11-20 22:13:22 +00:00
, fetchFromGitHub
, lib
, makeWrapper
, ncurses
2018-11-20 22:13:22 +00:00
}:
2019-08-16 00:45:22 +00:00
buildGoModule rec {
2019-05-26 16:23:10 +00:00
pname = "wtf";
2019-11-10 21:14:41 +00:00
version = "0.24.0";
2018-11-20 22:13:22 +00:00
overrideModAttrs = _oldAttrs : _oldAttrs // {
preBuild = ''export GOPROXY="https://gocenter.io"'';
};
2018-11-20 22:13:22 +00:00
src = fetchFromGitHub {
2019-05-26 16:23:10 +00:00
owner = "wtfutil";
repo = pname;
rev = "v${version}";
2019-11-10 21:14:41 +00:00
sha256 = "0jz7hjcm0hfxcih2zplp47wx6lyvhhzj9ka4ljqrx0i4l7cm9ahs";
2019-09-12 14:21:32 +00:00
};
2018-11-20 22:13:22 +00:00
2019-11-10 21:14:41 +00:00
modSha256 = "03vj6q1ln71r685k2j91ycj6xxrc688pj4bdc561693r20sr49xj";
2019-08-28 05:00:00 +00:00
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
2019-08-16 00:45:22 +00:00
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
mv "$out/bin/wtf" "$out/bin/wtfutil"
wrapProgram "$out/bin/wtfutil" --prefix PATH : "${ncurses.dev}/bin"
'';
2018-11-20 22:13:22 +00:00
meta = with lib; {
description = "The personal information dashboard for your terminal";
2019-07-16 02:49:38 +00:00
homepage = "https://wtfutil.com/";
2018-11-20 22:13:22 +00:00
license = licenses.mpl20;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}