From 632c4f2c9ba1f88cd5662da7bedf2ca5f0cda4a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Sun, 8 Dec 2019 06:28:47 +0100 Subject: [PATCH 1/3] cinnamon.xapps: init at 1.6.8 --- pkgs/desktops/cinnamon/default.nix | 5 ++ pkgs/desktops/cinnamon/xapps/default.nix | 104 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 111 insertions(+) create mode 100644 pkgs/desktops/cinnamon/default.nix create mode 100644 pkgs/desktops/cinnamon/xapps/default.nix diff --git a/pkgs/desktops/cinnamon/default.nix b/pkgs/desktops/cinnamon/default.nix new file mode 100644 index 000000000000..445890782414 --- /dev/null +++ b/pkgs/desktops/cinnamon/default.nix @@ -0,0 +1,5 @@ +{ pkgs, lib }: + +lib.makeScope pkgs.newScope (self: with self; { + xapps = callPackage ./xapps {}; +}) diff --git a/pkgs/desktops/cinnamon/xapps/default.nix b/pkgs/desktops/cinnamon/xapps/default.nix new file mode 100644 index 000000000000..f63ab3cedd8c --- /dev/null +++ b/pkgs/desktops/cinnamon/xapps/default.nix @@ -0,0 +1,104 @@ +{ fetchFromGitHub +, fetchpatch +, glib +, gobject-introspection +, gtk3 +, libgnomekbd +, gdk-pixbuf +, cairo +, xorg +, meson +, ninja +, pkgconfig +, python3 +, stdenv +, vala +, wrapGAppsHook +, inxi +, mate +}: + +stdenv.mkDerivation rec { + pname = "xapps"; + version = "1.6.8"; + + outputs = [ "out" "dev" ]; + + src = fetchFromGitHub { + owner = "linuxmint"; + repo = pname; + rev = version; + sha256 = "09f77vsydv8r6r43py8hrpq7pb4a1pfivy19zgijjy2241i7059v"; + }; + + # TODO: https://github.com/NixOS/nixpkgs/issues/36468 + NIX_CFLAGS_COMPILE = [ + "-I${glib.dev}/include/gio-unix-2.0" + ]; + + patches = [ + (fetchpatch { # details see https://github.com/linuxmint/xapps/pull/65 + url = "https://github.com/linuxmint/xapps/compare/d361d9cf357fade59b4bb68df2dcb2c0c39f90e1...2dfe82ec68981ea046345b2be349bd56293579f7.diff"; + sha256 = "0sffclamvjas8ad57kxrg0vrgrd95xsk0xdl53dc3yivpxkfxrnk"; + }) + ]; + + nativeBuildInputs = [ + gobject-introspection + meson + ninja + pkgconfig + python3 + vala + wrapGAppsHook + ]; + + buildInputs = [ + (python3.withPackages(ps: with ps; [ + pygobject3 + setproctitle # mate applet + ])) + libgnomekbd + gdk-pixbuf + xorg.libxkbfile + python3.pkgs.pygobject3 # for .pc file + mate.mate-panel # for gobject-introspection + ]; + + # Requires in xapp.pc + propagatedBuildInputs = [ + gtk3 + cairo + glib + ]; + + mesonFlags = [ + "-Dpy-overrides-dir=${placeholder "out"}/${python3.sitePackages}/gi/overrides" + ]; + + postPatch = '' + chmod +x schemas/meson_install_schemas.py # patchShebangs requires executable file + + # The fetchpatch hook removes the renames, so postPatch has to rename those files, remove once PR merged + mv files/usr/bin/pastebin scripts/pastebin + mv files/usr/bin/upload-system-info scripts/upload-system-info + mv files/usr/bin/xfce4-set-wallpaper scripts/xfce4-set-wallpaper + mv files/usr/share/icons/hicolor icons + + patchShebangs \ + libxapp/g-codegen.py \ + schemas/meson_install_schemas.py + + # Patch pastebin & inxi location + sed "s|/usr/bin/pastebin|$out/bin/pastebin|" -i scripts/upload-system-info + sed "s|'inxi'|'${inxi}/bin/inxi'|" -i scripts/upload-system-info + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/linuxmint/xapps"; + description = "Cross-desktop libraries and common resources"; + license = licenses.lgpl3; + platforms = platforms.linux; + maintainers = [ maintainers.mkg20001 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0fa068e1857f..5a3ff9c4b665 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23345,6 +23345,8 @@ in ### DESKTOP ENVIRONMENTS + cinnamon = recurseIntoAttrs (callPackage ../desktops/cinnamon { }); + deepin = recurseIntoAttrs (import ../desktops/deepin { inherit pkgs libsForQt5; inherit (lib) makeScope; From 580a6f492abd158a821682eb7d1c71839108c089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Fri, 13 Dec 2019 20:33:27 +0100 Subject: [PATCH 2/3] pythonModules.xapp: init at 1.8.1 --- .../python-modules/xapp/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 9 +++- 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/python-modules/xapp/default.nix diff --git a/pkgs/development/python-modules/xapp/default.nix b/pkgs/development/python-modules/xapp/default.nix new file mode 100644 index 000000000000..440db3430253 --- /dev/null +++ b/pkgs/development/python-modules/xapp/default.nix @@ -0,0 +1,43 @@ +{ stdenv +, fetchFromGitHub +, buildPythonPackage +, psutil +, pygobject3 +, gtk3 +, gobject-introspection +, xapps +, polkit +}: + +buildPythonPackage rec { + pname = "xapp"; + version = "1.8.1"; + + src = fetchFromGitHub { + owner = "linuxmint"; + repo = "python-xapp"; + rev = version; + sha256 = "0vw3cn09nx75lv4d9idp5fdhd81xs279zhbyyilynq29cxxs2zil"; + }; + + propagatedBuildInputs = [ + psutil + pygobject3 + gtk3 + gobject-introspection + xapps + polkit + ]; + + postPatch = '' + substituteInPlace "xapp/os.py" --replace "/usr/bin/pkexec" "${polkit}/bin/pkexec" + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/linuxmint/python-xapp"; + description = "Cross-desktop libraries and common resources for python"; + license = licenses.lgpl2; + platforms = platforms.linux; + maintainers = [ maintainers.mkg20001 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8a28f48e015b..5af5d746bd78 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -182,7 +182,7 @@ in { aresponses = callPackage ../development/python-modules/aresponses { }; argon2_cffi = callPackage ../development/python-modules/argon2_cffi { }; - + arviz = callPackage ../development/python-modules/arviz { }; asana = callPackage ../development/python-modules/asana { }; @@ -1148,7 +1148,7 @@ in { pytesseract = callPackage ../development/python-modules/pytesseract { }; pytest-bdd = callPackage ../development/python-modules/pytest-bdd { }; - + pytest-black = callPackage ../development/python-modules/pytest-black { }; pytest-click = callPackage ../development/python-modules/pytest-click { }; @@ -5422,6 +5422,11 @@ in { xapian = callPackage ../development/python-modules/xapian { xapian = pkgs.xapian; }; + xapp = callPackage ../development/python-modules/xapp { + inherit (pkgs) gtk3 gobject-introspection polkit; + inherit (pkgs.cinnamon) xapps; + }; + xlwt = callPackage ../development/python-modules/xlwt { }; xxhash = callPackage ../development/python-modules/xxhash { }; From 47dcb0439a7f891645471c8d003e0d3466978229 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Sat, 14 Dec 2019 22:18:12 -0500 Subject: [PATCH 3/3] libgnomekbd: fix dependencies There were things in Requires that weren't propagated. --- .../libraries/libgnomekbd/default.nix | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/libgnomekbd/default.nix b/pkgs/development/libraries/libgnomekbd/default.nix index 0951ab1fe0c0..21523bf2e1a5 100644 --- a/pkgs/development/libraries/libgnomekbd/default.nix +++ b/pkgs/development/libraries/libgnomekbd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, file, intltool, glib, gtk3, libxklavier, makeWrapper, gnome3 }: +{ stdenv, fetchurl, pkgconfig, file, intltool, glib, gtk3, libxklavier, wrapGAppsHook, gnome3 }: stdenv.mkDerivation rec { pname = "libgnomekbd"; @@ -13,13 +13,19 @@ stdenv.mkDerivation rec { updateScript = gnome3.updateScript { packageName = pname; }; }; - nativeBuildInputs = [ pkgconfig file intltool makeWrapper ]; - buildInputs = [ glib gtk3 libxklavier ]; + nativeBuildInputs = [ + file + intltool + pkgconfig + wrapGAppsHook + ]; - preFixup = '' - wrapProgram $out/bin/gkbd-keyboard-display \ - --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" - ''; + # Requires in libgnomekbd.pc + propagatedBuildInputs = [ + gtk3 + libxklavier + glib + ]; meta = with stdenv.lib; { description = "Keyboard management library";