nix binary not on PATH within post-build-hook script (macos) #54

Open
opened 2023-11-03 18:11:14 +00:00 by adrian-gierakowski · 0 comments
adrian-gierakowski commented 2023-11-03 18:11:14 +00:00 (Migrated from github.com)

Tried this on: macos-12 and macos-13-xlarge with identical results

I'm using default installer configuration

    - uses: DeterminateSystems/nix-installer-action@main

In following step I set post-build-hook (which invokes nix copy) in /etc/nix/nix.conf and restart nix daemon with:

sudo launchctl stop org.nixos.nix-daemon
sudo launchctl start org.nixos.nix-daemon

I then build a package with nix-build and see the following:

post-build-hook: /Users/runner/.config/nix/upload-to-cache.sh: line 28: nix: command not found
error: program '/Users/runner/.config/nix/upload-to-cache.sh' failed with exit code 127
Tried this on: `macos-12` and `macos-13-xlarge` with identical results I'm using default installer configuration ```yaml - uses: DeterminateSystems/nix-installer-action@main ``` In following step I set `post-build-hook` (which invokes `nix copy`) in `/etc/nix/nix.conf` and restart nix daemon with: ``` sudo launchctl stop org.nixos.nix-daemon sudo launchctl start org.nixos.nix-daemon ``` I then build a package with nix-build and see the following: ``` post-build-hook: /Users/runner/.config/nix/upload-to-cache.sh: line 28: nix: command not found error: program '/Users/runner/.config/nix/upload-to-cache.sh' failed with exit code 127 ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix-install-action#54
No description provided.