fix(flake.nix): Add .desktop entry and install icon#3157
Conversation
|
Thanks for picking this up — the fix solves #3156 cleanly. One non-blocking suggestion if you'd like to revisit: the nixpkgs-idiomatic way to install a Sketch: let
desktopItem = pkgs.makeDesktopItem {
name = "librefang-desktop";
desktopName = "LibreFang";
exec = "librefang-desktop";
icon = "librefang-desktop";
comment = "Open-source Agent Operating System";
# `AI` isn't in the freedesktop main-category list — most menus
# will silently drop it. `Utility` / `Network` / `Office` are the
# standard ones; pick whichever fits best.
categories = [ "Utility" "Network" ];
keywords = [ "AI" "Agent" "LLM" "Automation" ];
startupWMClass = "librefang-desktop";
};
in
pkgs.rustPlatform.buildRustPackage {
# … existing fields …
nativeBuildInputs = (oldNativeBuildInputs or []) ++ [ pkgs.copyDesktopItems ];
desktopItems = [ desktopItem ];
postInstall = pkgs.lib.optionalString pkgs.stdenv.isLinux ''
install -Dm644 ${./crates/librefang-desktop/icons/128x128.png} \
$out/share/icons/hicolor/128x128/apps/librefang-desktop.png
install -Dm644 ${./crates/librefang-desktop/icons/32x32.png} \
$out/share/icons/hicolor/32x32/apps/librefang-desktop.png
'';
}Two side notes that apply either way:
Either approach works — if you'd rather keep this PR small and merge as-is, I can open a follow-up later. Up to you. |
|
Thanks for the help, my info on making desktop entries was outdated. I will improve the PR. |
|
Sorry for being too slow with my refactor. You fixed it faster than my computer managed to compile it. |
Type
Summary
The PR adds the .desktop entry for
librefang-desktopapp, thus solves the issue #3156.Changes
The
flake.nixhas new PostInstall instruction forlibrefang-desktopAttribution
Does not apply.
Testing
Does not apply.
Security
Does not apply.