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

nix-hash process substitution example fails with error: path '/dev/fd/63' is a symlink on Arch Linux #11681

Closed
Kakadus opened this issue Oct 11, 2024 · 2 comments · Fixed by #12046
Labels

Comments

@Kakadus
Copy link

Kakadus commented Oct 11, 2024

Describe the bug

I cannot run the echo example for nix-hash nix-hash --type sha256 --flat --base32 <(echo test) from https://nix.dev/manual/nix/2.24/command-ref/nix-hash#examples. Then, I only get error: path '/dev/fd/63' is a symlink.

In fact, if I run any nix-hash command that uses the <(...) syntax for input, this fails.

Steps To Reproduce

  1. run nix-hash --type sha256 --flat --base32 <(echo test)
  2. see error: path '/dev/fd/63' is a symlink

Expected behavior

I expect this to work, as it is an example command. According to the examples 1lkgqb6fclns49861dwk9rzb6xnfkxbpws74mxnx01z9qyv1pjpj should be the correct output.

nix-env --version output

nix-env (Nix) 2.24.7

Additional context

I'm on Arch Linux and used their nix package to install nix.

output of stat <(echo test):

  File: /dev/fd/63 -> pipe:[360496]
  Size: 64              Blocks: 0          IO Block: 1024   symbolic link
Device: 0,22    Inode: 349772      Links: 1
Access: (0500/lr-x------)  Uid: ( 1000/   user)   Gid: ( 1000/   user)
Access: 2024-10-11 21:28:46.230728151 +0200
Modify: 2024-10-11 21:28:46.230728151 +0200
Change: 2024-10-11 21:28:46.230728151 +0200
 Birth: -

Priorities

Add 👍 to issues you find important.

@jwiegley
Copy link

I'm also experiencing this error now on macOS, except that the error reports that /var is a symlink.

@ofalvai
Copy link

ofalvai commented Nov 21, 2024

I think it's also what broke swiftpm2nix recently. That error surfaces as:

-- Fetching Commander
Initialized empty Git repository in /private/tmp/git-checkout-tmp-G27B0tSB/Commander-4b6133c/.git/
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (41/41), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 41 (delta 1), reused 16 (delta 1), pack-reused 0 (from 0)
Unpacking objects: 100% (41/41), 31.18 KiB | 1.04 MiB/s, done.
From https://github.com/kylef/Commander
 * tag               0.9.1      -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...
error: path '/tmp' is a symlink

ofalvai added a commit to ofalvai/nixpkgs that referenced this issue Nov 23, 2024
roberth added a commit to roberth/nix that referenced this issue Dec 13, 2024
Mic92 pushed a commit to roberth/nix that referenced this issue Dec 14, 2024
roberth added a commit to roberth/nix that referenced this issue Dec 15, 2024
roberth added a commit to roberth/nix that referenced this issue Dec 16, 2024
roberth added a commit to roberth/nix that referenced this issue Dec 23, 2024
@Mic92 Mic92 closed this as completed in 36563c6 Jan 7, 2025
mergify bot pushed a commit that referenced this issue Jan 7, 2025
mergify bot pushed a commit that referenced this issue Jan 7, 2025
Mic92 pushed a commit that referenced this issue Jan 7, 2025
Mic92 pushed a commit that referenced this issue Jan 7, 2025
Mic92 pushed a commit that referenced this issue Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants