!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

323 Members
84 Servers

Load older messages


SenderMessageTime
27 Feb 2024
@qyliss:fairydust.spaceAlyssa RossOfBorg has built it fine13:24:41
1 Mar 2024
@jaredbaur:matrix.orgJared BaurAnyone available to review this PR? Small fix for determining if a nixos system is configured to be cross compiled. https://github.com/NixOS/nixpkgs/pull/29248704:17:51
@happyalu:matrix.orgAlok Parlikar
In reply to @rab24ack:matrix.org

Anyone know a good way to get a nix shell with a cross compiler for iOS? I keep getting errors related to binutils from the 23.11 channel:

{iphone ? true}:

let
  crossSystem = if iphone then {
    config = "aarch64-apple-ios";
    xcodeVer = "12.3";
    sdkVer = "14.3";
    xcodePlatform = "iPhoneOS";
    useiOSPrebuilt = true;
    platform = {};
  } else null;

  pkgs_fn = (import (builtins.fetchTarball {
    name = "nixos-23.11";
    url = "https://github.com/NixOS/nixpkgs/archive/057f9aecfb71c4437d2b27d3323df7f93c010b7e.tar.gz";
    sha256 = "1ndiv385w1qyb3b18vw13991fzb9wg4cl21wglk89grsfsnra41k";
  }));
  cmake = (pkgs_fn {}).cmake;
  pkgs = pkgs_fn { config.allowUnfree = true; crossSystem = crossSystem; };
in
pkgs.mkShell rec {
  nativeBuildInputs = [
    cmake
  ];
  buildInputs = [
    pkgs.zlib
  ];
}

I got further by using this pin instead:

(import (builtins.fetchTarball {
  name = "nixos-22.11"; # from Nov 30, 2022
  url = "https://github.com/NixOS/nixpkgs/archive/4d2b37a84fad1091b9de401eb450aae66f1a741e.tar.gz";
  sha256 = "11w3wn2yjhaa5pv20gbfbirvjq6i3m7pqrq2msf0g7cv44vijwgw";
}))

which gives an error when compiling zlib (one of the buildInputs): 'stdarg.h' file not found

Was there something that fixed this?
15:57:41
@seanybaggins:matrix.orgSean Link

Is it possible to use wine to create a package? I would love to use issrc (cli for innosetup) to create windows installers.

nix build "github:seanybaggins/qt-package-overalys#pkgs.pkgsCross.mingw32.issrc"
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'issrc-i686-w64-mingw32'
         whose name attribute is located at /nix/store/1h0wlxymqbyg6i66cvyjsaizlwgj572k-source/pkgs/stdenv/generic/make-derivation.nix:353:7

       … while evaluating attribute 'buildPhase' of derivation 'issrc-i686-w64-mingw32'

         at /nix/store/d6xvagixld1ci6jhg77crwhglvz1vz86-source/nix/overlays/pkgs/issrc/default.nix:15:3:

           14|
           15|   buildPhase = "${pkgsBuildHost.wine} build.bat";
             |   ^
           16|

       error: i686 Linux package set can only be used with the x86 family.

19:06:13
@raitobezarius:matrix.orgraitobezariusit should be possible but it seems like some cross checks are getting confused19:28:54
@artturin:matrix.orgArtturin
In reply to @seanybaggins:matrix.org

Is it possible to use wine to create a package? I would love to use issrc (cli for innosetup) to create windows installers.

nix build "github:seanybaggins/qt-package-overalys#pkgs.pkgsCross.mingw32.issrc"
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'issrc-i686-w64-mingw32'
         whose name attribute is located at /nix/store/1h0wlxymqbyg6i66cvyjsaizlwgj572k-source/pkgs/stdenv/generic/make-derivation.nix:353:7

       … while evaluating attribute 'buildPhase' of derivation 'issrc-i686-w64-mingw32'

         at /nix/store/d6xvagixld1ci6jhg77crwhglvz1vz86-source/nix/overlays/pkgs/issrc/default.nix:15:3:

           14|
           15|   buildPhase = "${pkgsBuildHost.wine} build.bat";
             |   ^
           16|

       error: i686 Linux package set can only be used with the x86 family.

Post reproducer
19:43:57
@seanybaggins:matrix.orgSean Link Artturin: I am confused. The nix build command at the top is the reproducer 19:44:53
@artturin:matrix.orgArtturinOverlooked it19:51:33
@artturin:matrix.orgArtturin wine is by itself a mingw thingy 19:52:55
@artturin:matrix.orgArtturinUse pkgsBuildBuild as wine itself should be target agnostic?19:53:24
@artturin:matrix.orgArtturin * Use pkgsBuildBuild it shouldn't matter where you use wine from19:58:13
@artturin:matrix.orgArtturin * Use pkgsBuildBuild because it shouldn't matter where you use wine from19:58:36
@seanybaggins:matrix.orgSean Link

hmm still having issues

 nix build "github:seanybaggins/qt-package-overalys#pkgs.pkgsCross.mingw32.issrc"
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'issrc-i686-w64-mingw32'
         whose name attribute is located at /nix/store/1h0wlxymqbyg6i66cvyjsaizlwgj572k-source/pkgs/stdenv/generic/make-derivation.nix:353:7

       … while evaluating attribute 'buildPhase' of derivation 'issrc-i686-w64-mingw32'

         at /nix/store/91r0pf1fbkb466q7hyfqgcgkyhg51a5z-source/nix/overlays/pkgs/issrc/default.nix:15:3:

           14|
           15|   buildPhase = "${pkgsBuildBuild.wine} build.bat";
             |   ^
           16|

       error: Package ‘wine-9.0’ in /nix/store/1h0wlxymqbyg6i66cvyjsaizlwgj572k-source/pkgs/applications/emulators/wine/base.nix:214 is not available on the requested hostPlatform:
         hostPlatform.config = "i686-w64-mingw32"
         package.meta.platforms = [
           "i686-linux"
           "x86_64-linux"
         ]
         package.meta.badPlatforms = [ ]
       , refusing to evaluate.

       a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1

          Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
                then pass `--impure` in order to allow use of environment variables.

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

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


20:06:39
@raitobezarius:matrix.orgraitobezariusyou are running a wine for mingw itself20:08:27
@raitobezarius:matrix.orgraitobezariusI believe?20:08:32
@artturin:matrix.orgArtturin
nix-repl> pkgsCross.mingwW64.pkgsBuildBuild.wine.stdenv.hostPlatform.config
"x86_64-w64-mingw32"

nix-repl> pkgsCross.mingwW64.pkgsBuildBuild.hello.stdenv.hostPlatform.config
"x86_64-unknown-linux-gnu"
20:09:13
@raitobezarius:matrix.orgraitobezariusisn't it like a bug?20:09:49
@raitobezarius:matrix.orgraitobezariusah no20:09:55
@raitobezarius:matrix.orgraitobezariusit's normal20:09:56
@raitobezarius:matrix.orgraitobezariusbut buildPlatform.config should be x86_64-linux right?20:10:06
@artturin:matrix.orgArtturinyeah20:11:42
@artturin:matrix.orgArtturinpkgsBuildBuild wine hostPlatform seems wrong though20:12:09
@raitobezarius:matrix.orgraitobezariussomething something splicing is wrong20:12:36
@artturin:matrix.orgArtturinShouldn't have anything to do with splicing20:12:51
@artturin:matrix.orgArtturinpkgsXX are explicit20:13:01
@artturin:matrix.orgArtturinno splicing20:13:02
@raitobezarius:matrix.orgraitobezariusah right20:13:10
2 Mar 2024
@qyriad:katesiria.orgQyriad joined the room.09:14:30
@stablejoy:matrix.orgstablejoy joined the room.11:38:48
@stablejoy:matrix.orgstablejoy set a profile picture.11:44:16

There are no newer messages yet.


Back to Room ListRoom Version: 6