You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
799 B
Nix
34 lines
799 B
Nix
{ pkgs, legacyPackages, ... }:
|
|
with pkgs;
|
|
|
|
let
|
|
inherit (legacyPackages) bash coreutils;
|
|
script = with legacyPackages;
|
|
writeTextFile {
|
|
name = "posix.sh";
|
|
text = ''
|
|
export PATH=${
|
|
lib.makeSearchPathOutput "bin" "bin"
|
|
(with legacyPackages; [ bash hello coreutils ])
|
|
}
|
|
set -v
|
|
time ls -lR /nix
|
|
sleep 1
|
|
hello -v
|
|
sleep 1
|
|
uname -a
|
|
'';
|
|
};
|
|
in rec {
|
|
name = "posix";
|
|
machine = {
|
|
config = ''
|
|
${
|
|
./posix.dhall
|
|
} { bash = \"${bash}\", coreutils = \"${coreutils}\", script = \"${script}\" }'';
|
|
inputs = map pkgs.genodeSources.depot [ "libc" "posix" "vfs_pipe" "vfs" ]
|
|
++ [ bash ];
|
|
extraPaths = [ script ] ++ (with legacyPackages; [ coreutils hello ]);
|
|
};
|
|
}
|