Skip to content

arcanist: not executable on Darwin due to wrappers in shebang #86881

@purcell

Description

@purcell

Describe the bug

% arc diff origin/master
/nix/store/701ysppiy3rg2rx874dwbq0siypry2dj-arcanist-20200127/libexec/arcanist/bin/../scripts/arcanist.php: line 2: ?php: No such file or directory
/nix/store/701ysppiy3rg2rx874dwbq0siypry2dj-arcanist-20200127/libexec/arcanist/bin/../scripts/arcanist.php: line 4: syntax error near unexpected token `;'
/nix/store/701ysppiy3rg2rx874dwbq0siypry2dj-arcanist-20200127/libexec/arcanist/bin/../scripts/arcanist.php: line 4: `sanity_check_environment();'

To Reproduce
Steps to reproduce the behavior:

  1. Install nixpkgs.arcanist on Darwin
  2. Execute it

Expected behavior

The program runs, via PHP being used to execute the top-level arcanist.php script.

Additional context

Guessing this is related to #23018, which appears stalled, or perhaps there was uncertainty about which MacOS versions this applied to.

The arcanist.php mentioned above begins

#!/nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/bin/php
<?php

sanity_check_environment();

and it is invoked via the arc bin wrapper which begins

#! /nix/store/4p3bds5cknzwg72np1rzyn3jq0962z84-bash-4.4-p23/bin/bash -e
export PATH='/nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/bin'${PATH:+':'}$PATH
exec -a "$0" "/nix/store/701ysppiy3rg2rx874dwbq0siypry2dj-arcanist-20200127/bin/.arc-wrapped"  "$@"

while /nix/store/701ysppiy3rg2rx874dwbq0siypry2dj-arcanist-20200127/bin/.arc-wrapped is itself a bash wrapper, and /nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/bin/php is

#! /nix/store/4p3bds5cknzwg72np1rzyn3jq0962z84-bash-4.4-p23/bin/bash -e
export PHP_INI_SCAN_DIR='/nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/lib'
exec -a "$0" "/nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/bin/.php-wrapped"  "$@"

The /nix/store/27bvk409ismmgysi1lv868f51f3nh4wq-php-with-extensions-7.4.4/bin/.php-wrapped is the native executable.

Notify maintainers

@thoughtpolice

Metadata

  • system: "x86_64-darwin"
  • host os: Darwin 19.4.0, macOS 10.15.4
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 2.3.4
  • channels(steve): "nixpkgs-20.09pre221814.10100a97c89"
  • nixpkgs: /Users/steve/.nix-defexpr/channels/nixpkgs

Maintainer information:

- arcanist

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: darwinRunning or building packages on Darwin
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions