!xmLtiCaAJxfhURjrXl:matrix.org

NixOS RISC-V

223 Members
NixOS on RISC-V https://wiki.nixos.org/wiki/RISC-V https://pad.lassul.us/NixOS-riscv64-linux https://github.com/orgs/NixOS/teams/risc-v64 Servers

Load older messages


SenderMessageTime
15 Apr 2026
@blokyk:matrix.orgzoë (she/her)Redacted or Malformed Event10:50:43
@blokyk:matrix.orgzoë (she/her) *

ok so i wasn't going crazy: trying it out with just nix-shell and hard-coded pkgsCross.riscv32. in front of everything works, but for some reason callPackage/splicing doesn't work :(

# shell.nix
{
  llvmPackages_latest,
  mkShell
}:
let mkLLVMShell = mkShell.override { inherit (llvmPackages_latest) stdenv; }
in
mkLLVMShell { }
10:50:51
@blokyk:matrix.orgzoë (she/her) *

ok so i wasn't going crazy: trying it out with just nix-shell and hard-coded pkgsCross.riscv32. in front of everything works, but for some reason callPackage/splicing doesn't work :(

# shell.nix
{
  llvmPackages_latest,
  mkShell
}:
let mkLLVMShell = mkShell.override { inherit (llvmPackages_latest) stdenv; }
in
mkLLVMShell { }
$ nix-shell -E '(import <nixpkgs> {}).pkgsCross.riscv64.callPackage ./shell.nix {}'
[nix-shell:~] $ $CC --version
clang version 22.1.2
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/nqrpsik93243zfbysab689b4598x0srw-clang-22.1.2/bin

:(

10:53:55
@blokyk:matrix.orgzoë (she/her) *

ok so i wasn't going crazy: trying it out with just nix-shell and hard-coded pkgsCross.riscv32. in front of everything works, but for some reason callPackage/splicing doesn't work :(

# shell.nix
{
  llvmPackages_latest,
  mkShell
}:
let mkLLVMShell = mkShell.override { inherit (llvmPackages_latest) stdenv; }
in
mkLLVMShell { }
$ nix-shell -E '(import <nixpkgs> {}).pkgsCross.riscv64.callPackage ./shell.nix {}'

[nix-shell:~]$ $CC --version
clang version 22.1.2
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/nqrpsik93243zfbysab689b4598x0srw-clang-22.1.2/bin

:(

10:54:23
@blokyk:matrix.orgzoë (she/her) *

ok so i wasn't going crazy: trying it out with just nix-shell and hard-coded pkgsCross.riscv32. in front of everything works, but for some reason callPackage/splicing doesn't work :(

# shell.nix
{
  llvmPackages_latest,
  mkShell
}:
let mkLLVMShell = mkShell.override { inherit (llvmPackages_latest) stdenv; };
in
mkLLVMShell { }
$ nix-shell -E '(import <nixpkgs> {}).pkgsCross.riscv64.callPackage ./shell.nix {}'

[nix-shell:~]$ $CC --version
clang version 22.1.2
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/nqrpsik93243zfbysab689b4598x0srw-clang-22.1.2/bin

:(

10:55:24
@dramforever:matrix.orgdramforever stdenv.cc is the toolchain 13:01:19
@dramforever:matrix.orgdramforeverbut otherwise yeah pkgsCross.riscv32.mkShell should get you what you want13:03:23
@blokyk:matrix.orgzoë (she/her)yeah idk what i did, i was just confused13:03:49
@blokyk:matrix.orgzoë (she/her)my actual code was more complicated than just an empty mkShell, but working my way back up to it rather than trying to force the existing code into cross-compilation worked better13:05:02
@blokyk:matrix.orgzoë (she/her)* my actual nix code was more complicated than just an empty mkShell, but working my way back up to it rather than trying to force the existing nnix code into cross-compilation worked better13:06:44
@alex:tunstall.xyzAlex

cc is never a cross compiler in Nixpkgs. That cc probably comes from pkgsBuildBuild and exists so that builds can compile build tools that they can then use later in the build.

Yes, anything that hardcodes cc (or worse gcc) needs to be patched to support cross.

13:09:08
@rasmata:matrix.org@rasmata:matrix.org joined the room.21:44:25
@rasmata:matrix.org@rasmata:matrix.org left the room.21:44:28
18 Apr 2026
@mlyx:matrix.orgmlyx joined the room.12:39:21

There are no newer messages yet.


Back to Room ListRoom Version: 10