waybar-lyric: 0.12.2 -> 0.14.3
Changelog for 0.14.3 can be found at https://github.com/Nadim147c/waybar-lyric/releases/tag/v0.14.3 I've add version injection via ldflags and shell completions via installShellCompletion (installShellFiles).
This commit is contained in:
@@ -1,22 +1,38 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
versionCheckHook,
|
||||
nix-update-script,
|
||||
installShellFiles,
|
||||
}:
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "waybar-lyric";
|
||||
version = "0.12.2";
|
||||
version = "0.14.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Nadim147c";
|
||||
repo = "waybar-lyric";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-2iuMlcKDnhRc3PZNMjhkHElEyVdx8+p+ONHn8lC4dQ0=";
|
||||
hash = "sha256-bpc0AF/PcdmkVr791uT2PxgV59wTAAtFMFtKHKwtkQI=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-JpAlpTHPxPWHBCeegnUVYsM9LjUCuvfFd0JjQpCccaM=";
|
||||
vendorHash = "sha256-TeAZDSiww9/v3uQl8THJZdN/Ffp+FsZ3TsRStE3ndKA=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.Version=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd waybar-lyric \
|
||||
--bash <($out/bin/waybar-lyric _carapace bash) \
|
||||
--fish <($out/bin/waybar-lyric _carapace fish) \
|
||||
--zsh <($out/bin/waybar-lyric _carapace zsh)
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
Reference in New Issue
Block a user