Compare commits
1 commit
ad5cf88717
...
f5d3281e4e
Author | SHA1 | Date | |
---|---|---|---|
f5d3281e4e |
2 changed files with 9 additions and 7 deletions
12
flake.nix
12
flake.nix
|
@ -44,6 +44,9 @@
|
|||
|
||||
find . -type d -exec chmod 755 {} \;
|
||||
|
||||
# Copy kernel modules
|
||||
cp -Pr ${self.packages.${system}.kernel.kernel}/lib/modules ./usr/lib/
|
||||
|
||||
mkdir -p dev proc sys tmp root
|
||||
ln -sf usr/bin bin
|
||||
ln -sf usr/bin sbin
|
||||
|
@ -112,10 +115,6 @@
|
|||
EOF
|
||||
chmod 644 ./etc/group
|
||||
|
||||
# install lib kmod
|
||||
cp -P ${pkgs.kmod.lib}/lib/* ./usr/lib
|
||||
cp -P ${pkgs.libbpf.out}/lib/libbpf* ./usr/lib
|
||||
|
||||
# FIXME: remove this
|
||||
cat <<EOF > usr/lib/systemd/system/demo.service
|
||||
[Unit]
|
||||
|
@ -153,6 +152,11 @@
|
|||
cp ${pkgs.busybox.out}/bin/busybox usr/bin/
|
||||
usr/bin/busybox --list | xargs -I {} ln -sf busybox usr/bin/{}
|
||||
|
||||
# install lib kmod
|
||||
cp -P ${pkgs.kmod.lib}/lib/* ./usr/lib
|
||||
cp -P ${pkgs.kmod.out}/bin/* ./usr/bin
|
||||
cp -P ${pkgs.libbpf.out}/lib/libbpf* ./usr/lib
|
||||
|
||||
# get shared libs
|
||||
find . -type f -executable | xargs ldd 2> /dev/null | awk '{print $3}' | grep -v systemd | sort -u | xargs cp -t usr/lib
|
||||
find . -type f -executable | xargs chmod 755
|
||||
|
|
|
@ -187,9 +187,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
(lib.mesonOption "mode" "release")
|
||||
(lib.mesonOption "tty-gid" "3") # tty in NixOS has gid 3
|
||||
|
||||
# Use busybox kernel modules tools instead
|
||||
(lib.mesonOption "kmod-path" "")
|
||||
|
||||
(lib.mesonOption "kmod-path" "/usr/bin/kmod")
|
||||
(lib.mesonOption "debug-shell" "/usr/bin/sh")
|
||||
(lib.mesonOption "pamconfdir" "/etc/pam.d")
|
||||
(lib.mesonOption "shellprofiledir" "/etc/profile.d")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue