Packaging/32bit Applications: Difference between revisions

imported>Mic92
No edit summary
Klinger (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by one other user not shown)
Line 4: Line 4:
'''Answer (clever)''': you want to use <code>pkgsi686Linux</code> instead of pkgs, so things like <code>pkgsi686Linux.stdenv.mkDerivation </code> or <code>pkgsi686Linux.callPackage</code> then nix will give you 32bit everything<ref>[https://logs.nix.samueldr.com/nixos/2018-03-19#1521474071-1521474422; clever, #nixos 2018-03-19]</ref>
'''Answer (clever)''': you want to use <code>pkgsi686Linux</code> instead of pkgs, so things like <code>pkgsi686Linux.stdenv.mkDerivation </code> or <code>pkgsi686Linux.callPackage</code> then nix will give you 32bit everything<ref>[https://logs.nix.samueldr.com/nixos/2018-03-19#1521474071-1521474422; clever, #nixos 2018-03-19]</ref>


== Building multilib software ==
== Building software with both 32- and 64-bit executables ==


If a packages wants to compile both 32/64-bit executable, you need a compiler with multilib support.
If a package wants to compile both 32/64-bit executables, you need a compiler with multilib support.
In nixpkgs provides <code>multiStdenv.mkDerivation</code> that should be used instead <code>stdenv.mkDerivation</code>.
Nixpkgs provides <code>multiStdenv.mkDerivation</code> that should be used instead <code>stdenv.mkDerivation</code>.
This is equivalent to using <code>gcc-multilib</code> in debian derivatives.
This is equivalent to using <code>gcc-multilib</code> in debian derivatives.
[[Category:Development]]