nix-tour: Add XDG desktop entry

Co-authored-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
This commit is contained in:
yuu 2022-03-15 14:04:15 -03:00 committed by Artturin
parent 976de01d44
commit 01dd766701
2 changed files with 15 additions and 4 deletions

View File

@ -4,6 +4,8 @@
, electron
, runtimeShell
, makeWrapper
, copyDesktopItems
, makeDesktopItem
}:
stdenv.mkDerivation rec {
@ -17,7 +19,7 @@ stdenv.mkDerivation rec {
sha256 = "09b1vxli4zv1nhqnj6c0vrrl51gaira94i8l7ww96fixqxjgdwvb";
};
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper copyDesktopItems ];
buildInputs = [ electron ];
installPhase = ''
@ -27,6 +29,18 @@ stdenv.mkDerivation rec {
--add-flags $out/share/nix-tour/electron-main.js
'';
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "Tour of Nix";
genericName = "Tour of Nix";
comment =
"Interactive programming guide dedicated to the nix programming language";
categories = [ "Development" "Documentation" ];
exec = "nix-tour";
})
];
meta = with lib; {
description = "'the tour of nix' from nixcloud.io/tour as offline version";
homepage = "https://nixcloud.io/tour";

3
wklkl
View File

@ -1,3 +0,0 @@
review 165492
gnome3.eog gnome3.gnome-disk-utility lsd qbittorrent ripgrep sway