error:
Failed assertions:
- Option driSupport32Bit only makes sense on a 64-bit system.
- Option driSupport32Bit requires a kernel that supports 32bit emulation
Not sure if the error messages make sense. It is 64-bit, but not x86.
The hardware.opengl.driSupport32Bit option is currently only supported for the nvidia as well as Mesa .
So i remove that by manually installing the steam package.
environment.systemPackages = with pkgs; [
steam
steam-run
];
(still allowing the unfree license)
error: i686 Linux package set can only be used with the x86 family.
For some reason Nix knows that Steam is only for x86, even it’s not in the packages meta.
Maybe it will work with cross-compilation (or substitution from cache):
environment.systemPackages = with pkgs; [
pkgsCross.gnu64.steamPackages.steam
pkgsCross.gnu64.steam-run
];
You’re probably going to have to re-import nixpkgs, but configured for x86_64. Something like:
overlays = [(self: super: let
x86pkgs = import pkgs.path { system = "x86_64-linux"; };
in {
inherit (x86pkgs) steam; # plus whatever else you need
})];
# use x86_64 steam and allow unfree license
nixpkgs.overlays = [(self: super: let
x86pkgs = import pkgs.path { system = "x86_64-linux";
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-runtime"
];
};
in {
inherit (x86pkgs) steam steam-run;
})];
# allow build for x86_64-linux architecture through emulation
boot.binfmt.emulatedSystems = [ "x86_64-linux" ];
environment.systemPackages = with pkgs; [
steam steam-run
];
Local build does not work:
...
building '/nix/store/49pxhxla9a7vzs37qqnmbz51p8p294gz-steam-run.drv'...
building '/nix/store/ys13s6nh0hw1mw3aj3mqb1ljp73wjj8c-steam-wrapper.sh.drv'...
copying path '/nix/store/pdq3hm7syv01csidr28lwhsfqm07nlc6-libusb-1.0.25' from 'https://cache.nixos.org'...
building '/nix/store/s916g54n7dxxq710kbrb4m6p9d67n9wi-builder.pl.drv'...
copying path '/nix/store/qc119mdj6kcrrd18rpbqlcwcb6y17253-libfido2-1.10.0' from 'https://cache.nixos.org'...
ErrorErrorvexecuting '/nix/store/s7r5cnjj4zy41g2nql3vf2ivr09wfm5p-bash-5.1-p16/bin/bash': Exec format error
ErrorErrorvexecuting '/nix/store/s7r5cnjj4zy41g2nql3vf2ivr09wfm5p-bash-5.1-p16/bin/bash': Exec format error
ErrorErrorvexecuting '/nix/store/s7r5cnjj4zy41g2nql3vf2ivr09wfm5p-bash-5.1-p16/bin/bash': Exec format error
error: builder for '/nix/store/s916g54n7dxxq710kbrb4m6p9d67n9wi-builder.pl.drv' failed with exit code 1
error: builder for '/nix/store/49pxhxla9a7vzs37qqnmbz51p8p294gz-steam-run.drv' failed with exit code 1
error: builder for '/nix/store/ys13s6nh0hw1mw3aj3mqb1ljp73wjj8c-steam-wrapper.sh.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/hwrcrl2r0f3w2yjzz1bgfrrk1rgga6g8-steam-init.drv' failed to build
error: 1 dependencies of derivation '/nix/store/c3sbx1c074zcl74m841z7ll5plz456k5-steam-run-init.drv' failed to build
error: 1 dependencies of derivation '/nix/store/bc5qdnh3y0rp4d1c29nwwda758qfrjpj-steam-run-usr-multi.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4jzr0ssdjd89lm3b92jbyxjvbyhrkxxc-steam-run-usr-target.drv' failed to build
error: 1 dependencies of derivation '/nix/store/k6djhk5nmz699p2406qpnj6bv7ss7770-steam-usr-multi.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gv84mqpjhwalaz9cwhbn7li6kdc8hyqz-steam-usr-target.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3nirfr9gbx5lqkw2rsz3yihwzs4mal5z-steam-run.drv' failed to build
error: 1 dependencies of derivation '/nix/store/18niiaa5xi0kpciy1kdrj5hf82i7744y-steam.drv' failed to build
building '/nix/store/z87ky7wyq3b39yasim214ryf7qwx21pm-steam_1.0.0.74.tar.gz.drv'...
error: 1 dependencies of derivation '/nix/store/97kfq19l85h1msv9dm9valzvdryybssp-steam-run.drv' failed to build
error: 1 dependencies of derivation '/nix/store/mikmxpj6qm9sn6px9lc769hslyd37p68-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qg06wfclc9j195qip0hbfgwq7j6kagk8-nixos-system-pinephone-22.05pre-git.drv' failed to build
copying path '/nix/store/6z7aq0f26r9mkbr7vwv2gz2fpfmjsi9q-libpulseaudio-15.0-dev' from 'https://cache.nixos.org'...
ErrorErrorvexecuting '/nix/store/s7r5cnjj4zy41g2nql3vf2ivr09wfm5p-bash-5.1-p16/bin/bash': Exec format error
ErrorErrorvexecuting '/nix/store/s7r5cnjj4zy41g2nql3vf2ivr09wfm5p-bash-5.1-p16/bin/bash': Exec format error
ErrorErrorvexecuting '/nix/store/s7r5cnjj4zy41g2nql3vf2ivr09wfm5p-bash-5.1-p16/bin/bash': Exec format error
error: builder for '/nix/store/s916g54n7dxxq710kbrb4m6p9d67n9wi-builder.pl.drv' failed with exit code 1
error: builder for '/nix/store/49pxhxla9a7vzs37qqnmbz51p8p294gz-steam-run.drv' failed with exit code 1
error: builder for '/nix/store/ys13s6nh0hw1mw3aj3mqb1ljp73wjj8c-steam-wrapper.sh.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/hwrcrl2r0f3w2yjzz1bgfrrk1rgga6g8-steam-init.drv' failed to build
error: 1 dependencies of derivation '/nix/store/c3sbx1c074zcl74m841z7ll5plz456k5-steam-run-init.drv' failed to build
error: 1 dependencies of derivation '/nix/store/bc5qdnh3y0rp4d1c29nwwda758qfrjpj-steam-run-usr-multi.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4jzr0ssdjd89lm3b92jbyxjvbyhrkxxc-steam-run-usr-target.drv' failed to build
error: 1 dependencies of derivation '/nix/store/k6djhk5nmz699p2406qpnj6bv7ss7770-steam-usr-multi.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gv84mqpjhwalaz9cwhbn7li6kdc8hyqz-steam-usr-target.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3nirfr9gbx5lqkw2rsz3yihwzs4mal5z-steam-run.drv' failed to build
error: 1 dependencies of derivation '/nix/store/18niiaa5xi0kpciy1kdrj5hf82i7744y-steam.drv' failed to build
building '/nix/store/z87ky7wyq3b39yasim214ryf7qwx21pm-steam_1.0.0.74.tar.gz.drv'...
error: 1 dependencies of derivation '/nix/store/97kfq19l85h1msv9dm9valzvdryybssp-steam-run.drv' failed to build
error: 1 dependencies of derivation '/nix/store/mikmxpj6qm9sn6px9lc769hslyd37p68-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9sdlk2hws0af4i47apvy185cjg2qwbck-nixos-system-pinephone-22.05pre-git.drv' failed to build
So i built it on the machine and copied it over.
[davidak@gaming:~]$ nix-build 'https://github.com/NixOS/nixpkgs/archive/17c252aab1772d36acd6d3f57f6512f25b6f9e9c.tar.gz' -A steam
[davidak@gaming:~]$ nix-build 'https://github.com/NixOS/nixpkgs/archive/17c252aab1772d36acd6d3f57f6512f25b6f9e9c.tar.gz' -A steam-run
[davidak@gaming:~]$ nix copy --to ssh://root@10.0.10.238 /nix/store/fyaib4qjhzqwph6z54wvg7yaqa8r396n-steam
copying path '/nix/store/2nmh263sp39sz5mdvbnak3lrvs2a5gdv-steam-fhs' to 'ssh://root@10.0.10.238'
[davidak@gaming:~]$ nix copy --to ssh://root@10.0.10.238 /nix/store/6i8p17rhyz9m9gd5161inhry3dwdmj99-steam-run
copying path '/nix/store/24djwivsby1qp8w9sx4h32rwa3mjzpn4-steam-run-usr-multi' to 'ssh://root@10.0.10.238'
Cool!
I feel like there should be a way to do a remote build or build it in the own machine with emulation rather than having to manually copy builds from the store
box64 ow has an optional build flag for BOX32, so it can run 32bit programs as well, and it can already launch steam, so no chroot environment with box86 is needed anymore to run steam, that should make implementing that easier