mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
tests: remove usage of undeclared runtime dependencies
This commit is contained in:
parent
28e2fde133
commit
70bc99a562
2 changed files with 18 additions and 2 deletions
|
|
@ -8,9 +8,21 @@ let
|
|||
nixOnDroidChannelURL = "file:///n-o-d/archive.tar.gz";
|
||||
nixOnDroidFlakeURL = "/n-o-d/unpacked";
|
||||
};
|
||||
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
runtimePackages = with pkgs; [
|
||||
coreutils
|
||||
git
|
||||
gnutar
|
||||
gzip
|
||||
unzip
|
||||
wget
|
||||
zip
|
||||
];
|
||||
in
|
||||
|
||||
nixpkgs.legacyPackages.${system}.runCommand
|
||||
pkgs.runCommand
|
||||
"fakedroid"
|
||||
{
|
||||
preferLocalBuild = true;
|
||||
|
|
@ -20,6 +32,8 @@ nixpkgs.legacyPackages.${system}.runCommand
|
|||
install -D -m755 ${./fakedroid.sh} $out
|
||||
|
||||
substituteInPlace $out \
|
||||
--subst-var-by bash "${pkgs.bash}" \
|
||||
--subst-var-by path "${pkgs.lib.makeBinPath runtimePackages}" \
|
||||
--subst-var-by bootstrapZip "${bootstrap.customPkgs.bootstrapZip}" \
|
||||
--subst-var-by prootTest "${bootstrap.customPkgs.prootTermuxTest}" \
|
||||
--subst-var-by installationDir "${bootstrap.config.build.installationDir}" \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!@bash@/bin/bash
|
||||
|
||||
# This is a script to run "on-device" tests in CI, without the device.
|
||||
# Takes the bootstrap aarch64 zipball, unpacks, proots into it.
|
||||
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
set -ueo pipefail
|
||||
|
||||
PATH=@path@
|
||||
|
||||
USE_FLAKE="${USE_FLAKE:-0}"
|
||||
if [[ ! "$USE_FLAKE" =~ ^[01]$ ]]; then
|
||||
echo "USE_FLAKE environment variable needs to be either 0 or 1, got '$USE_FLAKE'."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue