1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/desktops/pantheon/services/elementary-dpms-helper/default.nix

66 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv
, fetchFromGitHub
, pantheon
, meson
, ninja
, desktop-file-utils
, glib
, coreutils
, elementary-settings-daemon
, wrapGAppsHook
}:
2018-08-20 21:31:18 +01:00
stdenv.mkDerivation rec {
pname = "elementary-dpms-helper";
2018-08-20 21:31:18 +01:00
version = "1.0";
repoName = "dpms-helper";
2018-08-20 21:31:18 +01:00
src = fetchFromGitHub {
owner = "elementary";
repo = repoName;
2018-08-20 21:31:18 +01:00
rev = version;
sha256 = "0svfp0qyb6nx4mjl3jx4aqmb4x24m25jpi75mdis3yfr3c1xz9nh";
};
passthru = {
updateScript = pantheon.updateScript {
attrPath = "pantheon.${pname}";
2018-08-20 21:31:18 +01:00
};
};
nativeBuildInputs = [
desktop-file-utils
meson
ninja
wrapGAppsHook
];
buildInputs = [
elementary-settings-daemon
glib
];
preFixup = ''
gappsWrapperArgs+=(--prefix PATH : "${stdenv.lib.makeBinPath [ glib.dev coreutils ]}")
'';
postFixup = ''
substituteInPlace $out/etc/xdg/autostart/io.elementary.dpms-helper.desktop \
--replace "Exec=io.elementary.dpms-helper" "Exec=$out/bin/io.elementary.dpms-helper"
'';
# See: https://github.com/elementary/dpms-helper/pull/10
postInstall = ''
${glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas
'';
meta = with stdenv.lib; {
description = "Sets DPMS settings found in org.pantheon.dpms";
homepage = https://github.com/elementary/dpms-helper;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = pantheon.maintainers;
};
}