2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2019-08-05 18:02:06 +00:00
|
|
|
, fetchFromGitHub
|
2020-07-29 16:33:39 +00:00
|
|
|
, nix-update-script
|
2019-08-05 18:02:06 +00:00
|
|
|
, pantheon
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, desktop-file-utils
|
|
|
|
, glib
|
|
|
|
, coreutils
|
|
|
|
, elementary-settings-daemon
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
2018-08-20 20:31:18 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-05 22:41:32 +00:00
|
|
|
pname = "elementary-dpms-helper";
|
2018-08-20 20:31:18 +00:00
|
|
|
version = "1.0";
|
|
|
|
|
2019-08-05 22:41:32 +00:00
|
|
|
repoName = "dpms-helper";
|
2018-08-20 20:31:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elementary";
|
2019-08-05 22:41:32 +00:00
|
|
|
repo = repoName;
|
2018-08-20 20:31:18 +00:00
|
|
|
rev = version;
|
2020-09-03 23:43:09 +00:00
|
|
|
sha256 = "sha256-0KbfAxvZ+aFjq+XEK4uoRHSyKlaky0FlJd2a5TG4bms=";
|
2018-08-20 20:31:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
2020-07-29 16:33:39 +00:00
|
|
|
updateScript = nix-update-script {
|
2019-12-22 06:44:42 +00:00
|
|
|
attrPath = "pantheon.${pname}";
|
2018-08-20 20:31:18 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
desktop-file-utils
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
elementary-settings-daemon
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
|
|
|
preFixup = ''
|
2021-01-15 13:21:58 +00:00
|
|
|
gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ glib.dev coreutils ]}")
|
2018-08-20 20:31:18 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-08-20 20:31:18 +00:00
|
|
|
description = "Sets DPMS settings found in org.pantheon.dpms";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/elementary/dpms-helper";
|
2018-08-20 20:31:18 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = pantheon.maintainers;
|
|
|
|
};
|
|
|
|
}
|