diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-02-24 01:09:00 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-02-24 01:09:00 +0000 |
commit | 072c01a28f865e9487df09aed7ddff328252fb36 (patch) | |
tree | 6df6e652915940255f294ed8998cce1c4c7c2d40 /nixpkgs/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy | |
parent | 024b46ff20027c15322e5d868ecec42632556d4b (diff) | |
parent | 969cff2691a02b3d7e5468beda26c482d8986644 (diff) | |
download | nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar.gz nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar.bz2 nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar.lz nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar.xz nixlib-072c01a28f865e9487df09aed7ddff328252fb36.tar.zst nixlib-072c01a28f865e9487df09aed7ddff328252fb36.zip |
Merge commit '969cff2691a02b3d7e5468beda26c482d8986644'
Diffstat (limited to 'nixpkgs/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy')
2 files changed, 98 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy/default.nix b/nixpkgs/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy/default.nix new file mode 100644 index 000000000000..4060e0717891 --- /dev/null +++ b/nixpkgs/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy/default.nix @@ -0,0 +1,62 @@ +{ stdenv, fetchFromGitHub, pantheon, meson, python3, ninja +, pkgconfig, vala, libgee, granite, gtk3, polkit, zeitgeist +, switchboard, lightlocker, pantheon-agent-geoclue2, gobject-introspection }: + +stdenv.mkDerivation rec { + pname = "switchboard-plug-security-privacy"; + version = "2.2.0"; + + src = fetchFromGitHub { + owner = "elementary"; + repo = pname; + rev = version; + sha256 = "0f1idh36hlgmdva5jn0xnj2b6gbic0asnj3b7j283gyziibm3pxa"; + }; + + passthru = { + updateScript = pantheon.updateScript { + repoName = pname; + }; + }; + + nativeBuildInputs = [ + gobject-introspection + meson + ninja + pkgconfig + python3 + vala + ]; + + buildInputs = [ + granite + gtk3 + libgee + polkit + switchboard + zeitgeist + ]; + + PKG_CONFIG_SWITCHBOARD_2_0_PLUGSDIR = "lib/switchboard"; + + patches = [ + ./hardcode-gsettings.patch + ]; + + postPatch = '' + chmod +x meson/post_install.py + patchShebangs meson/post_install.py + + substituteInPlace src/Views/LockPanel.vala --subst-var-by LIGHTLOCKER_GSETTINGS_PATH ${lightlocker}/share/gsettings-schemas/${lightlocker.name}/glib-2.0/schemas + substituteInPlace src/Views/FirewallPanel.vala --subst-var-by SWITCHBOARD_SEC_PRIV_GSETTINGS_PATH $out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas + ''; + + meta = with stdenv.lib; { + description = "Switchboard Security & Privacy Plug"; + homepage = https://github.com/elementary/switchboard-plug-security-privacy; + license = licenses.lgpl3Plus; + platforms = platforms.linux; + maintainers = pantheon.maintainers; + }; + +} diff --git a/nixpkgs/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy/hardcode-gsettings.patch b/nixpkgs/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy/hardcode-gsettings.patch new file mode 100644 index 000000000000..ffaf1ecf5db1 --- /dev/null +++ b/nixpkgs/pkgs/desktops/pantheon/apps/switchboard-plugs/security-privacy/hardcode-gsettings.patch @@ -0,0 +1,36 @@ +diff --git a/src/Views/FirewallPanel.vala b/src/Views/FirewallPanel.vala +index 994c4d1..5702de2 100644 +--- a/src/Views/FirewallPanel.vala ++++ b/src/Views/FirewallPanel.vala +@@ -49,10 +49,13 @@ public class SecurityPrivacy.FirewallPanel : Granite.SimpleSettingsPage { + } + + construct { +- settings = new Settings ("io.elementary.switchboard.security-privacy"); ++ SettingsSchemaSource sss = new SettingsSchemaSource.from_directory ("@SWITCHBOARD_SEC_PRIV_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true); ++ SettingsSchema security_privacy_schema = sss.lookup ("io.elementary.switchboard.security-privacy", false); ++ settings = new Settings.full (security_privacy_schema, null, null); ++ + disabled_rules = new Gee.HashMap<string, UFWHelpers.Rule> (); + load_disabled_rules (); +- ++ + status_switch.notify["active"].connect (() => { + if (loading == false) { + view.sensitive = status_switch.active; +diff --git a/src/Views/LockPanel.vala b/src/Views/LockPanel.vala +index 081cf10..42f6118 100644 +--- a/src/Views/LockPanel.vala ++++ b/src/Views/LockPanel.vala +@@ -30,7 +30,10 @@ public class SecurityPrivacy.LockPanel : Granite.SimpleSettingsPage { + } + + construct { +- locker = new Settings ("apps.light-locker"); ++ SettingsSchemaSource sss = new SettingsSchemaSource.from_directory ("@LIGHTLOCKER_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true); ++ SettingsSchema locker_schema = sss.lookup ("apps.light-locker", false); ++ ++ locker = new Settings.full (locker_schema, null, null); + + var lock_suspend_label = new Gtk.Label (_("Lock on sleep:")); + var lock_suspend_switch = new Gtk.Switch (); |