Fix the missing desktop file
This commit is contained in:
parent
9beeda8a9d
commit
02794af163
33
nix/fg42.nix
33
nix/fg42.nix
|
@ -67,6 +67,8 @@ let
|
||||||
paths = map (x: "${x}/bin/") (lib.lists.flatten runtimeBins);
|
paths = map (x: "${x}/bin/") (lib.lists.flatten runtimeBins);
|
||||||
pathsStr = lib.strings.concatStrings (lib.strings.intersperse ":" paths);
|
pathsStr = lib.strings.concatStrings (lib.strings.intersperse ":" paths);
|
||||||
|
|
||||||
|
mimes = import ./mimes.nix;
|
||||||
|
|
||||||
in stdenv.mkDerivation (final: rec {
|
in stdenv.mkDerivation (final: rec {
|
||||||
inherit version;
|
inherit version;
|
||||||
pname = "fg42";
|
pname = "fg42";
|
||||||
|
@ -77,20 +79,6 @@ in stdenv.mkDerivation (final: rec {
|
||||||
exec = "${placeholder "out"}/bin/fg42 %F";
|
exec = "${placeholder "out"}/bin/fg42 %F";
|
||||||
comment = "Emacs Editor for advance users";
|
comment = "Emacs Editor for advance users";
|
||||||
};
|
};
|
||||||
# [Desktop Entry]
|
|
||||||
# Encoding=UTF-8
|
|
||||||
# Name=FG42
|
|
||||||
# GenericName=FG42
|
|
||||||
# Comment=
|
|
||||||
# MimeType=text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-java;application/x-shellscript;text/x-c;text/x-c++;text/x-ruby;text/x-python;text/x-clojure;text/css;text/html;text/x-javascript;
|
|
||||||
# Type=Application
|
|
||||||
# Terminal=false
|
|
||||||
# Categories=Development;TextEditor;
|
|
||||||
# StartupWMClass=FG42
|
|
||||||
# Exec=
|
|
||||||
# Icon=fg42
|
|
||||||
# Version=${version}
|
|
||||||
# '';
|
|
||||||
|
|
||||||
src = srcDir;
|
src = srcDir;
|
||||||
outputs = [ "out" ];
|
outputs = [ "out" ];
|
||||||
|
@ -98,12 +86,29 @@ in stdenv.mkDerivation (final: rec {
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
LISPDIR=$out/share/fg42/
|
LISPDIR=$out/share/fg42/
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
mkdir -p $out/share/applications/
|
||||||
install -d $LISPDIR
|
install -d $LISPDIR
|
||||||
|
|
||||||
cp -rv ${src}/lisp/ $LISPDIR
|
cp -rv ${src}/lisp/ $LISPDIR
|
||||||
cp -rv ${src}/share $out/
|
cp -rv ${src}/share $out/
|
||||||
cp -rv ${src}/snippets $LISPDIR/snippets
|
cp -rv ${src}/snippets $LISPDIR/snippets
|
||||||
|
|
||||||
|
cat >> $out/share/applications/FG42.desktop << EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Name=FG42
|
||||||
|
GenericName=FG42
|
||||||
|
Comment=The nix base Emacs bundle for advance users
|
||||||
|
MimeType=${mimes.mimeTypes}
|
||||||
|
Type=Application
|
||||||
|
Terminal=false
|
||||||
|
Categories=Development;TextEditor;
|
||||||
|
StartupWMClass=FG42
|
||||||
|
Exec=${placeholder "out"}/bin/fg42
|
||||||
|
Icon=fg42
|
||||||
|
Version=${version}
|
||||||
|
EOF
|
||||||
|
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
cd $LISPDIR
|
cd $LISPDIR
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
# Fg42 - Emacs Editor for advance users
|
||||||
|
#
|
||||||
|
# Copyright (c) 2010-2024 Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, version 2.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
rec {
|
||||||
|
types = [
|
||||||
|
"text/x-makefile"
|
||||||
|
"text/x-c++hdr"
|
||||||
|
"text/x-c++src"
|
||||||
|
"text/x-java"
|
||||||
|
"application/x-shellscript"
|
||||||
|
"text/x-c"
|
||||||
|
"text/x-c++"
|
||||||
|
"text/x-ruby"
|
||||||
|
"text/x-python"
|
||||||
|
"text/x-clojure"
|
||||||
|
"text/css"
|
||||||
|
"text/html"
|
||||||
|
"text/x-javascript"
|
||||||
|
];
|
||||||
|
|
||||||
|
mimeTypes = builtins.concatStringsSep ";" types;
|
||||||
|
}
|
Loading…
Reference in New Issue