78 lines
1.9 KiB
Nix
Raw Permalink Normal View History

2025-01-21 14:20:19 -08:00
{
lib,
buildNpmPackage,
fetchFromGitHub,
electron,
copyDesktopItems,
makeDesktopItem,
nix-update-script,
}:
2025-03-23 09:16:10 -07:00
buildNpmPackage (finalAttrs: {
2025-01-21 14:20:19 -08:00
pname = "slacky";
2025-07-18 13:42:55 +02:00
version = "0.0.6";
2025-01-21 14:20:19 -08:00
src = fetchFromGitHub {
owner = "andirsun";
repo = "Slacky";
2025-03-23 09:16:10 -07:00
tag = "v${finalAttrs.version}";
2025-07-18 13:42:55 +02:00
hash = "sha256-70mexW+8+0hvVr2PYGtQuBiTh6xo2WFDqLzeCZilgaE=";
2025-01-21 14:20:19 -08:00
};
2025-07-18 13:42:55 +02:00
npmDepsHash = "sha256-Vqpg+j2mIv5XKzX//ptt9gT+SWPXpVSKSCM+E5cmuCQ=";
2025-01-21 14:20:19 -08:00
2025-07-18 13:42:55 +02:00
npmPackFlags = [
"--ignore-scripts"
];
makeCacheWritable = true;
npmFlags = [
"--legacy-peer-deps"
];
strictDeps = true;
2025-01-21 14:20:19 -08:00
nativeBuildInputs = [
copyDesktopItems
];
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
postInstall = ''
mkdir -p $out/share/icons
ln -s $out/lib/node_modules/slacky/build/icons/icon.png $out/share/icons/slacky.png
makeWrapper ${lib.getExe electron} $out/bin/slacky \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
2025-01-21 14:20:19 -08:00
--add-flags $out/lib/node_modules/slacky/
'';
desktopItems = lib.singleton (makeDesktopItem {
name = "slacky";
exec = "slacky %u";
icon = "slacky";
desktopName = "Slacky";
comment = "An unofficial Slack desktop client for arm64 Linux";
startupWMClass = "com.andersonlaverde.slacky";
type = "Application";
categories = [
"Network"
"InstantMessaging"
];
mimeTypes = [
"x-scheme-handler/slack"
];
});
passthru.updateScript = nix-update-script { };
meta = {
description = "Unofficial Slack desktop client for arm64 Linux";
homepage = "https://github.com/andirsun/Slacky";
2025-03-23 09:16:10 -07:00
changelog = "https://github.com/andirsun/Slacky/releases/tag/v${finalAttrs.version}";
2025-01-21 14:20:19 -08:00
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ awwpotato ];
platforms = lib.platforms.linux;
2025-01-21 14:20:19 -08:00
mainProgram = "slacky";
};
2025-03-23 09:16:10 -07:00
})