summary refs log tree commit diff
path: root/pkgs/build-support/make-desktopitem
diff options
context:
space:
mode:
authorSander van der Burg <s.vanderburg@tudelft.nl>2009-05-10 12:03:53 +0000
committerSander van der Burg <s.vanderburg@tudelft.nl>2009-05-10 12:03:53 +0000
commita8315aa241709829c571ed7f7c875612a992dc08 (patch)
tree287c1d0648f0dc0ed7ad22314f8bf3a8fc868117 /pkgs/build-support/make-desktopitem
parent52f61aa067bec441da24ff0f1987d5b2a0dc9b67 (diff)
downloadnixpkgs-a8315aa241709829c571ed7f7c875612a992dc08.tar
nixpkgs-a8315aa241709829c571ed7f7c875612a992dc08.tar.gz
nixpkgs-a8315aa241709829c571ed7f7c875612a992dc08.tar.bz2
nixpkgs-a8315aa241709829c571ed7f7c875612a992dc08.tar.lz
nixpkgs-a8315aa241709829c571ed7f7c875612a992dc08.tar.xz
nixpkgs-a8315aa241709829c571ed7f7c875612a992dc08.tar.zst
nixpkgs-a8315aa241709829c571ed7f7c875612a992dc08.zip
Added desktop file generation function and desktop item for firefox
svn path=/nixpkgs/trunk/; revision=15529
Diffstat (limited to 'pkgs/build-support/make-desktopitem')
-rw-r--r--pkgs/build-support/make-desktopitem/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/build-support/make-desktopitem/default.nix b/pkgs/build-support/make-desktopitem/default.nix
new file mode 100644
index 00000000000..7f3b97a33b7
--- /dev/null
+++ b/pkgs/build-support/make-desktopitem/default.nix
@@ -0,0 +1,33 @@
+{stdenv}:
+{ name
+, type ? "Application"
+, exec
+, icon ? ""
+, comment ? ""
+, terminal ? "false"
+, desktopName
+, genericName
+, mimeType ? ""
+, categories ? "Application;Other;"
+, encoding ? "UTF-8"
+}:
+
+stdenv.mkDerivation {
+  inherit name;
+  buildCommand = ''
+    ensureDir $out/share/applications
+    cat > $out/share/applications/$name.desktop <<EOF
+    [Desktop Entry]
+    Type=${type}
+    Exec=${exec}
+    Icon=${icon}
+    Comment=${comment}
+    Terminal=${terminal}
+    Name=${desktopName}
+    GenericName=${genericName}
+    MimeType=${mimeType}
+    Categories=${categories}
+    Encoding=${encoding}
+    EOF
+  '';
+}