-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Closed
Labels
0.kind: bugSomething is brokenSomething is broken6.topic: darwinRunning or building packages on DarwinRunning or building packages on Darwin6.topic: staticStatic builds (e.g. pkgsStatic)Static builds (e.g. pkgsStatic)
Description
Describe the bug
I understand that purely static binaries are not supported under Darwin, due to the unstable system call ABI. My suggestion is that pkgsStatic, on Darwin or cross-compiling to Darwin, should produce static libraries, which would result in dynamic binaries which only depend on libSystem.dylib. This would be useful for single-file software for embedding, as well as simplifying distribution of Nix-built binaries on systems without Nix.
Steps To Reproduce
Steps to reproduce the behavior:
- Build
nixpkgs#legacyPackages.x86_64-darwin.pkgsStatic.nix - Run
llvm-otool -L result/bin/nix - Resulting derivation is a dynamic executable with dependencies elsewhere in the Nix Store
Expected behavior
Resulting executable would only depend on /usr/lib/libSystem.B.dylib
Notify maintainers
@NixOS/darwin-maintainers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is brokenSomething is broken6.topic: darwinRunning or building packages on DarwinRunning or building packages on Darwin6.topic: staticStatic builds (e.g. pkgsStatic)Static builds (e.g. pkgsStatic)