2019-08-16 00:45:22 +00:00
|
|
|
{ buildGoModule
|
2018-11-20 22:13:22 +00:00
|
|
|
, fetchFromGitHub
|
2020-03-21 10:52:00 +00:00
|
|
|
, stdenv
|
2019-09-05 10:07:10 +00:00
|
|
|
, makeWrapper
|
|
|
|
, ncurses
|
2020-03-21 10:52:00 +00:00
|
|
|
, Security
|
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";
|
2020-02-10 10:39:44 +00:00
|
|
|
version = "0.27.0";
|
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}";
|
2020-02-10 10:39:44 +00:00
|
|
|
sha256 = "0j184s82bnnhrpm7vdsqg7i3xfm2wqz8jmwqxjkfw87ifgvaha5d";
|
2019-09-12 14:21:32 +00:00
|
|
|
};
|
2018-11-20 22:13:22 +00:00
|
|
|
|
2020-02-10 10:39:44 +00:00
|
|
|
modSha256 = "14qbjv8rnidfqxzqhli7jyj4573s0swwypdj11mpykcrzk9by8xk";
|
2019-08-28 05:00:00 +00:00
|
|
|
|
|
|
|
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
|
2019-08-16 00:45:22 +00:00
|
|
|
|
2019-11-11 07:51:55 +00:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2019-09-05 10:07:10 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2020-03-21 10:52:00 +00:00
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
2019-09-05 10:07:10 +00:00
|
|
|
postInstall = ''
|
2019-09-12 14:21:08 +00:00
|
|
|
mv "$out/bin/wtf" "$out/bin/wtfutil"
|
|
|
|
wrapProgram "$out/bin/wtfutil" --prefix PATH : "${ncurses.dev}/bin"
|
2019-09-05 10:07:10 +00:00
|
|
|
'';
|
|
|
|
|
2020-03-21 10:52:00 +00:00
|
|
|
meta = with stdenv.lib; {
|
2018-11-20 22:13:22 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|