-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
cursor -> add platforms #373494
Conversation
@sarahec I've made changes here. |
So, I just tried to
|
Once you push a commit, you can't append to it. So what you do is use 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 |
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: P.S. Since these are all function bodies, they're lazily evaluated. |
Looks like my aarch64-linux hashes and appImage link were correct. Hooray! |
$ 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? |
My PR was merged (#373536) and your maintainers entry was merged (#373489), so we can build on them! Bring your branch up to dategit checkout master
git fetch upstream master
git checkout cursor-add-platforms
git rebase master You will get some merge conflicts in this file. You'll fix them as we reorganize the file. Integrate your changes
darwinInstallPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r *.app $out/Applications/
runHook postInstall
'';
|
@bet4it This PR isn't ready yet. If you have a current copy of nixpkgs checked out, you can cd into it and run Otherwise, watch https://nixpk.gs/pr-tracker.html?pr=373536 and you can use the package once it reaches the P.S. Did you file a bug on the startup issue you saw? I need the information to figure out if the bug is in the packaging (nixpkgs) or whether it has to be fixed by cursor themselves. |
038c4f0
to
df6d510
Compare
Okay, looks like I've done it or done something. @sarahec can you check and see if any of what I did looks ok? |
I need you to merge the two commits:
Then After that, it's time to update the long commit message at the top of this page:
Added Darwin x86/aarch664 to sources
Added corresponding build and install functions
Added Darwin downloads to update script
Added self to maintainers and remember to save it. (There will be a save button below the long text box). Finally, click the circular arrows next to my username under Reviewers. That re-requests a review. While you're doing that, I'll test the update script. |
I'm still testing and making changes to the update script. The spaces/%20 in the mac URLs are causing problems. I'll get it sorted out. P.S. I keep running into one problem with the Darwin URLs. I'm going to take a fresh look at it in the morning. (I think |
54ed001
to
7b09f59
Compare
7b09f59
to
b99ce58
Compare
Wait I think I fixed it. Sorry. This is a wild ride for me. First time trying to git with any other project. Literally a noob right now but its ok |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out we should be using buildPlatform
I discovered it wouldn't build on any platform and traced it down to the incorrect Importing Also fixed a couple of stylistic nits. |
I can't merge the commits atm but it's committed (from phone). Hope it works :) can you check again? @sarahec |
ddc9cfb
to
005033a
Compare
Whoops looks like we broke it again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$badword. I gave you a bad suggestion. Here's a replacement.
Looks like I gotta format it again. |
Ugh. Looks like we may need to rearrange files a fair bit to make this work. Would you be willing to add me as an editor to your What needs to change:
I wish I had thought of this earlier! A search through nixpkgs shows this is how others do it. |
I have good news and bad news. The good news: it works, it's clean, and it's easy to read and modify. The bad news: it's now four files (package.nix, update.sh, linux.nix, darwin.nix) and since I made some big changes I'll want to pull in another reviewer or two. P.S. Would it be easier if I submitted this as a new PR and credited you? package.nix
update.shNeeds the executable bit set:
linux.nix
darwin.nix
|
2152286
to
063f04b
Compare
formatted nixfmt cursor -> add darwin, modify update script, add maintainer formatted nixfmt Update pkgs/by-name/co/code-cursor/package.nix Co-authored-by: Sarah Clark <[email protected]> Update pkgs/by-name/co/code-cursor/package.nix Co-authored-by: Sarah Clark <[email protected]> Update pkgs/by-name/co/code-cursor/package.nix Co-authored-by: Sarah Clark <[email protected]> Update pkgs/by-name/co/code-cursor/package.nix I missed that, thanks Co-authored-by: Sarah Clark <[email protected]> add myself as a maintainer modify update script. fix src = source; cursor -> add darwin, modify update script, add maintainer formatted nixfmt cursor -> add darwin, modify update script, add maintainer formatted nixfmt Update pkgs/by-name/co/code-cursor/package.nix Co-authored-by: Sarah Clark <[email protected]> Update pkgs/by-name/co/code-cursor/package.nix Co-authored-by: Sarah Clark <[email protected]> Update pkgs/by-name/co/code-cursor/package.nix Co-authored-by: Sarah Clark <[email protected]> Update pkgs/by-name/co/code-cursor/package.nix I missed that, thanks Co-authored-by: Sarah Clark <[email protected]> add myself as a maintainer modify update script. fix src = source; tidying up the code Co-authored-by: Sarah Clark <[email protected]> set back to src instead of source Co-authored-by: Sarah Clark <[email protected]> tell it we don't need a build phase Co-authored-by: Sarah Clark <[email protected]> use singular form lib.optional and fix spelling Co-authored-by: Sarah Clark <[email protected]> inherit src Co-authored-by: Sarah Clark <[email protected]> Update pkgs/by-name/co/code-cursor/package.nix Co-authored-by: Sarah Clark <[email protected]> Update pkgs/by-name/co/code-cursor/package.nix Co-authored-by: Sarah Clark <[email protected]> Update pkgs/by-name/co/code-cursor/package.nix Co-authored-by: Sarah Clark <[email protected]> Update package.nix Co-authored-by: Sarah Clark <[email protected]> again, format
063f04b
to
794bcfa
Compare
@sarahec I've set you as collaborator on my fork. |
if that works for you that's fine too? |
I've opened a new PR as I still couldn't push into your fork. (Sorry. I'm making sure you get credit for your work.) Superseded by #374944 |
Supercedes #371208
Supercedes #371260
Things done
Added Darwin x86/aarch64 to sources
Added corresponding build and install functions
Added Darwin downloads to update script
Added self to maintainers
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.