From 7d7994a7cbd127c4808e694495bb79cac12e8964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=A9rence=20Chateign=C3=A9?= Date: Wed, 9 Oct 2024 20:36:15 +0200 Subject: [PATCH 1/2] google-chat-linux: init at 5.29.23-1 --- pkgs/by-name/go/google-chat-linux/package.nix | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 pkgs/by-name/go/google-chat-linux/package.nix diff --git a/pkgs/by-name/go/google-chat-linux/package.nix b/pkgs/by-name/go/google-chat-linux/package.nix new file mode 100644 index 000000000000..3df1deb2dca3 --- /dev/null +++ b/pkgs/by-name/go/google-chat-linux/package.nix @@ -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; + }; +} From ad24e1ca55b34851f7e8cb312163e23e2367dc37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=A9rence=20Chateign=C3=A9?= Date: Wed, 9 Oct 2024 20:36:47 +0200 Subject: [PATCH 2/2] maintainers: add cterence --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 8c1b474b231b..1b7675025e51 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4606,6 +4606,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";