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

materia-theme: unset $name in install script #40409

Merged
merged 1 commit into from May 12, 2018
Merged

materia-theme: unset $name in install script #40409

merged 1 commit into from May 12, 2018

Conversation

romildo
Copy link
Contributor

@romildo romildo commented May 12, 2018

Motivation for this change
  • install.sh uses a global environment variable called name, if defined,
    to name the theme. This is an issue because nix sets this variable to
    the package name.

  • Replace gnome-themes-standard with gnome-themes-extra.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
installPhase = ''
patchShebangs install.sh
sed -i install.sh \
-e "/^THEME_NAME=.*/a unset name" \
Copy link
Member

Choose a reason for hiding this comment

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

A little bit less intrusive would be:

(
  unset name # used internally by installation script
  ./install --dest $out/share/themes
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better yet:

name= ./install.sh --dest $out/share/themes

- install.sh uses a global environment variable called $name, if defined,
to name the theme. This is an issue because nix sets this variable to
the package name.

- Replace gnome-themes-standard to gnome-themes-extra.
@Mic92
Copy link
Member

Mic92 commented May 12, 2018

@GrahamcOfBorg build materia-theme

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: materia-theme

Partial log (click to expand)


Done.
glibPreFixupPhase
glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/4vxgvk3wip9lxdvjz0l9m12cfsfb2k27-materia-theme-20180321
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/4vxgvk3wip9lxdvjz0l9m12cfsfb2k27-materia-theme-20180321
checking for references to /build in /nix/store/4vxgvk3wip9lxdvjz0l9m12cfsfb2k27-materia-theme-20180321...
/nix/store/4vxgvk3wip9lxdvjz0l9m12cfsfb2k27-materia-theme-20180321

@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: materia-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: materia-theme

Partial log (click to expand)

these derivations will be built:
  /nix/store/35ax8myd25x85f7diz761i24bap2gvmx-materia-theme-20180321.drv
these paths will be fetched (2.23 MiB download, 5.22 MiB unpacked):
  /nix/store/fz3kmaipp2minqayl78caaij2c72pxdi-gnome-themes-extra-3.28
copying path '/nix/store/fz3kmaipp2minqayl78caaij2c72pxdi-gnome-themes-extra-3.28' from 'https://cache.nixos.org'...
waiting for locks or build slots...
/nix/store/4vxgvk3wip9lxdvjz0l9m12cfsfb2k27-materia-theme-20180321

@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: materia-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.


@Mic92 Mic92 merged commit 82e58d8 into NixOS:master May 12, 2018
@Mic92
Copy link
Member

Mic92 commented May 12, 2018

Is this also broken on stable?

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: materia-theme

Partial log (click to expand)


Done.
glibPreFixupPhase
glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/imkprb8yl08f435lp9qbrid9k90258q1-materia-theme-20180321
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/imkprb8yl08f435lp9qbrid9k90258q1-materia-theme-20180321
checking for references to /build in /nix/store/imkprb8yl08f435lp9qbrid9k90258q1-materia-theme-20180321...
/nix/store/imkprb8yl08f435lp9qbrid9k90258q1-materia-theme-20180321

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: materia-theme

Partial log (click to expand)

these derivations will be built:
  /nix/store/jjxm145psgbljjyzw64f13bshhs0sxmm-materia-theme-20180321.drv
waiting for locks or build slots...
/nix/store/imkprb8yl08f435lp9qbrid9k90258q1-materia-theme-20180321

@romildo
Copy link
Contributor Author

romildo commented May 12, 2018

Is this also broken on stable?

The name environment variable seems to be introduced in install.sh in commit nana-4/materia-theme@960249d#diff-3fbb47e318cd8802bd325e7da9aaabe8 from Jan 11.

So it may be broken on stable too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants