Skip to content

cursor-cli: init at 0-unstable-2025-08-09 #432035

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sudosubin
Copy link
Member

@sudosubin sudosubin commented Aug 8, 2025

Added cursor-cli, which is currently beta stage.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Aug 8, 2025
@josh
Copy link
Contributor

josh commented Aug 8, 2025

Nice! I was looking into packaging this myself.

I think we maybe able to swap out its bundled node for nodejs_22. But it's bundled rg appears to be a fork.

@josh
Copy link
Contributor

josh commented Aug 8, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 432035
Commit: 52def9240d5f50564d50914492ab20840515e58e


x86_64-linux

❌ 1 package failed to build:
  • cursor-agent

aarch64-linux

❌ 1 package failed to build:
  • cursor-agent

aarch64-darwin

✅ 1 package built:
  • cursor-agent

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Aug 8, 2025
@josh
Copy link
Contributor

josh commented Aug 9, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 432035
Commit: 0897ec3cffb524b2b5dead0b63fa5c57842e09d9


x86_64-linux

❌ 1 package failed to build:
  • cursor-agent

aarch64-linux

❌ 1 package failed to build:
  • cursor-agent

aarch64-darwin

✅ 1 package built:
  • cursor-agent

Error logs: `x86_64-linux`
cursor-agent
          PosixPath('/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh/lib'),
          PosixPath('/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh/lib'),
          PosixPath('/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh/lib'),
          PosixPath('/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh/lib'),
          PosixPath('/nix/store/67x7pknz0qa2j16x02idf0x98lpcspah-gcc-wrapper-14.3.0/lib'),
          PosixPath('/nix/store/lv91pnk6dqvw0xmbi5irli7m6nikfr33-binutils-wrapper-2.44/lib')],
 'paths': [PosixPath('/nix/store/ilfzgsmjvvbc5ilz4zn8jh358h44qgh6-cursor-agent-2025.08.08-f57cb59')],
 'recursive': True,
 'runtime_dependencies': []}
searching for dependencies of /nix/store/ilfzgsmjvvbc5ilz4zn8jh358h44qgh6-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/rg
setting interpreter of /nix/store/ilfzgsmjvvbc5ilz4zn8jh358h44qgh6-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/node
searching for dependencies of /nix/store/ilfzgsmjvvbc5ilz4zn8jh358h44qgh6-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/node
    libstdc++.so.6 -> not found!
    libgcc_s.so.1 -> not found!
searching for dependencies of /nix/store/ilfzgsmjvvbc5ilz4zn8jh358h44qgh6-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/build/node_sqlite3.node
auto-patchelf: 2 dependencies could not be satisfied
error: auto-patchelf could not satisfy dependency libstdc++.so.6 wanted by /nix/store/ilfzgsmjvvbc5ilz4zn8jh358h44qgh6-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/node
error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/ilfzgsmjvvbc5ilz4zn8jh358h44qgh6-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/node
auto-patchelf failed to find all the required dependencies.
Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.

Error logs: `aarch64-linux`
cursor-agent
          PosixPath('/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh/lib'),
          PosixPath('/nix/store/0r34311s7lka3iisjvhdaqpblqyk6g9f-gcc-wrapper-14.3.0/lib'),
          PosixPath('/nix/store/isdnv01pqwwwya8pwsbai2m7yyf5xhx5-binutils-wrapper-2.44/lib')],
 'paths': [PosixPath('/nix/store/lq5c3ap1acw9snpnkmbpmh0bkd7bm39w-cursor-agent-2025.08.08-f57cb59')],
 'recursive': True,
 'runtime_dependencies': []}
setting interpreter of /nix/store/lq5c3ap1acw9snpnkmbpmh0bkd7bm39w-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/rg
searching for dependencies of /nix/store/lq5c3ap1acw9snpnkmbpmh0bkd7bm39w-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/rg
    libgcc_s.so.1 -> not found!
setting interpreter of /nix/store/lq5c3ap1acw9snpnkmbpmh0bkd7bm39w-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/node
searching for dependencies of /nix/store/lq5c3ap1acw9snpnkmbpmh0bkd7bm39w-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/node
    libstdc++.so.6 -> not found!
    libgcc_s.so.1 -> not found!
searching for dependencies of /nix/store/lq5c3ap1acw9snpnkmbpmh0bkd7bm39w-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/build/node_sqlite3.node
auto-patchelf: 3 dependencies could not be satisfied
error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/lq5c3ap1acw9snpnkmbpmh0bkd7bm39w-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/rg
error: auto-patchelf could not satisfy dependency libstdc++.so.6 wanted by /nix/store/lq5c3ap1acw9snpnkmbpmh0bkd7bm39w-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/node
error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/lq5c3ap1acw9snpnkmbpmh0bkd7bm39w-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/node
auto-patchelf failed to find all the required dependencies.
Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.

@josh
Copy link
Contributor

josh commented Aug 9, 2025

Hashes look now look good, but the autoPatchelfHook doesn't seem happy

       > searching for dependencies of /nix/store/ilfzgsmjvvbc5ilz4zn8jh358h44qgh6-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/node
       >     libstdc++.so.6 -> not found!
       >     libgcc_s.so.1 -> not found!
       > searching for dependencies of /nix/store/ilfzgsmjvvbc5ilz4zn8jh358h44qgh6-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/build/node_sqlite3.node
       > auto-patchelf: 2 dependencies could not be satisfied
       > error: auto-patchelf could not satisfy dependency libstdc++.so.6 wanted by /nix/store/ilfzgsmjvvbc5ilz4zn8jh358h44qgh6-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/node
       > error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/ilfzgsmjvvbc5ilz4zn8jh358h44qgh6-cursor-agent-2025.08.08-f57cb59/share/cursor-agent/node
       > auto-patchelf failed to find all the required dependencies.

@aaronjheng
Copy link
Contributor

I think we should call it "cursor-cli".

@AndrewBastin
Copy link

AndrewBastin commented Aug 9, 2025

I also kinda agree with @aaronjheng, I think it should be called cursor-cli since that is the public name of the application.

Kinda sucks that they have like 2 different names that they mix around 😅

Also @sudosubin can I raise a PR on your repo to add myself as a maintainer for this package ?

@sudosubin
Copy link
Member Author

Yes, that's correct. The public name of the package should be cursor-cli, and the mainProgram used internally should be cursor-agent. I'll update this pull request.

@sudosubin
Copy link
Member Author

Also @sudosubin can I raise a PR on your repo to add myself as a maintainer for this package ?

@AndrewBastin Of course! You're always welcome.

@sudosubin sudosubin changed the title cursor-agent: init at 2025.08.08-f57cb59 cursor-cli: init at 2025.08.08-f57cb59 Aug 9, 2025
@gshpychka
Copy link
Contributor

gshpychka commented Aug 9, 2025

> cursor-agent --version
2025.08.08-f57cb59

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 432035
Commit: ab284a560ed5c59b402b132c3275e314ff5cddb6


x86_64-linux

✅ 1 package built:
  • cursor-cli

aarch64-linux

✅ 1 package built:
  • cursor-cli

aarch64-darwin

✅ 1 package built:
  • cursor-cli

Copy link
Contributor

@SigmaSquadron SigmaSquadron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am concerned that we are normalising packaging beta-quality leaf software in Nixpkgs. Unless there's a really good reason why this should be urgently packaged, (i.e. it's one of those upstreams that will never declare their software stable) we should wait until the developers state their software is considered ready for general consumption.

@nixpkgs-ci nixpkgs-ci bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Aug 10, 2025
@SigmaSquadron
Copy link
Contributor

Please squash the commits. We don't use fix/chore/feat commit nomenclature in Nixpkgs.

@sudosubin sudosubin force-pushed the init-cursor-agent branch 2 times, most recently from 4e02dc1 to 6fd196d Compare August 11, 2025 12:40
@sudosubin sudosubin changed the title cursor-cli: init at 2025.08.08-f57cb59 cursor-cli: init at 0-unstable-2025-08-09 Aug 11, 2025
@kylemanna
Copy link

Tested out 6fd196d and it works for me, thanks for packaging!

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
@fazo96
Copy link
Contributor

fazo96 commented Aug 16, 2025

Tested 1f0214d and working on linux 64 bit. There is a new update that was released yesterday though

Comment on lines +10 to +14
version="0-unstable-$timestamp"
else
version="$release"
fi

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version="0-unstable-$timestamp"
else
version="$release"
fi
latestVersion="0-unstable-$timestamp"
else
latestVersion="$release"
fi
currentVersion=$(nix eval --raw -f . cursor-cli.version)
echo "latest version: $latestVersion"
echo "current version: $currentVersion"
if [[ "$latestVersion" == "$currentVersion" ]]; then
echo "package is up-to-date"
exit 0
fi

should check if updates are needed first before pre-fetching

Comment on lines +19 to +21
source=$(nix-prefetch-url "$url" --name "cursor-cli-$version")
hash=$(nix-hash --to-sri --type sha256 "$source")
update-source-version cursor-cli "$version" "$hash" "$url" --system="$platform" --source-key="sources.$platform"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
source=$(nix-prefetch-url "$url" --name "cursor-cli-$version")
hash=$(nix-hash --to-sri --type sha256 "$source")
update-source-version cursor-cli "$version" "$hash" "$url" --system="$platform" --source-key="sources.$platform"
source=$(nix-prefetch-url "$url" --name "cursor-cli-$latestVersion")
hash=$(nix-hash --to-sri --type sha256 "$source")
update-source-version cursor-cli "$latestVersion" "$hash" "$url" --system="$platform" --source-key="sources.$platform" --ignore-same-version

you need --ignore-same-version, otherwise only the first platform gets updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants