diff options
author | Maciej Krüger <mkg20001@gmail.com> | 2019-12-08 06:28:47 +0100 |
---|---|---|
committer | worldofpeace <worldofpeace@protonmail.ch> | 2019-12-14 22:22:14 -0500 |
commit | 632c4f2c9ba1f88cd5662da7bedf2ca5f0cda4a9 (patch) | |
tree | ee048213787e01d6fbc0661b58bbabd473f0e267 /pkgs/desktops/cinnamon | |
parent | 297604cb355693979995727b9530782a1f72dacb (diff) |
cinnamon.xapps: init at 1.6.8
Diffstat (limited to 'pkgs/desktops/cinnamon')
-rw-r--r-- | pkgs/desktops/cinnamon/default.nix | 5 | ||||
-rw-r--r-- | pkgs/desktops/cinnamon/xapps/default.nix | 104 |
2 files changed, 109 insertions, 0 deletions
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 ]; + }; +} |