mirror of
https://github.com/0xbbjubjub/miniguest.git
synced 2024-09-11 05:55:35 +03:00
tool: put dependencies in $PATH
This commit is contained in:
parent
beba693833
commit
8af3362f5e
@ -28,7 +28,10 @@ let
|
||||
mkTest = { name, testScript }: nixosTest {
|
||||
inherit name;
|
||||
machine = {
|
||||
environment.systemPackages = [ miniguest ];
|
||||
environment.systemPackages = [
|
||||
# wrapper clears PATH to check for implicit dependencies
|
||||
(writeShellScriptBin "miniguest" ''PATH= exec ${miniguest}/bin/miniguest "$@"'')
|
||||
];
|
||||
environment.etc."pinned-nixpkgs".source = pinned-nixpkgs;
|
||||
system.extraDependencies = [ (import pinned-nixpkgs { inherit system; }).stdenvNoCC ];
|
||||
virtualisation.memorySize = 1024;
|
||||
|
@ -12,7 +12,7 @@
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
{ lib, stdenv, argbash, bash, nixFlakes, shellcheck, makeWrapper }:
|
||||
{ lib, stdenv, argbash, bash, coreutils, nixFlakes, shellcheck, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "miniguest";
|
||||
@ -34,8 +34,9 @@ stdenv.mkDerivation {
|
||||
mkdir -p $out/{libexec/miniguest,bin}
|
||||
mv *.bash $out/libexec/miniguest
|
||||
chmod +x $out/libexec/miniguest/main.bash
|
||||
# keep PATH open ended since Nix pulls from the environment e.g. git
|
||||
makeWrapper $out/libexec/miniguest/main.bash $out/bin/miniguest \
|
||||
--prefix PATH ":" "$out/libexec/miniguest"
|
||||
--prefix PATH ":" "$out/libexec/miniguest:${coreutils}/bin"
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
|
Loading…
Reference in New Issue
Block a user