antares: add .desktop file install
This commit is contained in:
parent
d918a8a4ac
commit
4fec5df908
@ -4,6 +4,8 @@
|
|||||||
buildNpmPackage,
|
buildNpmPackage,
|
||||||
electron,
|
electron,
|
||||||
nodejs,
|
nodejs,
|
||||||
|
makeDesktopItem,
|
||||||
|
copyDesktopItems,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildNpmPackage rec {
|
buildNpmPackage rec {
|
||||||
@ -28,6 +30,8 @@ buildNpmPackage rec {
|
|||||||
|
|
||||||
buildInputs = [ nodejs ];
|
buildInputs = [ nodejs ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ copyDesktopItems ];
|
||||||
|
|
||||||
npmBuildScript = "compile";
|
npmBuildScript = "compile";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@ -38,12 +42,30 @@ buildNpmPackage rec {
|
|||||||
makeWrapper ${lib.getExe electron} $out/bin/antares \
|
makeWrapper ${lib.getExe electron} $out/bin/antares \
|
||||||
--add-flags $out/lib/node_modules/antares/main.js
|
--add-flags $out/lib/node_modules/antares/main.js
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
|
||||||
|
# Install icon files
|
||||||
|
mkdir -pv $out/share/icon/
|
||||||
|
cp assets/icon.ico $out/share/icon/antares.ico
|
||||||
'';
|
'';
|
||||||
|
|
||||||
npmFlags = [ "--legacy-peer-deps" ];
|
npmFlags = [ "--legacy-peer-deps" ];
|
||||||
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
||||||
env.PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
|
env.PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
|
||||||
|
|
||||||
|
desktopItems = [
|
||||||
|
(makeDesktopItem {
|
||||||
|
name = pname;
|
||||||
|
desktopName = "Antares SQL";
|
||||||
|
exec = pname;
|
||||||
|
icon = pname;
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
startupWMClass = pname;
|
||||||
|
comment = "A modern, fast and productivity driven SQL client with a focus in UX";
|
||||||
|
categories = [ "Development" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Modern, fast and productivity driven SQL client with a focus in UX";
|
description = "Modern, fast and productivity driven SQL client with a focus in UX";
|
||||||
homepage = "https://github.com/antares-sql/antares";
|
homepage = "https://github.com/antares-sql/antares";
|
||||||
|
Loading…
Reference in New Issue
Block a user