google-chat-linux: init at 5.29.23-1 (#346729)

This commit is contained in:
Wolfgang Walther
2024-12-04 21:55:16 +01:00
committed by GitHub
2 changed files with 77 additions and 0 deletions
+6
View File
@@ -4689,6 +4689,12 @@
githubId = 490965;
name = "Craig Swank";
};
cterence = {
email = "terence.chateigne@posteo.net";
github = "cterence";
githubId = 25285508;
name = "Térence Chateigné";
};
ctron = {
email = "ctron@dentrassi.de";
github = "ctron";
@@ -0,0 +1,71 @@
{
buildNpmPackage,
copyDesktopItems,
electron,
fetchFromGitHub,
lib,
makeDesktopItem,
}:
buildNpmPackage rec {
pname = "google-chat-linux";
version = "5.29.23-1";
src = fetchFromGitHub {
owner = "squalou";
repo = "google-chat-linux";
rev = "refs/tags/${version}";
hash = "sha256-JBjxZUs0HUgAkJJBYhNv2SHjpBtAcP09Ah4ATPwpZsQ=";
};
npmDepsHash = "sha256-7lKWbXyDpYh1sP9LAV/oA7rfpckSbIucwKT21vBrJ3Y=";
dontNpmBuild = true;
nativeBuildInputs = [
copyDesktopItems
];
# npm install will error when electron tries to download its binary
# we don't need it anyways since we wrap the program with our nixpkgs electron
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
postPatch = ''
# https://github.com/electron/electron/issues/31121
substituteInPlace src/paths.js \
--replace-fail "process.resourcesPath" "'$out/lib/node_modules/${pname}/assets'"
'';
postInstall = ''
mkdir -p $out/share/icons
ln -s $out/lib/node_modules/${pname}/build/icons/icon.png $out/share/icons/${pname}.png
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
--add-flags $out/lib/node_modules/${pname}/
'';
desktopItems = [
(makeDesktopItem {
name = "google-chat-linux";
exec = "google-chat-linux";
icon = "google-chat-linux";
desktopName = "Google Chat";
comment = meta.description;
categories = [
"Network"
"InstantMessaging"
];
})
];
meta = {
description = "Electron-base client for Google Hangouts Chat";
homepage = "https://github.com/squalou/google-chat-linux";
downloadPage = "https://github.com/squalou/google-chat-linux/releases";
changelog = "https://github.com/squalou/google-chat-linux/releases/tag/${version}";
license = lib.licenses.wtfpl;
mainProgram = "google-chat-linux";
maintainers = with lib.maintainers; [
cterence
];
platforms = lib.platforms.linux;
};
}