nixpkgs/pkgs/applications/misc/wtf/default.nix
2021-02-09 18:57:55 +00:00

44 lines
976 B
Nix

{ buildGoModule
, fetchFromGitHub
, lib
, makeWrapper
, ncurses
, stdenv
}:
buildGoModule rec {
pname = "wtf";
version = "0.35.0";
src = fetchFromGitHub {
owner = "wtfutil";
repo = pname;
rev = "v${version}";
sha256 = "sha256-xzMXbF0M7asZtyo8DmM5yyNoHKy0H6amRDhu6hjHgq4=";
};
vendorSha256 = "sha256-6ij0NQMjDnZJhuqkUR7MdBLAMS5Xa2HKIgQjegKJyvc=";
doCheck = false;
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;
broken = stdenv.isDarwin;
};
}