!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

483 Members
101 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
31 Mar 2025
@weethet:catgirl.cloudWeetHet

Whyyyy

{
  system ? builtins.currentSystem,
  pkgs ? import <nixpkgs> {
    inherit system;
    crossSystem = "wasm32-unknown-none";
    overlays = [
      (final: prev: {
        lib = prev.lib // {
          platforms = prev.lib.platforms // {
            wasm32-unknown-none = [ "wasm32-unknown-none" ];
            all = prev.lib.platforms.all ++ final.lib.platforms.wasm32-unknown-none;
          };
        };
        rustc = prev.rustc // {
          targetPlatforms = prev.rustc.targetPlatforms ++ final.lib.platforms.wasm32-unknown-none;
        };
      })
    ];
  },
}:
pkgs.callPackage ./package.nix { }
$ nix-instantiate --eval -E '(import ./. { }).meta.platforms'
[ ]
13:30:13
@weethet:catgirl.cloudWeetHetI swear to god I'm going to just use hooks13:30:27
@weethet:catgirl.cloudWeetHet

Oh you also need to redefine rustPlatform, I see:

rustPlatform = prev.makeRustPlatform {
  inherit (final) rustc cargo;
};
13:46:06
@weethet:catgirl.cloudWeetHet

Wait what:

error: Package <...> is not available on the requested hostPlatform:
         hostPlatform.config = "wasm32-unknown-none"
         package.meta.platforms = [
           "wasm32-unknown-none"
         ]
13:46:46
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) joined the room.15:40:12
1 Apr 2025
@strum355:matrix.orgstroem changed their display name from stroem - sourcegraph to stroem.09:41:51
@sandro:supersandro.deSandro 🐧 changed their display name from Sandro 🐧 to Sandro 🐧 [c3d2].13:57:58
@sandro:supersandro.deSandro 🐧 changed their display name from Sandro 🐧 [c3d2] to Sandro 🐧.13:59:27
@rosssmyth:matrix.orgrosssmythI would appreciate it if someone could please review this to see if it is acceptable https://github.com/NixOS/nixpkgs/pull/39220417:48:06
2 Apr 2025
@fabaff:matrix.orgfabaff joined the room.07:32:09
3 Apr 2025
@diamondburned:matrix.orgdiamond (it/its) changed their display name from Diamond (it/she) to diamond (it/its).01:06:39
@2xsaiko:tchncs.de@2xsaiko:tchncs.de changed their display name from 2xsaiko to 2xsaiko (moved! @saiko:knifepoint.net).12:52:01
4 Apr 2025
@etehtsea:matrix.orgkis-kis joined the room.03:44:38
@qbit:tapenet.org@qbit:tapenet.org left the room.15:58:39
8 Apr 2025
@yuri:peori.space@yuri:peori.space left the room.11:24:35
5 Apr 2025
@sapphire:pub.solarSapphire changed their profile picture.20:07:20
8 Apr 2025
@thesola10:matrix.orgTheSola10 changed their display name from thesola10 to TheSola10.16:57:31
11 Apr 2025
@cellmoose:matrix.org@cellmoose:matrix.org left the room.22:00:05

Show newer messages


Back to Room ListRoom Version: 6