diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-03-15 13:58:20 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-03-16 00:31:00 +0000 |
commit | d85408e1193933f36d2d7925214719ab09fd0449 (patch) | |
tree | e429ac0a71131d9d0e1286969cc93fbb718171bc /pkgs | |
parent | 3eb1b848b6aed9c56b5a9f837990b4543dd05ead (diff) | |
download | nixpkgs-d85408e1193933f36d2d7925214719ab09fd0449.tar nixpkgs-d85408e1193933f36d2d7925214719ab09fd0449.tar.gz nixpkgs-d85408e1193933f36d2d7925214719ab09fd0449.tar.bz2 nixpkgs-d85408e1193933f36d2d7925214719ab09fd0449.tar.lz nixpkgs-d85408e1193933f36d2d7925214719ab09fd0449.tar.xz nixpkgs-d85408e1193933f36d2d7925214719ab09fd0449.tar.zst nixpkgs-d85408e1193933f36d2d7925214719ab09fd0449.zip |
spectrumPackages.rootfs: fix custom path entries
Stage 1 was supposed to be able to take a list of PATH entries to prepend to the default PATH, but it didn't do anything with them. Now, it properly adds them to the PATH as early as possible during boot. This mechanism isn't currently used anywhere, but is very useful for debugging. Message-Id: <20210315135820.6375-1-hi@alyssa.is> Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/os-specific/linux/spectrum/rootfs/generic.nix | 3 | ||||
-rw-r--r-- | pkgs/os-specific/linux/spectrum/rootfs/stage1.nix | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/spectrum/rootfs/generic.nix b/pkgs/os-specific/linux/spectrum/rootfs/generic.nix index 0a99f99bd5b..81fb80a614f 100644 --- a/pkgs/os-specific/linux/spectrum/rootfs/generic.nix +++ b/pkgs/os-specific/linux/spectrum/rootfs/generic.nix @@ -8,7 +8,8 @@ let makeStage1 = import ./stage1.nix { inherit writeScript lib - execline s6 s6-portable-utils s6-linux-utils s6-linux-init busybox mesa; + execline s6 s6-portable-utils s6-linux-utils s6-linux-init busybox mesa + path; }; makeServicesDir = import ./services.nix { diff --git a/pkgs/os-specific/linux/spectrum/rootfs/stage1.nix b/pkgs/os-specific/linux/spectrum/rootfs/stage1.nix index be7853316e9..6caf9ff93b8 100644 --- a/pkgs/os-specific/linux/spectrum/rootfs/stage1.nix +++ b/pkgs/os-specific/linux/spectrum/rootfs/stage1.nix @@ -1,16 +1,19 @@ { writeScript, lib , execline, s6, s6-portable-utils, s6-linux-utils, s6-linux-init, busybox, mesa +, path ? [] }: { run ? "true" }: let - path = [ s6 s6-portable-utils s6-linux-utils s6-linux-init busybox execline ]; + path' = path ++ [ + s6 s6-portable-utils s6-linux-utils s6-linux-init busybox execline + ]; in writeScript "init-stage1" '' #! ${execline}/bin/execlineb -P - export PATH ${lib.makeBinPath path} + export PATH ${lib.makeBinPath path'} ${s6}/bin/s6-setsid -qb -- importas -i spectrumcmd spectrumcmd |