From a8848248d23a99434f11862a36e333125d69bf50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Tue, 2 Jun 2020 10:36:50 -0300 Subject: [PATCH] ubuntu-themes: init at 19.04 --- pkgs/data/themes/ubuntu-themes/default.nix | 77 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 79 insertions(+) create mode 100644 pkgs/data/themes/ubuntu-themes/default.nix diff --git a/pkgs/data/themes/ubuntu-themes/default.nix b/pkgs/data/themes/ubuntu-themes/default.nix new file mode 100644 index 000000000000..6be3ce1d80bd --- /dev/null +++ b/pkgs/data/themes/ubuntu-themes/default.nix @@ -0,0 +1,77 @@ +{ stdenv +, fetchurl +, fetchpatch +, gnome-icon-theme +, gnome3 +, gtk-engine-murrine +, gtk3 +, hicolor-icon-theme +, humanity-icon-theme +, python2Packages +}: + +stdenv.mkDerivation rec { + pname = "ubuntu-themes"; + version = "19.04"; + + src = fetchurl { + url = "https://launchpad.net/ubuntu/+archive/primary/+files/${pname}_${version}.orig.tar.gz"; + sha256 = "1dy2dmiq2dj80nl2y4mf4ks0c7qmmnpk25wzv2rynwa3s2gkxgih"; + }; + + nativeBuildInputs = [ + gtk3 + python2Packages.python + ]; + + propagatedBuildInputs = [ + gnome-icon-theme + gnome3.adwaita-icon-theme + humanity-icon-theme + hicolor-icon-theme + ]; + + propagatedUserEnvPkgs = [ + gtk-engine-murrine + ]; + + dontDropIconThemeCache = true; + + postPatch = '' + patchShebangs . + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/themes + cp -a Ambiance $out/share/themes + cp -a Radiance $out/share/themes + + mkdir -p $out/share/icons + cp -a LoginIcons $out/share/icons + cp -a suru-icons $out/share/icons + cp -a ubuntu-mobile $out/share/icons + cp -a ubuntu-mono-dark $out/share/icons + cp -a ubuntu-mono-light $out/share/icons + + mv $out/share/icons/{suru-icons,suru} + + for theme in $out/share/icons/*; do + gtk-update-icon-cache $theme + done + + mkdir -p $out/share/icons/hicolor/48x48/apps + cp -a distributor-logo.png $out/share/icons/hicolor/48x48/apps + + runHook postInstall + ''; + + meta = with stdenv.lib; { + description = "Ubuntu monochrome and Suru icon themes, Ambiance and Radiance themes, and Ubuntu artwork"; + homepage = "https://launchpad.net/ubuntu-themes"; + license = with licenses; [ cc-by-sa-40 gpl3 ]; + platforms = platforms.linux; + maintainers = [ maintainers.romildo ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1c62d3ed96f4..799b9d8c6a40 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18495,6 +18495,8 @@ in tzdata = callPackage ../data/misc/tzdata { }; + ubuntu-themes = callPackage ../data/themes/ubuntu-themes { }; + ubuntu_font_family = callPackage ../data/fonts/ubuntu-font-family { }; ucs-fonts = callPackage ../data/fonts/ucs-fonts