Skip to content

Commit cbb218b

Browse files
asteriauclaude
andcommitted
system/programs: init nix-ld module
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 34197ea commit cbb218b

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

system/programs/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
imports = [
33
./fonts.nix
44
./home-manager.nix
5+
./nix-ld.nix
56
./xdg.nix
67
];
78

system/programs/nix-ld.nix

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{ pkgs, ... }:
2+
3+
{
4+
# Some tools ship prebuilt, generically dynamically-linked ELF binaries
5+
# that expect the FHS loader at /lib64/ld-linux-x86-64.so.2. On NixOS that
6+
# path is only stub-ld, so such binaries exit 127 ("NixOS cannot run
7+
# dynamically linked executables intended for generic linux environments").
8+
#
9+
# So the fix for that is literally just this
10+
programs.nix-ld = {
11+
enable = true;
12+
libraries = with pkgs; [
13+
stdenv.cc.cc.lib # libstdc++ / libgcc_s for the Bun-compiled binary
14+
zlib
15+
];
16+
};
17+
}

0 commit comments

Comments
 (0)