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

cursor -> add platforms #373494

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aspauldingcode
Copy link

Supercedes #371208
Supercedes #371260

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@aspauldingcode aspauldingcode marked this pull request as draft January 13, 2025 15:59
@aspauldingcode
Copy link
Author

@sarahec I've made changes here.

@aspauldingcode
Copy link
Author

Screenshot 2025-01-13 at 8 10 26 AM

So, I just tried to git commit --amend a previous commit so I could nixfmt the cursor package.nix and pass a formatting test there. But, I ran into it telling me that there were changed upstream that I needed to pull, so I pulled with rebase true. I don't even know if that's what I was supposed to do, but I did it anyway and it seems to be okay with git log master..cursor-add-platforms

  ~/nixpkgs  ⎇ cursor-add-platforms ≡  zsh  git log master..cursor-add-platforms

commit 59dabeb63027072a4fe3badaace58089a3c83c9b (HEAD -> cursor-add-platforms, origin/cursor-add-platforms)
Author: aspauldingcode <[email protected]>
Date:   Mon Jan 13 07:58:07 2025 -0800

    cursor -> add platforms

@sarahec sarahec added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jan 13, 2025
@sarahec
Copy link
Contributor

sarahec commented Jan 13, 2025

I just tried to git commit --amend a previous commit so I could nixfmt the cursor package.nix and pass a formatting test there.

Once you push a commit, you can't append to it. So what you do is use git rebase -i ~2 to see the pushed commit and your "fix it" commit, mark the top (latest) commit as fixup (squash, keep old description), and git push --force-with-lease.

If you look at the top of the PR, you'll see a tab labeled "Commits: 2". If you click on that tab, you'll see both of them listed. So follow the instructions in the previous paragraph to rebase, fixup, and force push so you only have one commit.

P.S. I'm planning to submit a PR today that includes your sources list and automatically updates all of the entries. Once it merges, you can rebase on top of it.

@sarahec
Copy link
Contributor

sarahec commented Jan 13, 2025

Let's wait for #373536 to be merged then we can update master and rebase your branch atop it.

In the meantime, take a look at what I've done. Instead of needing if/then/else in function bodies, you'll define your own functions for unpacking the dmg and installing it, then we'll assign with: installPhase = ${if stdenvNoCC.isDarwin then dmgInstall else appimageInstall}; and likewise for src.

P.S. Since these are all function bodies, they're lazily evaluated.

@aspauldingcode
Copy link
Author

Looks like my aarch64-linux hashes and appImage link were correct. Hooray!
I still haven't tested x86_64-darwin, but I'm pretty sure it's correct too.

@bet4it
Copy link

bet4it commented Jan 14, 2025

$ nix-build -E 'with import <nixpkgs> {}; callPackage ./package.nix {}'                                                                                       
this derivation will be built:
  /nix/store/zymm6w6y1f9h0f546ckzxvr1fzba2y9c-cursor-0.44.11.drv
building '/nix/store/zymm6w6y1f9h0f546ckzxvr1fzba2y9c-cursor-0.44.11.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/lg8xj14zdkgpydkkz9vbizb3gkvldqzi-cursor-0.44.11-build-250103fqxdt5u9z-arm64.AppImage
do not know how to unpack source archive /nix/store/lg8xj14zdkgpydkkz9vbizb3gkvldqzi-cursor-0.44.11-build-250103fqxdt5u9z-arm64.AppImage
error: builder for '/nix/store/zymm6w6y1f9h0f546ckzxvr1fzba2y9c-cursor-0.44.11.drv' failed with exit code 1

Why I get this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants