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-prefetch-git symlink error on macos #11941

Open
2 tasks done
jdelStrother opened this issue Nov 23, 2024 · 0 comments
Open
2 tasks done

nix-prefetch-git symlink error on macos #11941

jdelStrother opened this issue Nov 23, 2024 · 0 comments
Labels

Comments

@jdelStrother
Copy link

jdelStrother commented Nov 23, 2024

Describe the bug

nix-prefetch-git doesn't seem to work for me on macos with the 24.11-beta tag - it complains that /tmp is a symlink (which it is, it links to /private/tmp).

Steps To Reproduce

$ nix run github:nixos/nixpkgs/24.11-beta#nix-prefetch-git -- --url https://github.com/IFTTT/polo.git --rev 316aa2ac210a45a7fc400ab921831493d5dd21b8 --hash sha256
Initialized empty Git repository in /private/tmp/git-checkout-tmp-MzN6ZcNg/polo-316aa2a/.git/
remote: Enumerating objects: 51, done.
remote: Counting objects: 100% (51/51), done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 51 (delta 8), reused 19 (delta 5), pack-reused 0 (from 0)
Unpacking objects: 100% (51/51), 19.57 KiB | 668.00 KiB/s, done.
From https://github.com/IFTTT/polo
 * branch            HEAD       -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...
error: path '/tmp' is a symlink

Expected behavior

Successfully fetches a git repo into the store

Additional context

The same command works fine with 24.05:

$ nix run github:nixos/nixpkgs/24.05#nix-prefetch-git -- --url https://github.com/IFTTT/polo.git --rev 316aa2ac210a45a7fc400ab921831493d5dd21b8 --hash sha256
Initialized empty Git repository in /private/tmp/git-checkout-tmp-22f9iAdj/polo-316aa2a/.git/
remote: Enumerating objects: 51, done.
remote: Counting objects: 100% (51/51), done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 51 (delta 8), reused 19 (delta 5), pack-reused 0 (from 0)
Unpacking objects: 100% (51/51), 19.57 KiB | 715.00 KiB/s, done.
From https://github.com/IFTTT/polo
 * branch            HEAD       -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...

git revision is 316aa2ac210a45a7fc400ab921831493d5dd21b8
path is /nix/store/nljjjs2idzm9j5iy9swppd37z6aq96fb-polo-316aa2a
git human-readable version is -- none --
Commit date is 2022-04-04 16:29:34 -0700
hash is 1vikzclg64lpydfwvz2imzwvl2f2vv1iq9ww43ah31p84w2xfmih
{
  "url": "https://github.com/IFTTT/polo.git",
  "rev": "316aa2ac210a45a7fc400ab921831493d5dd21b8",
  "date": "2022-04-04T16:29:34-07:00",
  "path": "/nix/store/nljjjs2idzm9j5iy9swppd37z6aq96fb-polo-316aa2a",
  "sha256": "1vikzclg64lpydfwvz2imzwvl2f2vv1iq9ww43ah31p84w2xfmih",
  "hash": "sha256-MFbXBSfohgHVIJwnHMPewgm6+a9R/M1d85cS8yj7M+4=",
  "fetchLFS": false,
  "fetchSubmodules": false,
  "deepClone": false,
  "leaveDotGit": false
}

I'd originally posted this in nixpkgs, but then bisected it down to 9a94e07, so I'm guessing the problem is actually in nix itself..?

Metadata

nix-env (Nix) 2.18.8

(though I believe that nix-prefetch-git is using 2.24, at least in the 22.11 release

Checklist

  • checked [latest Nix manual] ([source])
  • checked [open bug issues and pull requests] for possible duplicates

Add 👍 to issues you find important.

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

No branches or pull requests

1 participant