ddccontrol: 0.4.4 -> 0.5.1

desktop file is now upstream
This commit is contained in:
Jan Tojnar 2021-02-11 08:26:20 +01:00
parent 0cf1f67aa1
commit 8909b5de82

View File

@ -1,21 +1,31 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, intltool, libxml2 { lib
, pciutils, pkg-config, gtk2, ddccontrol-db , stdenv
, makeDesktopItem , fetchFromGitHub
, autoreconfHook
, intltool
, libxml2
, pciutils
, pkg-config
, gtk2
, ddccontrol-db
}: }:
let version = "0.4.4"; in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "ddccontrol"; pname = "ddccontrol";
inherit version; version = "0.5.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ddccontrol"; owner = "ddccontrol";
repo = "ddccontrol"; repo = "ddccontrol";
rev = "0.4.4"; rev = "0.5.1";
sha256 = "09npy6z2j3jrvpvlr46vih31y2mbrh7wsqlbrjprxjv1j0kkz5q2"; sha256 = "sha256-e6Rzzz5S+Um2ZBuUkfAJQA4V+zqCqsUHB0f1t/dTU2w=";
}; };
nativeBuildInputs = [ autoreconfHook intltool pkg-config ]; nativeBuildInputs = [
autoreconfHook
intltool
pkg-config
];
buildInputs = [ buildInputs = [
libxml2 libxml2
@ -24,8 +34,6 @@ stdenv.mkDerivation rec {
ddccontrol-db ddccontrol-db
]; ];
hardeningDisable = [ "format" "bindnow" ];
prePatch = '' prePatch = ''
oldPath="\$""{datadir}/ddccontrol-db" oldPath="\$""{datadir}/ddccontrol-db"
newPath="${ddccontrol-db}/share/ddccontrol-db" newPath="${ddccontrol-db}/share/ddccontrol-db"
@ -37,29 +45,11 @@ stdenv.mkDerivation rec {
intltoolize --force intltoolize --force
''; '';
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 lib; { meta = with lib; {
description = "A program used to control monitor parameters by software"; description = "A program used to control monitor parameters by software";
homepage = "https://github.com/ddccontrol/ddccontrol"; homepage = "https://github.com/ddccontrol/ddccontrol";
license = licenses.gpl2; license = licenses.gpl2Plus;
platforms = [ "i686-linux" "x86_64-linux" ]; platforms = platforms.linux;
maintainers = [ lib.maintainers.pakhfn ]; maintainers = with lib.maintainers; [ pakhfn ];
}; };
} }