Files
nixpkgs/pkgs/by-name/wt/wtfutil/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.5 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
makeWrapper,
ncurses,
versionCheckHook,
nix-update-script,
}:
buildGoModule rec {
pname = "wtfutil";
version = "0.46.1";
src = fetchFromGitHub {
owner = "wtfutil";
repo = "wtf";
rev = "v${version}";
sha256 = "sha256-GLLTI/hxlkt3OvtTWRNdzQ9jzO4xzJV9RruiJUyWD5g=";
};
vendorHash = "sha256-OSoQkBAx0kJKiKq0pRGrkkSowTynw/MJvYSdhd1Jt/k=";
proxyVendor = true;
doCheck = false;
ldflags = [
"-s"
"-w"
];
subPackages = [ "." ];
nativeBuildInputs = [ makeWrapper ];
postPatch = ''
substituteInPlace flags/flags.go --replace-fail 'version := "dev"' 'version := "v${version}"'
'';
postInstall = ''
mv "$out/bin/wtf" "$out/bin/wtfutil"
wrapProgram "$out/bin/wtfutil" --prefix PATH : "${ncurses.dev}/bin"
'';
doInstallCheck = true;
# Darwin Error: mkdir /var/empty: file exists
nativeInstallCheckInputs = lib.optional (!stdenv.hostPlatform.isDarwin) [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
description = "Personal information dashboard for your terminal";
homepage = "https://wtfutil.com/";
changelog = "https://github.com/wtfutil/wtf/raw/v${version}/CHANGELOG.md";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
xiaoxiangmoe
kalbasit
];
mainProgram = "wtfutil";
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}