| 31 Mar 2025 |
WeetHet | Why does adding meta.platforms = [ "wasm32-unknown-none" ]; not work?
Calling nix-build -E '(import <nixpkgs> { crossSystem = "wasm32-unknown-none"; }).callPackage ./package.nix { }' gives me
Package <...> is not available on the requested hostPlatform:
hostPlatform.config = "wasm32-unknown-none"
package.meta.platforms = [ ]
| 13:09:01 |
WeetHet | Am I insane? | 13:09:10 |
WeetHet | I never built packages for platforms not in lib.platforms | 13:09:33 |
WeetHet | Does callPackage filter out platforms not present there? | 13:09:49 |
WeetHet | Oh, it's some rustPlatform shenanigans | 13:21:14 |
WeetHet | 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 | I swear to god I'm going to just use hooks | 13:30:27 |
WeetHet | Oh you also need to redefine rustPlatform, I see:
rustPlatform = prev.makeRustPlatform {
inherit (final) rustc cargo;
};
| 13:46:06 |
WeetHet | 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 (any/all) joined the room. | 15:40:12 |
| 1 Apr 2025 |
| stroem changed their display name from stroem - sourcegraph to stroem. | 09:41:51 |
| Sandro changed their display name from Sandro 🐧 to Sandro 🐧 [c3d2]. | 13:57:58 |
| Sandro changed their display name from Sandro 🐧 [c3d2] to Sandro 🐧. | 13:59:27 |
rosssmyth | I would appreciate it if someone could please review this to see if it is acceptable
https://github.com/NixOS/nixpkgs/pull/392204 | 17:48:06 |
| 2 Apr 2025 |
| fabaff joined the room. | 07:32:09 |
| 3 Apr 2025 |
| diamond (it/its) changed their display name from Diamond (it/she) to diamond (it/its). | 01:06:39 |
| @2xsaiko:tchncs.de changed their display name from 2xsaiko to 2xsaiko (moved! @saiko:knifepoint.net). | 12:52:01 |
| 4 Apr 2025 |
| kis-kis joined the room. | 03:44:38 |
| @qbit:tapenet.org left the room. | 15:58:39 |
| 8 Apr 2025 |
| @yuri:peori.space left the room. | 11:24:35 |
| 5 Apr 2025 |
| Sapphire changed their profile picture. | 20:07:20 |
| 8 Apr 2025 |
| TheSola10 changed their display name from thesola10 to TheSola10. | 16:57:31 |
| 11 Apr 2025 |
| @cellmoose:matrix.org left the room. | 22:00:05 |
| 12 Apr 2025 |
| oak 🏳️🌈♥️ changed their display name from oak to oak - mikatammi.fi ÄÄNESTÄ. | 12:12:02 |
| oak 🏳️🌈♥️ changed their profile picture. | 12:13:51 |
| oak 🏳️🌈♥️ changed their display name from oak - mikatammi.fi ÄÄNESTÄ to oak - mikatammi.fi. | 12:56:27 |
| 13 Apr 2025 |
| @2xsaiko:tchncs.de left the room. | 00:35:58 |
| mao zedong joined the room. | 08:20:08 |
| mao zedong changed their display name from zekeriya öz to nixosfanboy. | 08:25:19 |
| mao zedong changed their profile picture. | 08:26:48 |