15 version = "0.14.0-unstable-2024-09-26";
17 src = fetchFromGitHub {
20 rev = "a620c4fc0eeeaa71ea68c27d6ef96352ed814829";
21 hash = "sha256-8B2H3AwGo9friveBk4bijOph9bSSNR7PPKJYEuywgm4=";
26 subPackages = [ "." ];
32 allowGoReference = true;
34 # The tests want to copy /bin/bash and /bin/ls, but we don't have those.
35 # As these are interesting e2e tests to check if things work, we substitute
36 # them with the actual paths instead of just skipping the tests.
38 substituteInPlace ./uroot_test.go \
39 --replace-fail '-files=/bin/bash"' '-files=${bash}/bin/bash:bin/bash"' \
40 --replace-fail '-files=/bin/ls"' '-files=${coreutils}/bin/ls:bin/ls"' \
41 --replace-fail '-files=/bin/bash' '-files=${bash}/bin/bash'
45 # Somewhat minimal kernel config for Go/u-root, used by upstream for testing.
46 # This can be used to quickly run u-root locally with proper serial console output.
47 kernel-amd64 = linuxManualConfig {
48 inherit (linux_latest) version src;
49 configfile = fetchurl {
50 url = "https://raw.githubusercontent.com/hugelgupf/vmtest/5d9f3d34a58dc7b13bca786e8ac32d3e2ce4e95d/images/kernel-amd64/config_linux.txt";
51 hash = "sha256-CjhWWK6YwSOXP10mpnJjG5nwLWs2cDtebvlDBLzN5fI=";
53 allowImportFromDerivation = true;
58 description = "A fully Go userland with Linux bootloaders";
60 u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go.
62 The package exposes `u-root.kernel-amd64` passthru for a minimal and pre-configured kernel to be used locally with QEMU.
64 homepage = "https://u-root.org/";
65 downloadPage = "https://github.com/u-root/u-root";
66 changelog = "https://github.com/u-root/u-root/blob/${src.rev}/RELEASES";
67 license = lib.licenses.bsd3;
68 maintainers = with lib.maintainers; [ katexochen ];
69 mainProgram = "u-root";
70 platforms = lib.platforms.linux;