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

XcodeGen #208816

Closed
sempruijs opened this issue Jan 2, 2023 · 11 comments · Fixed by #367199
Closed

XcodeGen #208816

sempruijs opened this issue Jan 2, 2023 · 11 comments · Fixed by #367199
Labels
0.kind: packaging request Request for a new package to be added

Comments

@sempruijs
Copy link

Project description
describe the project a little

XcodeGen is a command line tool written in Swift that generates your Xcode project using your folder structure and a project spec.

Metadata

@sempruijs sempruijs added the 0.kind: packaging request Request for a new package to be added label Jan 2, 2023
@Endle
Copy link
Contributor

Endle commented Dec 11, 2023

I'm trying to pack it, but I'm stuck right now. I'll ask in the Matrix channel https://github.com/Endle/nixpkgs/blob/xcodegen/pkgs/by-name/xc/xcodegen/package.nix

@Endle
Copy link
Contributor

Endle commented Dec 13, 2023

Finally, after some hacks my nix file could produce a binary: https://github.com/Endle/nixpkgs/blob/xcodegen/pkgs/by-name/xc/xcodegen/package.nix

Can you have a test?

@Endle
Copy link
Contributor

Endle commented Dec 13, 2023

Endle added a commit to Endle/nur-packages that referenced this issue Dec 18, 2023
@Endle
Copy link
Contributor

Endle commented Dec 18, 2023

I've pushed my nix build to NUR: https://github.com/Endle/nur-packages/tree/master/pkgs/xcodegen

@ehllie
Copy link
Contributor

ehllie commented Feb 27, 2024

I've pushed my nix build to NUR: https://github.com/Endle/nur-packages/tree/master/pkgs/xcodegen

Why not publish it directly to nixpkgs? That package looks up to nixpkgs standards to me.

@Endle
Copy link
Contributor

Endle commented Feb 28, 2024

Why not publish it directly to nixpkgs? That package looks up to nixpkgs standards to me.

I'd like to push it to nixpkgs, however, there are some concerns.

  1. I don't write swift, and I don't know if my build file produces correct binary
  2. If this build is broken, I will have no chance to notice it and fix it.
  3. Because of 1 and 2, I don't have the ability and the motivation for the commitment to be a long time maintainer for xcodegen.

So if anyone wants to push this to nixpkgs, I'd like to cooperate with them, but I can't do it on my own.

@squirmy
Copy link

squirmy commented Apr 1, 2024

Hey @Endle , I gave this a shot today but ran into a couple of issues:

  1. Your flake doesn't support aarch64-darwin
  2. Once I enabled support for it, I ran into this issue: Build failure: swift for aarch64 #295322

Another thing I noticed that other swift derivations:

  1. Use swift and swiftpm as nativeBuildInputs
  2. Use swiftpm2nix to create a nix file for the deps.

More information on this can be found here.

I was going to make some updates, but the issue i mentioned above with Swift is getting in my way on arm. I also don't have Swift experience, but In the future I'd be happy to test it out on ARM if you've not got access to that.

@Endle
Copy link
Contributor

Endle commented Apr 1, 2024

Hi @squirmy , thank you so much for sharing these information for me.

Your flake doesn't support aarch64-darwin
but In the future I'd be happy to test it out on ARM if you've not got access to that.

Well that's a bit interesting to me, because the only mac I have is on M2, and I have no access to x86 macs :) I assume that declaring platforms = platforms.darwin; at https://github.com/Endle/nur-packages/blob/master/pkgs/xcodegen/default.nix#L59C5-L59C34 should make it work for both aarch64 and x86_64? Please let me know if I'm wrong.

Use swift and swiftpm as nativeBuildInputs
Thank you again for sharing it. It is very helpful to me. Would you like to

  1. Copy the code from https://github.com/Endle/nur-packages/blob/master/pkgs/xcodegen/default.nix to your own NUR, or
  2. Make a PR to it, or
  3. Wait for me to edit my nix file

@squirmy
Copy link

squirmy commented Apr 2, 2024

Well that's a bit interesting to me, because the only mac I have is on M2, and I have no access to x86 macs :)

Ah! Then we must be consuming your flake differently!

Your flake.nix doesn't include aarch64-darwin so when I try to reference the packages for this system by inputs.endle-nur.packages.aarch64-darwin they don't exist.

I did clone your repo and try it locally with the intent of submitting a PR but I ran into the above issue with the swift build failure. I'll come back and look at this again when that's sorted. There's no hurry :)

@Endle
Copy link
Contributor

Endle commented Apr 2, 2024

Your flake.nix doesn't include aarch64-darwin so when I try to reference the packages for this system by inputs.endle-nur.packages.aarch64-darwin they don't exist.

Thank you so much for catching it! I didn't know that the list of platforms can be configured in flake.nix before your words.

I ran into the above issue with the swift build failure

I guess that the swift build failure would block xcodegen. Thank you for sharing it.

@Samasaur1
Copy link
Member

The Swift issues have (mostly) been resolved for now, so I took a shot at this and opened a PR (#367199) adding it to nixpkgs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: packaging request Request for a new package to be added
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants