2019-08-16 01:45:22 +01:00
|
|
|
{ buildGoModule
|
2018-11-20 22:13:22 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
2019-09-05 11:07:10 +01:00
|
|
|
, makeWrapper
|
|
|
|
, ncurses
|
2018-11-20 22:13:22 +00:00
|
|
|
}:
|
|
|
|
|
2019-08-16 01:45:22 +01:00
|
|
|
buildGoModule rec {
|
2019-05-26 17:23:10 +01:00
|
|
|
pname = "wtf";
|
2019-09-03 03:00:00 +01:00
|
|
|
version = "0.21.0";
|
2018-11-20 22:13:22 +00:00
|
|
|
|
2019-09-06 07:50:53 +01:00
|
|
|
overrideModAttrs = _oldAttrs : _oldAttrs // {
|
|
|
|
preBuild = ''export GOPROXY="https://gocenter.io"'';
|
|
|
|
};
|
|
|
|
|
2018-11-20 22:13:22 +00:00
|
|
|
src = fetchFromGitHub {
|
2019-05-26 17:23:10 +01:00
|
|
|
owner = "wtfutil";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2019-09-03 03:00:00 +01:00
|
|
|
sha256 = "0sd8vrx7nak0by4whdmd9jzr66zm48knv1w1aqi90709fv98brm9";
|
2018-11-20 22:13:22 +00:00
|
|
|
};
|
|
|
|
|
2019-09-06 07:50:53 +01:00
|
|
|
modSha256 = "0jgq9ql27x0kdp59l5drisl5v7v7sx2wy3zqjbr3bqyh3vdx19ic";
|
2019-08-28 06:00:00 +01:00
|
|
|
|
|
|
|
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
|
2019-08-16 01:45:22 +01:00
|
|
|
|
2019-09-05 11:07:10 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2019-09-12 15:21:08 +01:00
|
|
|
mv "$out/bin/wtf" "$out/bin/wtfutil"
|
|
|
|
wrapProgram "$out/bin/wtfutil" --prefix PATH : "${ncurses.dev}/bin"
|
2019-09-05 11:07:10 +01:00
|
|
|
'';
|
|
|
|
|
2018-11-20 22:13:22 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "The personal information dashboard for your terminal";
|
2019-07-16 03:49:38 +01: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;
|
|
|
|
};
|
|
|
|
}
|