Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install failing on latest Bluefin #1404

Open
cpnfeeny opened this issue Feb 4, 2025 · 6 comments
Open

install failing on latest Bluefin #1404

cpnfeeny opened this issue Feb 4, 2025 · 6 comments

Comments

@cpnfeeny
Copy link

cpnfeeny commented Feb 4, 2025

On a fresh install of Bluefin, I can't get the installer to work. See the error of the self-test below.

I do notice that the path /nix/var/determinate/ doesn't exist.

Error

Error: 
   0: Self test error, install may be only partially functional
   0: Shell `sh` failed self-test with command `"sh" "-lc" "nix build --option substitute false --no-link --expr \'derivation { name = \"self-test-sh-1738704946827\"; system = \"x86_64-linux\"; builder = \"/bin/sh\"; args = [\"-c\" \"echo hello > \\$out\"]; }\'"`, stderr:
      this derivation will be built:
        /nix/store/radbcdyrlzq2fnmllvkm0425kwv5c7b9-self-test-sh-1738704946827.drv
      building '/nix/store/radbcdyrlzq2fnmllvkm0425kwv5c7b9-self-test-sh-1738704946827.drv'...
      error: program '/nix/var/determinate/post-build-hook.sh' failed with exit code 1


      Shell `bash` failed self-test with command `"bash" "-lc" "nix build --option substitute false --no-link --expr \'derivation { name = \"self-test-bash-1738704947203\"; system = \"x86_64-linux\"; builder = \"/bin/sh\"; args = [\"-c\" \"echo hello > \\$out\"]; }\'"`, stderr:
      this derivation will be built:
        /nix/store/zjd1w25r3mr2rcly1jprg5vv0cl3arm4-self-test-bash-1738704947203.drv
      building '/nix/store/zjd1w25r3mr2rcly1jprg5vv0cl3arm4-self-test-bash-1738704947203.drv'...
      error: program '/nix/var/determinate/post-build-hook.sh' failed with exit code 1


      Shell `fish` failed self-test with command `"fish" "-ic" "nix build --option substitute false --no-link --expr \'derivation { name = \"self-test-fish-1738704947394\"; system = \"x86_64-linux\"; builder = \"/bin/sh\"; args = [\"-c\" \"echo hello > \\$out\"]; }\'"`, stderr:
      this derivation will be built:
        /nix/store/2wixxdp1rim3286jqdvdahxjcjsp43vb-self-test-fish-1738704947394.drv
      building '/nix/store/2wixxdp1rim3286jqdvdahxjcjsp43vb-self-test-fish-1738704947394.drv'...
      error: program '/nix/var/determinate/post-build-hook.sh' failed with exit code 1


      Shell `zsh` failed self-test with command `"zsh" "-ic" "nix build --option substitute false --no-link --expr \'derivation { name = \"self-test-zsh-1738704947612\"; system = \"x86_64-linux\"; builder = \"/bin/sh\"; args = [\"-c\" \"echo hello > \\$out\"]; }\'"`, stderr:
      this derivation will be built:
        /nix/store/v3kx5nc5nh925lgfwav9xczh0g7zfzvb-self-test-zsh-1738704947612.drv
      building '/nix/store/v3kx5nc5nh925lgfwav9xczh0g7zfzvb-self-test-zsh-1738704947612.drv'...
      error: program '/nix/var/determinate/post-build-hook.sh' failed with exit code 1


Metadata

key value
version 0.34.0
os linux
arch x86_64

echo $PATH

/var/home/9999/.local/bin:/var/home/ej/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/var/home/9999/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin

@cpnfeeny cpnfeeny changed the title <autogenerated-issue> install failing on latest Bluefin Feb 4, 2025
@cole-h
Copy link
Member

cole-h commented Feb 5, 2025

Yeah, this is a bug that I keep forgetting to fix. I'll send out a PR shortly, but you can essentially ignore that, assuming you can access Nix inside your shells (a simple nix store info will validate).

@cpnfeeny
Copy link
Author

cpnfeeny commented Feb 5, 2025

Hmmm.

But if I try to add a channel and then update, I get

$ nix-channel --update

unpacking 1 channels...
warning: 'https://cache.flakehub.com' does not appear to be a binary cache
post-build-hook: error: executing '/nix/var/determinate/post-build-hook.sh': No such file or directory
error: program '/nix/var/determinate/post-build-hook.sh' failed with exit code 1
error: program '/nix/store/3x497rk44p5zpr2vbf155dqw5xfjri1a-nix-2.25.3/bin/nix-env' failed with exit code 1

Or perhaps this problem is unrelated to the bug you mentioned?

Thanks!

@cpnfeeny
Copy link
Author

cpnfeeny commented Feb 5, 2025

Or it's the same 'just ignore it' bug?

@cole-h
Copy link
Member

cole-h commented Feb 5, 2025

Could you try restarting your nix-daemon? sudo systemctl restart nix-daemon should do it.

If it fails to start up, I'd be interested to know why.

(The post-build-hook is something that should be created by determinate-nixd, so the fact it's not there at this point is a little suspicious. It not being there during the self-test is "maybe ok", but it not being there after that is weird.)

@stevefan1999-personal
Copy link

I also noticed this error when installing Nix using this installer on my Fedora Silverblue PC, so as a workaround I just created the parent directory and touched the script in question. It seems like it worked afterwards and I'm not aware if there are any other problems so far.

@Hermitter
Copy link

Hermitter commented Feb 22, 2025

On Silverblue, I ran into the same issue. It seems the installer doesn't correctly set up nix when installing with --determinate.

I haven't been keeping up with all the changes and didn't realize that the prompt Cut the fuss with Determinate Nix? wasn't just confirming with me to run the Determinate Nix Installer as before.

After uninstalling and then telling the installer no for Determinate. Everything is working now.

bash-5.2$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
  sh -s -- install
info: downloading installer (https://install.determinate.systems/nix/tag/v0.36.4/nix-installer-x86_64-linux)
 INFO nix-installer v0.36.4
`nix-installer` needs to run as `root`, attempting to escalate now via `sudo`...
 INFO nix-installer v0.36.4

Cut the fuss with Determinate Nix? 

Proceed? ([Y]es/[n]o/[e]xplain): n
Nix install plan (v0.36.4)
Planner: ostree (with default settings)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants