Skip to content

Comments

stdenv: add uutils-coreutils stdenv#116274

Merged
siraben merged 4 commits intoNixOS:masterfrom
SuperSandro2000:uutils-coreutils-stdenv
May 14, 2025
Merged

stdenv: add uutils-coreutils stdenv#116274
siraben merged 4 commits intoNixOS:masterfrom
SuperSandro2000:uutils-coreutils-stdenv

Conversation

@SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Mar 14, 2021

To try this use the pkgsUutils overlay and replace python3 with any package:

nix-build -A pkgsUutils.python3

ToDo:

Issues preventing us from using it in a stdenv:

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@SuperSandro2000 SuperSandro2000 changed the title Uutils coreutils stdenv stdenv: add uutils-coreutils stdenv Mar 14, 2021
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/rust-coreutils-replacement/11867/4

@ofborg ofborg bot added the 6.topic: stdenv Standard environment label Mar 14, 2021
@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 8.has: package (new) This PR adds a new package labels Mar 14, 2021
@ofborg ofborg bot requested review from andir, edolstra, lovek323, np and siraben March 14, 2021 04:56
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Mar 14, 2021
@vobloeb
Copy link
Contributor

vobloeb commented Mar 14, 2021

Is it ...practical?
Rust is funny, but uutils-coreutils is 80MB vs. 1.5MB of coreutils

@SuperSandro2000
Copy link
Member Author

Is it ...practical?
Rust is funny, but uutils-coreutils is 80MB vs. 1.5MB of coreutils

The single binary is much smaller and when rust supports lining to shared find it will be reduced even further. uutils/coreutils#747

@siraben

This comment has been minimized.

@siraben

This comment has been minimized.

Copy link
Member

@siraben siraben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the hash (temporary workaround) GNU Hello compiles and runs:

$ nix-build --show-trace -E 'with import ./. { }; hello.override { stdenv = stdenvUutilsCoreutils; }' && ./result/bin/hello
[nix-shell:~/nixpkgs]$ nix-build --show-trace -E 'with import ./. { }; hello.override { stdenv = stdenvUutilsCoreutils; }' && ./result/bin/hello
/nix/store/jxklig35p42bxhp9yzk0gkgz2d5i8vml-hello-2.10
Hello, world!

@siraben
Copy link
Member

siraben commented May 30, 2021

Checked as of 2021-06-16

  • ed failed to build
Details
shrinking RPATHs of ELF executables and libraries in /nix/store/19n3pm10rr79445054shvid8m49mab43-ed-1.17
shrinking /nix/store/19n3pm10rr79445054shvid8m49mab43-ed-1.17/bin/ed
gzipping man pages under /nix/store/19n3pm10rr79445054shvid8m49mab43-ed-1.17/share/man/
strip is /nix/store/b8y61srrw1m2n87dr5snfaxy0rqgk6qy-binutils-2.35.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/19n3pm10rr79445054shvid8m49mab43-ed-1.17/bin
patching script interpreter paths in /nix/store/19n3pm10rr79445054shvid8m49mab43-ed-1.17
/nix/store/19n3pm10rr79445054shvid8m49mab43-ed-1.17/bin/red: interpreter directive changed from "#! /bin/sh" to "/nix/store/3xqkrab9zqpv91bw1xp8551sjk7qrc34-bash-4.4-p23/bin/sh"
thread 'main' panicked at 'Unable to parse date
Invalid day.', src/uu/touch/src/touch.rs:248:19
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
builder for '/nix/store/yh6a7878qfg3qqi24mk61jaax47y2jpa-ed-1.17.drv' failed with exit code 101
error: build of '/nix/store/yh6a7878qfg3qqi24mk61jaax47y2jpa-ed-1.17.drv' failed
  • vim failed to build
Details
these derivations will be built:
  /nix/store/7wna7whwryrrmsm6fpf02sqpsaw4jpv9-vim-8.2.2567.drv
building '/nix/store/7wna7whwryrrmsm6fpf02sqpsaw4jpv9-vim-8.2.2567.drv'...
unpacking sources
unpacking source archive /nix/store/dvh1x2m7gvp1iv5jjlvrf5ry5g3ay23k-source
cp: error: '/nix/store/dvh1x2m7gvp1iv5jjlvrf5ry5g3ay23k-source/src/normal.c' -> 'source/src/normal.c': Too many open files (os error 24)
do not know how to unpack source archive /nix/store/dvh1x2m7gvp1iv5jjlvrf5ry5g3ay23k-source
builder for '/nix/store/7wna7whwryrrmsm6fpf02sqpsaw4jpv9-vim-8.2.2567.drv' failed with exit code 1
error: build of '/nix/store/7wna7whwryrrmsm6fpf02sqpsaw4jpv9-vim-8.2.2567.drv' failed

Compiling other packages with the uutils-based stdenv:

  • vim (symlink converting fails)
  • coreutils-gnu (failed with error: The argument '--symbolic' was provided more than once, but cannot be used multiple times)
  • tinycc (failed)
  • chez
  • pforth
  • nawk
  • gawk
  • guile
  • chicken (failed, unable to parse date)
  • miranda (cp: '/nix/store/dl6ahdcycmw4yry2zpmslq7w7i2mdlvk-source/miralib/ex/box.m' -> 'source/miralib/ex/box.m': Permission denied (os error 13))
  • rustc (error: Found argument '--libdir' which wasn't expected, or isn't valid in this context)
  • bash
  • dash
  • tmux
  • screen
  • go (failed, unable to parse date)
  • htop (cp: '/nix/store/21zp1xfq78bp4rgvdlvd5r2d0rmmp55n-source/README' -> 'source/README': Permission denied (os error 13))
  • uutils-coreutils
  • fish
  • ghc (mkdir: ./utils/ghc-cabal/dist/build/tmp//.: No such file or directory (os error 2))
  • openjdk (error: cannot find symbol)
  • julia (failed, failing test in LinearAlgebra/triangular)
  • tcl (failed, ln: error: No such file or directory (os error 2))
  • sbcl (failed, unable to parse date)
  • emacs (failed, unable to parse date)
  • binutils-unwrapped
  • the-powder-toy
  • gnumake
  • cmake
  • ripgrep
  • gnupg
  • git (test failure)

@siraben
Copy link
Member

siraben commented May 30, 2021

Unfortunately it will take some digging to figure out exactly what went wrong in the builds that failed, so that upstream has a clear view on what incompatibilities they need to address.

@nix-owners nix-owners bot requested a review from Ericson2314 March 12, 2025 18:20
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 2, 2025
@nyabinary
Copy link
Contributor

Ubuntu is moving towards uutils, probably a good idea to keep an eye on their efforts.

Merge conflict with the treewide nixfmt :P

@siraben
Copy link
Member

siraben commented May 14, 2025

I still would love to see this merged, it does not conflict with the main package set and can enable robustness checking of packages/NixOS itself.

@SuperSandro2000 SuperSandro2000 force-pushed the uutils-coreutils-stdenv branch from 8cf07c7 to bd4460e Compare May 14, 2025 13:40
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label May 14, 2025
@siraben
Copy link
Member

siraben commented May 14, 2025

Evaluation failing: error: attribute 'expand-response-params' missing

@SuperSandro2000 SuperSandro2000 force-pushed the uutils-coreutils-stdenv branch from bd4460e to b939123 Compare May 14, 2025 14:51
@github-actions github-actions bot removed 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. labels May 14, 2025
@SuperSandro2000 SuperSandro2000 force-pushed the uutils-coreutils-stdenv branch from b939123 to 4e1dc66 Compare May 14, 2025 16:13
Copy link
Member

@siraben siraben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, pending CI passes. Let's get this in so it's maintained instead of continuously rebased.

@SuperSandro2000 SuperSandro2000 force-pushed the uutils-coreutils-stdenv branch from 4e1dc66 to bace9f3 Compare May 14, 2025 16:47
@SuperSandro2000
Copy link
Member Author

Lets at least get the formatting action to pass, otherwise other PRs might be impacted by that.

@siraben
Copy link
Member

siraben commented May 14, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 116274 --package pkgsUutils.hello


x86_64-linux

✅ 1 package built:
  • pkgsUutils.hello

@siraben siraben merged commit add885e into NixOS:master May 14, 2025
18 of 21 checks passed
@siraben
Copy link
Member

siraben commented May 14, 2025

@SuperSandro2000 please retarget staging, looks like it causes mass rebuilds due to the autoconf change.

@SuperSandro2000
Copy link
Member Author

#407301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: wait-for-upstream Waiting for upstream fix (or their other action). 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.