diff options
author | Maciej Krüger <mkg20001@gmail.com> | 2020-05-01 18:58:38 +0200 |
---|---|---|
committer | worldofpeace <worldofpeace@protonmail.ch> | 2020-09-05 14:03:02 -0400 |
commit | ad59f20d0409b9508b1c167b46f779859cfb9041 (patch) | |
tree | 8858b87e72422236ea0d847ad505bd1adbeb0e17 /pkgs/desktops | |
parent | 430fe6c741230d9412996800931b83d439c03fba (diff) |
cinnamon.cinnamon-screensaver: init at 4.4.0
Diffstat (limited to 'pkgs/desktops')
-rw-r--r-- | pkgs/desktops/cinnamon/cinnamon-screensaver/default.nix | 111 | ||||
-rw-r--r-- | pkgs/desktops/cinnamon/default.nix | 1 |
2 files changed, 112 insertions, 0 deletions
diff --git a/pkgs/desktops/cinnamon/cinnamon-screensaver/default.nix b/pkgs/desktops/cinnamon/cinnamon-screensaver/default.nix new file mode 100644 index 0000000000000..97f0138de980f --- /dev/null +++ b/pkgs/desktops/cinnamon/cinnamon-screensaver/default.nix @@ -0,0 +1,111 @@ +{ stdenv +, fetchFromGitHub +, pkgconfig +, autoreconfHook +, glib +, dbus +, gettext +, cinnamon-desktop +, cinnamon-common +, intltool +, libxslt +, gtk3 +, libnotify +, libxkbfile +, cinnamon-menus +, libgnomekbd +, libxklavier +, networkmanager +, libwacom +, gnome3 +, libtool +, wrapGAppsHook +, tzdata +, glibc +, gobject-introspection +, python3 +, pam +, accountsservice +, cairo +, xapps +, xorg +, iso-flags-png-320x420 +}: + +stdenv.mkDerivation rec { + pname = "cinnamon-screensaver"; + version = "4.4.0"; + + src = fetchFromGitHub { + owner = "linuxmint"; + repo = pname; + rev = version; + sha256 = "03v41wk1gmgmyl31j7a3pav52gfv2faibj1jnpj3ycwcv4cch5w5"; + }; + + nativeBuildInputs = [ + pkgconfig + autoreconfHook + wrapGAppsHook + gettext + intltool + dbus # for configure.ac + libxslt + libtool + ]; + + buildInputs = [ + # from configure.ac + gobject-introspection + gtk3 + glib + + xorg.libXext + xorg.libXinerama + xorg.libX11 + xorg.libXrandr + + (python3.withPackages (pp: with pp; [ pygobject3 setproctitle xapp pycairo ])) + xapps + pam + accountsservice + cairo + cinnamon-desktop + cinnamon-common + gnome3.libgnomekbd + gnome3.caribou + + # things + iso-flags-png-320x420 + ]; + + NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; # TODO: https://github.com/NixOS/nixpkgs/issues/36468 + + postPatch = '' + patchShebangs autogen.sh + + sed ${stdenv.lib.escapeShellArg "s&DBUS_SESSION_SERVICE_DIR=.*&DBUS_SESSION_SERVICE_DIR=`$PKG_CONFIG --variable session_bus_services_dir dbus-1 | sed -e 's,/usr/share,\${datarootdir},g' | sed 's|^|$out|'`&g"} -i configure.ac + + # cscreensaver hardcodes absolute paths everywhere. Nuke from orbit. + find . -type f -exec sed -i \ + -e s,/usr/share/locale,/run/current-system/sw/share/locale,g \ + -e s,/usr/lib/cinnamon-screensaver,$out/lib,g \ + -e s,/usr/share/cinnamon-screensaver,$out/share,g \ + -e s,/usr/share/iso-flag-png,${iso-flags-png-320x420}/share/iso-flags-png,g \ + {} + + + sed "s|/usr/share/locale|/run/current-system/sw/share/locale|g" -i ./src/cinnamon-screensaver-main.py + ''; + + autoreconfPhase = '' + NOCONFIGURE=1 bash ./autogen.sh + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/linuxmint/cinnamon-screensaver"; + description = "The Cinnamon screen locker and screensaver program"; + license = [ licenses.gpl2 licenses.lgpl2 ]; + platforms = platforms.linux; + maintainers = [ maintainers.mkg20001 ]; + }; +} diff --git a/pkgs/desktops/cinnamon/default.nix b/pkgs/desktops/cinnamon/default.nix index 806ec84fcd9e9..fe0bc86201093 100644 --- a/pkgs/desktops/cinnamon/default.nix +++ b/pkgs/desktops/cinnamon/default.nix @@ -16,6 +16,7 @@ lib.makeScope pkgs.newScope (self: with self; { cinnamon-desktop = callPackage ./cinnamon-desktop { }; cinnamon-menus = callPackage ./cinnamon-menus { }; cinnamon-translations = callPackage ./cinnamon-translations { }; + cinnamon-screensaver = callPackage ./cinnamon-screensaver { }; cinnamon-session = callPackage ./cinnamon-session { }; cinnamon-settings-daemon = callPackage ./cinnamon-settings-daemon { }; cjs = callPackage ./cjs { }; |