summary refs log tree commit diff
path: root/pkgs/desktops/gnome-3/misc/gnome-screensaver/default.nix
blob: b1e9cde906cffcdc1fea070d2b1753a2312322fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{ stdenv
, fetchgit
, autoreconfHook
, dbus-glib
, glib
, gnome-common
, gnome-desktop
, gnome3
, gtk3
, pkgconfig
, intltool
, pam
, systemd
, wrapGAppsHook
}:

stdenv.mkDerivation rec {
  pname = "gnome-screensaver";
  version = "3.6.1";

  # the original package is deprecated and the Ubuntu version has a number of useful patches
  src = fetchgit {
    url = "https://git.launchpad.net/ubuntu/+source/gnome-screensaver";
    rev =  "4f7b666131dec060a5aac9117f395ac522a627b4";
    sha256 = "15xqgcpm825cy3rm8pj00qlblq66svmh06lcw8qi74a3g0xcir87";
  };

  # from debian/patches/series
  patches = map (patch: "debian/patches/${patch}") [
    "00git_logind_check.patch"
    "01_no_autostart.patch"
    "03_fix_ltsp-fading.patch"
    "05_dbus_service.patch"
    "10_legacy_scrsvr_inhibit.patch"
    "13_nvidia_gamma_fade_fallback.patch"
    "14_no_fade_on_user_switch.patch"
    "15_dont_crash_on_no_fade.patch"
    "16_dont_crash_in_kvm.patch"
    "17_remove_top_panel.patch"
    "18_unity_dialog_layout.patch"
    "24_use_user_settings.patch"
    "25_fix_lock_command.patch"
    "27_lightdm_switch_user.patch"
    "28_blocking_return.patch"
    "29_handle_expired_creds.patch"
    # these two patches are ubuntu-specific
    # "30_ubuntu-lock-on-suspend_gsetting.patch"
    # "31_lock_screen_on_suspend.patch"
    "32_input_sources_switcher.patch"
    "move-not-nuke.patch"
    "allow-replacement"
    "libsystemd.patch"
    "0001-gs-lock-plug-Disconnect-signal-handler-from-right-ob.patch"
    "33_budgie_support.patch"
  ] ++ [ ./fix-dbus-service-dir.patch ];

  nativeBuildInputs = [
    autoreconfHook
    intltool
    wrapGAppsHook
    gnome-common
    pkgconfig
  ];

  buildInputs = [
    glib
    gtk3
    gnome-desktop
    dbus-glib
    pam
    systemd
  ];

  configureFlags = [ "--enable-locking" "--with-systemd=yes" ];

  enableParallelBuilding = true;

  doCheck = true;

  passthru = {
    updateScript = gnome3.updateScript {
      packageName = pname;
      attrPath = "gnome3.${pname}";
    };
  };

  meta = with stdenv.lib; {
    description = "Component of Gnome Flashback that provides screen locking";
    homepage = https://wiki.gnome.org/Projects/GnomeScreensaver;
    license = licenses.gpl2Plus;
    maintainers = gnome3.maintainers;
    platforms = platforms.linux;
  };
}