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

fix: use buildPackages.xsltProc in case of cross compilation #50804

Closed
wants to merge 1 commit into from
Closed

fix: use buildPackages.xsltProc in case of cross compilation #50804

wants to merge 1 commit into from

Conversation

eburimu
Copy link
Contributor

@eburimu eburimu commented Nov 19, 2018

Motivation for this change

Fix cross compilation of fontconfig.

See: #50801

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.

@eburimu
Copy link
Contributor Author

eburimu commented Nov 19, 2018

This is very interesting.
Indeed, every instance of ${somePackage.bin}/an-elf defined in postInstall should be replaced accordingly. What else?

@@ -57,7 +58,7 @@ stdenv.mkDerivation rec {

postInstall = ''
cd "$out/etc/fonts"
"${libxslt.bin}/bin/xsltproc" --stringparam fontDirectories "${dejavu_fonts.minimal}" \
"${if (stdenv.hostPlatform != stdenv.buildPlatform) then buildPackages.libxslt.bin else libxslt.bin}/bin/xsltproc" --stringparam fontDirectories "${dejavu_fonts.minimal}" \
Copy link
Member

Choose a reason for hiding this comment

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

Should buildPackages.libxslt.bin not always return the correct binary?
cc @matthewbauer

Copy link
Member

Choose a reason for hiding this comment

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

buildPackages work fine when not cross compiling. pkgs = buildPackages = buildPackages.buildPackages in this case.

I would recommend putting libxslt.bin in nativeBuildInputs to avoid this logic though.

@eburimu eburimu closed this Nov 20, 2018
@Mic92
Copy link
Member

Mic92 commented Nov 20, 2018

@eburimu why was this closed?

@eburimu
Copy link
Contributor Author

eburimu commented Nov 29, 2018

@Mic92 Already got into repo, no worries. I messd up w/ my own fork.
See 36e2e9d

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

4 participants