Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build GTK icon caches for some packages #47690

Merged
merged 6 commits into from Nov 12, 2018
Merged

build GTK icon caches for some packages #47690

merged 6 commits into from Nov 12, 2018

Conversation

romildo
Copy link
Contributor

@romildo romildo commented Oct 2, 2018

Motivation for this change
  • maia-icon-theme: 2016-09-16 -> 2018-02-24
  • paper-icon-theme: build GTK icon cache for Paper-Mono-Dark
  • efl: build GTK icon cache
  • gnome-themes-extra: build GTK icon cache
  • mate-icon-theme-faenza: build GTK icon cache
  • mate-themes: build GTK icon cache
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

- Update to newer revision
- Update homepage
- Update src
- Update license
- Add dependency on hicolor-icon-theme
- Build GTK icon cache
@romildo
Copy link
Contributor Author

romildo commented Oct 2, 2018

@GrahamcOfBorg build maia-icon-theme paper-icon-theme enlightenment.efl gnome3.gnome-themes-extra mate.mate-icon-theme-faenza mate.mate-themes

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: maia-icon-theme, paper-icon-theme, enlightenment.efl, gnome3.gnome-themes-extra, mate.mate-icon-theme-faenza, mate.mate-themes

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg GrahamcOfBorg added 6.topic: GNOME GNOME desktop environment and its underlying platform 10.rebuild-darwin: 1-10 10.rebuild-linux: 11-100 labels Oct 2, 2018
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: gnome-themes-extra, maia-icon-theme, paper-icon-theme

Partial log (click to expand)

/nix/store/539p3diwgsf5bmzzpqgfwlnpsg43hjzy-gnome-themes-extra-3.28
/nix/store/94sg1q1sybg9q5035fil4g83ry9477qz-maia-icon-theme-2018-02-24
/nix/store/xg4cy1d92i4a18g8avlvk4yqg0k49wgi-paper-icon-theme-2018-06-24

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: gnome-themes-extra, maia-icon-theme, paper-icon-theme

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: maia-icon-theme, paper-icon-theme, enlightenment.efl, gnome3.gnome-themes-extra, mate.mate-icon-theme-faenza, mate.mate-themes

Partial log (click to expand)

/nix/store/68pygvajxf0mnyll92cbznx4z91035c8-efl-1.21.1/bin/eo_debug: interpreter directive changed from "/bin/sh" to "/nix/store/017xymp5i03qzigafnfx7sgf6602gmzq-bash-4.4-p23/bin/sh"
/nix/store/68pygvajxf0mnyll92cbznx4z91035c8-efl-1.21.1/bin/eina-bench-cmp: interpreter directive changed from "/usr/bin/env python2" to "/nix/store/hwvbbmqyshry7q5r6qb612i12z8pgva9-python-2.7.15/bin/python2"
/nix/store/68pygvajxf0mnyll92cbznx4z91035c8-efl-1.21.1/lib/evas/utils/evas_generic_pdf_loader.libreoffice: interpreter directive changed from "/bin/sh" to "/nix/store/017xymp5i03qzigafnfx7sgf6602gmzq-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/68pygvajxf0mnyll92cbznx4z91035c8-efl-1.21.1...
/nix/store/94sg1q1sybg9q5035fil4g83ry9477qz-maia-icon-theme-2018-02-24
/nix/store/xg4cy1d92i4a18g8avlvk4yqg0k49wgi-paper-icon-theme-2018-06-24
/nix/store/68pygvajxf0mnyll92cbznx4z91035c8-efl-1.21.1
/nix/store/539p3diwgsf5bmzzpqgfwlnpsg43hjzy-gnome-themes-extra-3.28
/nix/store/i60xil4bf5bfnfyqq25adzbp3myfm36d-mate-icon-theme-faenza-1.20.0
/nix/store/yx45v35k9awi90whhwz5x36ih51vribl-mate-themes-3.22.18

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: maia-icon-theme, paper-icon-theme, enlightenment.efl, gnome3.gnome-themes-extra, mate.mate-icon-theme-faenza, mate.mate-themes

Partial log (click to expand)

glibPreFixupPhase
hicolorPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/6ajyyvi3a61m3qqbvb8vlklpwcq773fa-maia-icon-theme-2018-02-24
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/6ajyyvi3a61m3qqbvb8vlklpwcq773fa-maia-icon-theme-2018-02-24
checking for references to /build in /nix/store/6ajyyvi3a61m3qqbvb8vlklpwcq773fa-maia-icon-theme-2018-02-24...
gtk-update-icon-cache: Cache file created successfully.
gtk-update-icon-cache: Cache file created successfully.
postPatchMkspecs

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: gnome-themes-extra, maia-icon-theme, paper-icon-theme

Partial log (click to expand)

glibPreFixupPhase
hicolorPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/6ajyyvi3a61m3qqbvb8vlklpwcq773fa-maia-icon-theme-2018-02-24
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/6ajyyvi3a61m3qqbvb8vlklpwcq773fa-maia-icon-theme-2018-02-24
checking for references to /build in /nix/store/6ajyyvi3a61m3qqbvb8vlklpwcq773fa-maia-icon-theme-2018-02-24...
gtk-update-icon-cache: Cache file created successfully.
gtk-update-icon-cache: Cache file created successfully.
postPatchMkspecs

@jtojnar
Copy link
Contributor

jtojnar commented Oct 4, 2018

Should we do this? Icon cache is supposed to be global state, see the discussion in #45058

@romildo
Copy link
Contributor Author

romildo commented Oct 8, 2018

Should we do this? Icon cache is supposed to be global state

@jtojnar I am not sure. But I am getting warnings with xfce4-appearance-settings with the icon themes that do not have a cache:

screenshot_2018-10-08_11-23-55

@romildo
Copy link
Contributor Author

romildo commented Oct 8, 2018

Currently for most icon theme packages the icon cache is created when the package is built. The exception is the hicolor icon theme, whose cache is built by nixpkgs/nixos/modules/config/system-path.nix. Some icon themes though are missing a cache. The goal of this PR is to provide the cache for some of them.

As far as I know no other infra-structure is currently provided to build icon caches.

@romildo
Copy link
Contributor Author

romildo commented Oct 8, 2018

This solution is commented on #27458, for instance.

@romildo
Copy link
Contributor Author

romildo commented Oct 9, 2018

PR #48116 would fix the issue of availability of icon theme caches considering the global state.

@michaelpj
Copy link
Contributor

As I think we concluded in the other PR, we actually want to build the icon cache both per-theme and globally, so this is also desirable.

@michaelpj
Copy link
Contributor

I wonder if we could package this step up into a hook that could be added to buildInputs? That's probably a separate refactoring, though.

Copy link
Member

@matthewbauer matthewbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise looks good!

@@ -16,6 +16,10 @@ stdenv.mkDerivation rec {

propagatedUserEnvPkgs = [ gtk-engine-murrine ];

postInstall = ''
"${gtk3.out}/bin/gtk-update-icon-cache" "$out"/share/icons/ContrastHigh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support cross compilation you should put gtk3 in nativeBuildInputs and just use gtk-update-icon-cache

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: gnome-themes-extra, maia-icon-theme, paper-icon-theme

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: gnome-themes-extra, maia-icon-theme, paper-icon-theme

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/pzd4x2lbrzrv6kz7ydbg334c2vafq7sx-maia-icon-theme-2018-02-24
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/pzd4x2lbrzrv6kz7ydbg334c2vafq7sx-maia-icon-theme-2018-02-24
checking for references to /build in /nix/store/pzd4x2lbrzrv6kz7ydbg334c2vafq7sx-maia-icon-theme-2018-02-24...
gtk-update-icon-cache: Cache file created successfully.
gtk-update-icon-cache: Cache file created successfully.
postPatchMkspecs
/nix/store/8r0gwk3m8f6sp14jyrawz8hdfl90ib8s-gnome-themes-extra-3.28
/nix/store/pzd4x2lbrzrv6kz7ydbg334c2vafq7sx-maia-icon-theme-2018-02-24
/nix/store/bnqbxylrxhwyghslrfhlp6iwlzk4rk5i-paper-icon-theme-2018-06-24

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: gnome-themes-extra, maia-icon-theme, paper-icon-theme

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/qg7bx0gz93pp44cs99prinrsh97msq68-gnome-themes-extra-3.28
shrinking /nix/store/qg7bx0gz93pp44cs99prinrsh97msq68-gnome-themes-extra-3.28/lib/gtk-2.0/2.10.0/engines/libadwaita.so
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/qg7bx0gz93pp44cs99prinrsh97msq68-gnome-themes-extra-3.28/lib
patching script interpreter paths in /nix/store/qg7bx0gz93pp44cs99prinrsh97msq68-gnome-themes-extra-3.28
checking for references to /build in /nix/store/qg7bx0gz93pp44cs99prinrsh97msq68-gnome-themes-extra-3.28...
gtk-update-icon-cache: Cache file created successfully.
/nix/store/qg7bx0gz93pp44cs99prinrsh97msq68-gnome-themes-extra-3.28
/nix/store/sl4k4yy6mqz393vxnwyv31vxgjj6mf1r-maia-icon-theme-2018-02-24
/nix/store/4g31ny958anrknx264j51wcz79zcfbwa-paper-icon-theme-2018-06-24

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: gnome-themes-extra, maia-icon-theme, paper-icon-theme

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@matthewbauer matthewbauer merged commit a83dc7e into NixOS:master Nov 12, 2018
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: gnome-themes-extra, maia-icon-theme, paper-icon-theme

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/jpxca60yiwyfcma0fvyb7xm7a4c3d97i-gnome-themes-extra-3.28
shrinking /nix/store/jpxca60yiwyfcma0fvyb7xm7a4c3d97i-gnome-themes-extra-3.28/lib/gtk-2.0/2.10.0/engines/libadwaita.so
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/jpxca60yiwyfcma0fvyb7xm7a4c3d97i-gnome-themes-extra-3.28/lib
patching script interpreter paths in /nix/store/jpxca60yiwyfcma0fvyb7xm7a4c3d97i-gnome-themes-extra-3.28
checking for references to /build in /nix/store/jpxca60yiwyfcma0fvyb7xm7a4c3d97i-gnome-themes-extra-3.28...
gtk-update-icon-cache: Cache file created successfully.
/nix/store/jpxca60yiwyfcma0fvyb7xm7a4c3d97i-gnome-themes-extra-3.28
/nix/store/sl4k4yy6mqz393vxnwyv31vxgjj6mf1r-maia-icon-theme-2018-02-24
/nix/store/4g31ny958anrknx264j51wcz79zcfbwa-paper-icon-theme-2018-06-24

@romildo
Copy link
Contributor Author

romildo commented Nov 12, 2018

@GrahamcOfBorg build maia-icon-theme paper-icon-theme enlightenment.efl gnome3.gnome-themes-extra mate.mate-icon-theme-faenza mate.mate-themes

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: maia-icon-theme, paper-icon-theme, enlightenment.efl, gnome3.gnome-themes-extra, mate.mate-icon-theme-faenza, mate.mate-themes

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: gnome-themes-extra, maia-icon-theme, paper-icon-theme

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/zapz4vb59csphhkcwlafzv9p08rdl0bx-gnome-themes-extra-3.28
shrinking /nix/store/zapz4vb59csphhkcwlafzv9p08rdl0bx-gnome-themes-extra-3.28/lib/gtk-2.0/2.10.0/engines/libadwaita.so
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/zapz4vb59csphhkcwlafzv9p08rdl0bx-gnome-themes-extra-3.28/lib
patching script interpreter paths in /nix/store/zapz4vb59csphhkcwlafzv9p08rdl0bx-gnome-themes-extra-3.28
checking for references to /build in /nix/store/zapz4vb59csphhkcwlafzv9p08rdl0bx-gnome-themes-extra-3.28...
gtk-update-icon-cache: Cache file created successfully.
/nix/store/zapz4vb59csphhkcwlafzv9p08rdl0bx-gnome-themes-extra-3.28
/nix/store/pzd4x2lbrzrv6kz7ydbg334c2vafq7sx-maia-icon-theme-2018-02-24
/nix/store/bnqbxylrxhwyghslrfhlp6iwlzk4rk5i-paper-icon-theme-2018-06-24

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: maia-icon-theme, paper-icon-theme, enlightenment.efl, gnome3.gnome-themes-extra, mate.mate-icon-theme-faenza, mate.mate-themes

Partial log (click to expand)

/nix/store/j89hy89cbw1iqhrn5n65smb8shg2lnsl-efl-1.21.1/bin/eo_debug: interpreter directive changed from "/bin/sh" to "/nix/store/dsyc1z7ck08ga7l0b1jcxx35wj69qcii-bash-4.4-p23/bin/sh"
/nix/store/j89hy89cbw1iqhrn5n65smb8shg2lnsl-efl-1.21.1/bin/eina-bench-cmp: interpreter directive changed from "/usr/bin/env python2" to "/nix/store/74b1xd5srd6ja54xwznvbrd5hcfl6k1n-python-2.7.15/bin/python2"
/nix/store/j89hy89cbw1iqhrn5n65smb8shg2lnsl-efl-1.21.1/lib/evas/utils/evas_generic_pdf_loader.libreoffice: interpreter directive changed from "/bin/sh" to "/nix/store/dsyc1z7ck08ga7l0b1jcxx35wj69qcii-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/j89hy89cbw1iqhrn5n65smb8shg2lnsl-efl-1.21.1...
/nix/store/sl4k4yy6mqz393vxnwyv31vxgjj6mf1r-maia-icon-theme-2018-02-24
/nix/store/4g31ny958anrknx264j51wcz79zcfbwa-paper-icon-theme-2018-06-24
/nix/store/j89hy89cbw1iqhrn5n65smb8shg2lnsl-efl-1.21.1
/nix/store/jpxca60yiwyfcma0fvyb7xm7a4c3d97i-gnome-themes-extra-3.28
/nix/store/bkfn0fc87yv66yd56bk9ic6ii91z13r9-mate-icon-theme-faenza-1.20.0
/nix/store/vxhnnrszy3yq4l0kj7ldpq15fm7zxjhl-mate-themes-3.22.18

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: maia-icon-theme, paper-icon-theme, enlightenment.efl, gnome3.gnome-themes-extra, mate.mate-icon-theme-faenza, mate.mate-themes

Partial log (click to expand)

glibPreFixupPhase
hicolorPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/pzd4x2lbrzrv6kz7ydbg334c2vafq7sx-maia-icon-theme-2018-02-24
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/pzd4x2lbrzrv6kz7ydbg334c2vafq7sx-maia-icon-theme-2018-02-24
checking for references to /build in /nix/store/pzd4x2lbrzrv6kz7ydbg334c2vafq7sx-maia-icon-theme-2018-02-24...
gtk-update-icon-cache: Cache file created successfully.
gtk-update-icon-cache: Cache file created successfully.
postPatchMkspecs

@romildo romildo deleted the fix.icon-cache branch November 13, 2018 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: GNOME GNOME desktop environment and its underlying platform 10.rebuild-darwin: 1-10 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants