50 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2024-10-19 08:40:03 -05:00
{
buildGoModule,
cbconvert,
gtk3,
2024-11-08 08:07:35 -06:00
pkg-config,
2024-12-01 14:24:42 -06:00
versionCheckHook,
2024-10-19 08:40:03 -05:00
wrapGAppsHook3,
}:
buildGoModule rec {
pname = "cbconvert-gui";
inherit (cbconvert)
patches
src
tags
version
;
2024-11-08 08:07:35 -06:00
nativeBuildInputs = [
pkg-config
2024-10-19 08:40:03 -05:00
wrapGAppsHook3
];
buildInputs = cbconvert.buildInputs ++ [ gtk3 ];
2024-11-08 08:07:35 -06:00
vendorHash = "sha256-oMW5zfAw2VQSVaB+Z1pE51OtNIFr+PnRMM+oBYNLWxk=";
2024-10-19 08:40:03 -05:00
modRoot = "cmd/cbconvert-gui";
ldflags = [
"-s"
"-w"
"-X main.appVersion=${version}"
];
postInstall = ''
install -D --mode=0644 --target-directory=$out/share/icons/hicolor/256x256/apps dist/linux/io.github.gen2brain.cbconvert.png
2024-11-08 08:07:35 -06:00
install -D --mode=0644 --target-directory=$out/share/applications/ dist/linux/io.github.gen2brain.cbconvert.desktop
install -D --mode=0644 --target-directory=$out/share/metainfo dist/linux/io.github.gen2brain.cbconvert.metainfo.xml
install -D --mode=0644 --target-directory=$out/share/thumbnailers dist/linux/io.github.gen2brain.cbconvert.thumbnailer
2024-10-19 08:40:03 -05:00
'';
2024-12-01 14:24:42 -06:00
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "version";
2024-10-19 08:40:03 -05:00
meta = cbconvert.meta // {
mainProgram = "cbconvert-gui";
};
}