Merge pull request #27734 from jfrankenau/add-desktop-entries

Add desktop entry files for FreeCAD and ddccontrol
This commit is contained in:
Michael Raskin
2018-02-06 21:21:04 +00:00
committed by GitHub
2 changed files with 53 additions and 2 deletions
+20 -1
View File
@@ -1,9 +1,10 @@
{ stdenv, fetchurl, autoreconfHook, intltool, perl, perlPackages, libxml2
, pciutils, pkgconfig, gtk2, ddccontrol-db
, makeDesktopItem
}:
let version = "0.4.2"; in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
name = "ddccontrol-${version}";
src = fetchurl {
@@ -32,6 +33,24 @@ stdenv.mkDerivation {
sed -e "s/chmod 4711/chmod 0711/" -i src/ddcpci/Makefile*
'';
postInstall = ''
mkdir -p $out/share/applications/
cp $desktopItem/share/applications/* $out/share/applications/
for entry in $out/share/applications/*.desktop; do
substituteAllInPlace $entry
done
'';
desktopItem = makeDesktopItem {
name = "gddccontrol";
desktopName = "gddccontrol";
genericName = "DDC/CI control";
comment = meta.description;
exec = "@out@/bin/gddccontrol";
icon = "gddccontrol";
categories = "Settings;HardwareSettings;";
};
meta = with stdenv.lib; {
description = "A program used to control monitor parameters by software";
homepage = http://ddccontrol.sourceforge.net/;