mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 21:43:32 +00:00
08afddc9d5
Don't need pkgconfig override because of
* fb3dc06231
https://github.com/elementary/switchboard-plug-power/releases/tag/2.4.0
82 lines
1.7 KiB
Nix
82 lines
1.7 KiB
Nix
{ stdenv
|
|
, fetchFromGitHub
|
|
, pantheon
|
|
, substituteAll
|
|
, meson
|
|
, ninja
|
|
, pkgconfig
|
|
, vala
|
|
, libgee
|
|
, elementary-dpms-helper
|
|
, elementary-settings-daemon
|
|
, granite
|
|
, gtk3
|
|
, glib
|
|
, dbus
|
|
, polkit
|
|
, switchboard
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "switchboard-plug-power";
|
|
version = "2.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "elementary";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "1b25slfh8166v9z2zmb25k64pcj0lh001qh04qhfilzfcbh54krj";
|
|
};
|
|
|
|
passthru = {
|
|
updateScript = pantheon.updateScript {
|
|
repoName = pname;
|
|
};
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkgconfig
|
|
vala
|
|
];
|
|
|
|
buildInputs = [
|
|
dbus
|
|
glib
|
|
granite
|
|
gtk3
|
|
libgee
|
|
polkit
|
|
switchboard
|
|
];
|
|
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./dpms-helper-exec.patch;
|
|
elementary_dpms_helper = elementary-dpms-helper;
|
|
})
|
|
./hardcode-gsettings.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/MainView.vala \
|
|
--subst-var-by DPMS_HELPER_GSETTINGS_PATH ${glib.getSchemaPath elementary-dpms-helper}
|
|
substituteInPlace src/MainView.vala \
|
|
--subst-var-by GSD_GSETTINGS_PATH ${glib.getSchemaPath elementary-settings-daemon}
|
|
'';
|
|
|
|
PKG_CONFIG_SWITCHBOARD_2_0_PLUGSDIR = "${placeholder "out"}/lib/switchboard";
|
|
PKG_CONFIG_DBUS_1_SYSTEM_BUS_SERVICES_DIR = "${placeholder "out"}/share/dbus-1/system-services";
|
|
PKG_CONFIG_DBUS_1_SYSCONFDIR = "${placeholder "out"}/etc";
|
|
PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions";
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Switchboard Power Plug";
|
|
homepage = https://github.com/elementary/switchboard-plug-power;
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.linux;
|
|
maintainers = pantheon.maintainers;
|
|
};
|
|
}
|