Konubinix' opinionated web of thoughts

How to Run Exec "${@}" in a Nixos String Buildphase

Fleeting

how to run exec “${@}” in a nixos string buildphase

buildPhase = ''
  #!/bin/sh
  mkdir -p $out/bin

  cat<<EOF > $out/bin/${name}
  #!/bin/sh'
  # Note: ANDROID_HOME is deprecated. Use ANDROID_SDK_ROOT.
  export ANDROID_SDK_ROOT="${ANDROID_SDK_ROOT}"
  export ANDROID_NDK_ROOT="${ANDROID_SDK_ROOT}/ndk-bundle"
  export JAVA_HOME="${jdk}"
  exec "DOLLAR{@}"
  EOF
  sed -i 's/DOLLAR/$/' $out/bin/${name}
  chmod +x $out/bin/${name}
  '';