!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

557 Members
119 Servers

Load older messages


SenderMessageTime
28 Aug 2025
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) i mean, buildPackages does not need pam to build stuff. Pam is only ever required on a real system. So doing targetPlatform == hostPlatform checks might work 10:02:27
@qyliss:fairydust.spaceAlyssa RossDoes mean a lot of rebuilds in buildPackages though10:02:38
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)that, yes10:02:46
@qyliss:fairydust.spaceAlyssa RossYeah I think this is fixable in the FreeBSD mkDerivation10:03:37
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)delaying the isClang check might work too, but that is too deep in the LLVM stack for me to properly understand what is going on there10:03:49
@dramforever:matrix.orgdramforeveri'm looking at that as well but yes i think we should not disable pam support in buildPackages10:04:21
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)i am all for it if it can be fixed in the freebsd mkderivation, but i don't know enough freebsd/stdenv wizardry to fix it there. I knew how to fix it in util-linux, but i won't make a claim about that being the best fix10:05:45
@qyliss:fairydust.spaceAlyssa RossYep, I have a fix.10:06:11
@dramforever:matrix.orgdramforever
In reply to @grimmauld:grapevine.grimmauld.de
i am all for it if it can be fixed in the freebsd mkderivation, but i don't know enough freebsd/stdenv wizardry to fix it there. I knew how to fix it in util-linux, but i won't make a claim about that being the best fix
okay i would like to clarify that i am saying that making util-linux depend on targetPlatform is not acceptable. that would make anyone cross compiling to rebuild everything in buildPackages that depends on util-linux
10:07:23
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)right.10:07:50
@dramforever:matrix.orgdramforeverand random stuff will depend on util-linux10:07:55
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)this was llvm -> libxml2 -> python3 -> libuuid (which is util-linuxMinimal)10:08:18
@dramforever:matrix.orgdramforevermy personal opinion: hypothetically if a long time to fix freebsd cross, i would rather leave freebsd broken than make util-linux depend on targetPlatform10:09:00
@dramforever:matrix.orgdramforever* my personal opinion: hypothetically if it took a long time to fix freebsd cross, i would rather leave freebsd broken than make util-linux depend on targetPlatform10:09:14
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) though i am also confused, because util-linuxMinimal has pamSupport = false;, it shouldn't even call that stuff in libuuid... 10:12:08
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)

of course the lastlog isn't dependent on pamSupport rn, i meant even with the following patch it still goes to inf-rec:

diff --git a/pkgs/by-name/ut/util-linux/package.nix b/pkgs/by-name/ut/util-linux/package.nix
index 1f2a43e18275..55b06ba019f4 100644
--- a/pkgs/by-name/ut/util-linux/package.nix
+++ b/pkgs/by-name/ut/util-linux/package.nix
@@ -29,7 +29,7 @@
   writeSupport ? stdenv.hostPlatform.isLinux,
   shadowSupport ? stdenv.hostPlatform.isLinux,
   # Doesn't build on Darwin, only makes sense on systems which have pam
-  withLastlog ? !stdenv.hostPlatform.isDarwin && lib.meta.availableOn stdenv.hostPlatform pam,
+  withLastlog ? !stdenv.hostPlatform.isDarwin && pamSupport,
   gitUpdater,
   nixosTests,
 }:

10:13:30
@qyliss:fairydust.spaceAlyssa Rosshttps://github.com/NixOS/nixpkgs/pull/43786710:14:02
@artturin:matrix.orgArtturin
In reply to @dramforever:matrix.org
okay i would like to clarify that i am saying that making util-linux depend on targetPlatform is not acceptable. that would make anyone cross compiling to rebuild everything in buildPackages that depends on util-linux
So staging? Everything in buildPackages has to be rebuild anyways since it can't be shared with native pkgs (not saying the change should be done but rebuilding isn't an issue)
10:14:47
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) formatter complains, but other than that this looks like the better fix. No buildPackages/targetPlatform hacks, which is nice. Though this is also very far outside my expertise. 10:22:10
@dramforever:matrix.orgdramforever

Everything in buildPackages has to be rebuild anyways since it can't be shared with native pkgs

they are shared

nix-repl> pkgsCross.riscv64.buildPackages.llvm
«derivation /nix/store/1fflvvc3y3qv9pdjxf2j50wkxp8g4f8y-llvm-19.1.7.drv»

nix-repl> llvm                                 
«derivation /nix/store/1fflvvc3y3qv9pdjxf2j50wkxp8g4f8y-llvm-19.1.7.drv»
11:08:25
@dramforever:matrix.orgdramforeveri suppose this is a bad example because llvm depends on util-linuxMinimal which doesn't depend on pam11:11:39
@artturin:matrix.orgArtturin
In reply to @dramforever:matrix.org

Everything in buildPackages has to be rebuild anyways since it can't be shared with native pkgs

they are shared

nix-repl> pkgsCross.riscv64.buildPackages.llvm
«derivation /nix/store/1fflvvc3y3qv9pdjxf2j50wkxp8g4f8y-llvm-19.1.7.drv»

nix-repl> llvm                                 
«derivation /nix/store/1fflvvc3y3qv9pdjxf2j50wkxp8g4f8y-llvm-19.1.7.drv»
Oh, I guess I've always missed that somehow and thought that we would reduce the amount of rebuilds of we used depsBuildBuild for target independent packages
11:14:01
@artturin:matrix.orgArtturin* Oh, I guess I've always missed that somehow and thought that we would reduce the amount of rebuilds if we used depsBuildBuild for target independent packages11:14:13
@artturin:matrix.orgArtturin:p11:14:17
@dramforever:matrix.orgdramforever but as a general rule this is why targetPlatform is bad 11:14:17
@dramforever:matrix.orgdramforeveryes, depending on targetPlatform is what makes pkgsBB and pkgsBH different. this is kinda like, the point11:16:00
@artturin:matrix.orgArtturinAnyone seen this issue before? https://github.com/NixOS/nixpkgs/issues/437626 I found a patch that fixes it but it's weird that no one else has encountered the issue? https://github.com/NixOS/nixpkgs/pull/43766811:19:26
@artturin:matrix.orgArtturinDoes no one else use nginx with ssl on a raspi?11:19:56
@artturin:matrix.orgArtturin* Does no one else use nginx with http2 and ssl on a raspi?11:20:16
@sbc64:matrix.orgsbc64 changed their profile picture.14:23:44

Show newer messages


Back to Room ListRoom Version: 6