Merge pull request #86069 from mkg20001/pkg/cinnamon-screensaver

cinnamon.cinnamon-screensaver: init at 4.4.0
This commit is contained in:
WORLDofPEACE 2020-09-05 15:18:37 -04:00 committed by GitHub
commit 98572a296b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 362 additions and 0 deletions

View File

@ -0,0 +1,47 @@
{ stdenv
, fetchFromGitHub
, perl
, perlPackages
, inkscape
, pngcrush
, librsvg
, targets ? [ "all" ]
}:
stdenv.mkDerivation {
pname = "iso-flags";
version = "unstable-18012020";
src = fetchFromGitHub {
owner = "joielechong";
repo = "iso-country-flags-svg-collection";
rev = "9ebbd577b9a70fbfd9a1931be80c66e0d2f31a9d";
sha256 = "17bm7w4md56xywixfvp7vr3d6ihvxk3383i9i4rpmgm6qa9dyxdl";
};
nativeBuildInputs = [
perl
inkscape
librsvg
(perl.withPackages(pp: with pp; [ JSON XMLLibXML ]))
];
postPatch = ''
patchShebangs .
'';
buildFlags = targets;
installPhase = ''
mkdir -p $out/share
mv build $out/share/iso-flags
'';
meta = with stdenv.lib; {
homepage = "https://github.com/joielechong/iso-country-flags-svg-collection";
description = "248 country flag SVG & PNG icons with different icon styles";
license = [ licenses.publicDomain ];
platforms = platforms.linux; # the output assets should work anywhere, but unsure about the tools to build them...
maintainers = [ maintainers.mkg20001 ];
};
}

View File

@ -0,0 +1,156 @@
{ atk
, autoreconfHook
, cacert
, fetchpatch
, dbus
, cinnamon-control-center
, cinnamon-desktop
, cinnamon-menus
, cjs
, fetchFromGitHub
, gdk-pixbuf
, libgnomekbd
, glib
, gobject-introspection
, gtk3
, intltool
, json-glib
, callPackage
, libsoup
, libstartup_notification
, libXtst
, muffin
, networkmanager
, pkgconfig
, polkit
, stdenv
, wrapGAppsHook
, libxml2
, gtk-doc
, gnome3
, python3
, keybinder3
, cairo
, xapps
, upower
, nemo
, libnotify
, accountsservice
, gnome-online-accounts
, glib-networking
, pciutils
, timezonemap
}:
let
libcroco = callPackage ./libcroco.nix { };
in
stdenv.mkDerivation rec {
pname = "cinnamon-common";
version = "4.4.1";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "cinnamon";
rev = version;
sha256 = "0sv7nqd1l6c727qj30dcgdkvfh1wxpszpgmbdyh58ilmc8xklnqd";
};
patches = [
# remove dbus-glib
(fetchpatch {
url = "https://github.com/linuxmint/cinnamon/commit/ce99760fa15c3de2e095b9a5372eeaca646fbed1.patch";
sha256 = "0p2sbdi5w7sgblqbgisb6f8lcj1syzq5vlk0ilvwaqayxjylg8gz";
})
];
buildInputs = [
# TODO: review if we really need this all
(python3.withPackages (pp: with pp; [ dbus-python setproctitle pygobject3 pycairo xapp pillow pytz tinycss pam pexpect ]))
atk
cacert
cinnamon-control-center
cinnamon-desktop
cinnamon-menus
cjs
dbus
gdk-pixbuf
glib
gtk3
json-glib
libcroco
libsoup
libstartup_notification
libXtst
muffin
networkmanager
pkgconfig
polkit
libxml2
libgnomekbd
# bindings
cairo
gnome3.caribou
keybinder3
upower
xapps
timezonemap
nemo
libnotify
accountsservice
# gsi bindings
gnome-online-accounts
glib-networking # for goa
];
nativeBuildInputs = [
gobject-introspection
autoreconfHook
wrapGAppsHook
intltool
gtk-doc
];
autoreconfPhase = ''
GTK_DOC_CHECK=false NOCONFIGURE=1 bash ./autogen.sh
'';
configureFlags = [ "--disable-static" "--with-ca-certificates=${cacert}/etc/ssl/certs/ca-bundle.crt" "--with-libxml=${libxml2.dev}/include/libxml2" "--enable-gtk-doc=no" ];
postPatch = ''
substituteInPlace src/Makefile.am \
--replace "\$(libdir)/muffin" "${muffin}/lib/muffin"
patchShebangs autogen.sh
find . -type f -exec sed -i \
-e s,/usr/share/cinnamon,$out/share/cinnamon,g \
-e s,/usr/share/locale,/run/current-system/sw/share/locale,g \
{} +
sed "s|/usr/share/sounds|/run/current-system/sw/share/sounds|g" -i ./files/usr/share/cinnamon/cinnamon-settings/bin/SettingsWidgets.py
sed "s|/usr/bin/upload-system-info|${xapps}/bin/upload-system-info|g" -i ./files/usr/share/cinnamon/cinnamon-settings/modules/cs_info.py
sed "s|upload-system-info|${xapps}/bin/upload-system-info|g" -i ./files/usr/share/cinnamon/cinnamon-settings/modules/cs_info.py
sed "s|/usr/bin/cinnamon-control-center|${cinnamon-control-center}/bin/cinnamon-control-center|g" -i ./files/usr/bin/cinnamon-settings
# this one really IS optional
sed "s|/usr/bin/gnome-control-center|/run/current-system/sw/bin/gnome-control-center|g" -i ./files/usr/bin/cinnamon-settings
sed "s|\"/usr/lib\"|\"${cinnamon-control-center}/lib\"|g" -i ./files/usr/share/cinnamon/cinnamon-settings/bin/capi.py
# another bunch of optional stuff
sed "s|/usr/bin|/run/current-system/sw/bin|g" -i ./files/usr/bin/cinnamon-launcher
sed 's|"lspci"|"${pciutils}/bin/lspci"|g' -i ./files/usr/share/cinnamon/cinnamon-settings/modules/cs_info.py
'';
meta = with stdenv.lib; {
homepage = "https://github.com/linuxmint/cinnamon";
description = "The Cinnamon desktop environment";
license = [ licenses.gpl2 ];
platforms = platforms.linux;
maintainers = [ maintainers.mkg20001 ];
};
}

View File

@ -0,0 +1,33 @@
{ stdenv, fetchurl, pkgconfig, libxml2, glib, gnome3 }:
stdenv.mkDerivation rec {
pname = "libcroco";
version = "0.6.13";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1m110rbj5d2raxcdp4iz0qp172284945awrsbdlq99ksmqsc4zkn";
};
outputs = [ "out" "dev" ];
outputBin = "dev";
configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-Bsymbolic";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libxml2 glib ];
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
};
};
meta = with stdenv.lib; {
description = "GNOME CSS2 parsing and manipulation toolkit";
homepage = https://gitlab.gnome.org/GNOME/libcroco;
license = licenses.lgpl2;
platforms = platforms.unix;
};
}

View File

@ -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 ];
};
}

View File

@ -1,10 +1,23 @@
{ pkgs, lib }:
lib.makeScope pkgs.newScope (self: with self; {
iso-flags-png-320x420 = pkgs.iso-flags.overrideAttrs(p: p // {
buildPhase = "make png-country-320x240-fancy";
# installPhase = "mkdir -p $out/share && mv build/png-country-4x2-fancy/res-320x240 $out/share/iso-flags-png-320x420";
installPhase = "mkdir -p $out/share && mv build/png-country-4x2-fancy/res-320x240 $out/share/iso-flags-png";
});
iso-flags-svg = pkgs.iso-flags.overrideAttrs(p: p // {
buildPhase = "mkdir -p $out/share";
installPhase = "mv svg $out/share/iso-flags-svg";
});
cinnamon-common = callPackage ./cinnamon-common { };
cinnamon-control-center = callPackage ./cinnamon-control-center { };
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 { };

View File

@ -12959,6 +12959,8 @@ in
isocodes = callPackage ../development/libraries/iso-codes { };
iso-flags = callPackage ../data/icons/iso-flags { };
ispc = callPackage ../development/compilers/ispc {
stdenv = llvmPackages_10.stdenv;
llvmPackages = llvmPackages_10;