@@ -1,21 +1,31 @@
1−{ lib, stdenv, fetchFromGitHub, autoreconfHook, intltool, libxml2
2−, pciutils, pkg-config, gtk2, ddccontrol-db
3−, makeDesktopItem
1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, autoreconfHook
5+, intltool
6+, libxml2
7+, pciutils
8+, pkg-config
9+, gtk2
10+, ddccontrol-db
411}:
512
6−let version = "0.4.4"; in
713stdenv.mkDerivation rec {
814 pname = "ddccontrol";
9− inherit version;
15+ version = "0.5.1";
1016
1117 src = fetchFromGitHub {
1218 owner = "ddccontrol";
1319 repo = "ddccontrol";
14− rev = "0.4.4";
15− sha256 = "09npy6z2j3jrvpvlr46vih31y2mbrh7wsqlbrjprxjv1j0kkz5q2";
20+ rev = "0.5.1";
21+ sha256 = "sha256-e6Rzzz5S+Um2ZBuUkfAJQA4V+zqCqsUHB0f1t/dTU2w=";
1622 };
1723
18− nativeBuildInputs = [ autoreconfHook intltool pkg-config ];
24+ nativeBuildInputs = [
25+ autoreconfHook
26+ intltool
27+ pkg-config
28+ ];
1929
2030 buildInputs = [
2131 libxml2
@@ -24,8 +34,6 @@ stdenv.mkDerivation rec {
2434 ddccontrol-db
2535 ];
2636
27− hardeningDisable = [ "format" "bindnow" ];
28−
2937 prePatch = ''
3038 oldPath="\$""{datadir}/ddccontrol-db"
3139 newPath="${ddccontrol-db}/share/ddccontrol-db"
@@ -37,29 +45,11 @@ stdenv.mkDerivation rec {
3745 intltoolize --force
3846 '';
3947
40− postInstall = ''
41− mkdir -p $out/share/applications/
42− cp $desktopItem/share/applications/* $out/share/applications/
43− for entry in $out/share/applications/*.desktop; do
44− substituteAllInPlace $entry
45− done
46− '';
47−
48− desktopItem = makeDesktopItem {
49− name = "gddccontrol";
50− desktopName = "gddccontrol";
51− genericName = "DDC/CI control";
52− comment = meta.description;
53− exec = "@out@/bin/gddccontrol";
54− icon = "gddccontrol";
55− categories = "Settings;HardwareSettings;";
56− };
57−
5848 meta = with lib; {
5949 description = "A program used to control monitor parameters by software";
6050 homepage = "https://github.com/ddccontrol/ddccontrol";
61− license = licenses.gpl2;
62− platforms = [ "i686-linux" "x86_64-linux" ];
63− maintainers = [ lib.maintainers.pakhfn ];
51+ license = licenses.gpl2Plus;
52+ platforms = platforms.linux;
53+ maintainers = with lib.maintainers; [ pakhfn ];
6454 };
6555}