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
swiftformat: init at 0.44.0 #67226
swiftformat: init at 0.44.0 #67226
Conversation
@GrahamcOfBorg build swiftformat |
Ofborg fails with:
On my mac mini, I get:
|
@mmahut Darn, maybe this is even more fragile than I had expected. I’m curious: are you able to build the |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/request-for-help-packaging-an-xcode-based-program/3828/1 |
As mentioned on Discourse, the MacVim trick won't work in the sandbox. |
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.
build currently fails in sandbox?
The build relies on Xcode, so yes, it will fail in the sandbox. @bdesham You can set |
You may also want to consider borrowing macvim's |
@lilyball Thanks for the suggestions! I had assumed that a PR for an impurely-built app would be rejected out of hand, but if not, then maybe this one has a chance. I’ve force-pushed a new version that steals even more from the MacVim derivation and I updated to SwiftFormat 0.44.0 while I was at it. |
Thank you all for helping this out. Sorry currently I am unable to give any
help on this PR.
…On Sat, 25 Jan 2020 at 14:07, Benjamin Esham ***@***.***> wrote:
@lilyball <https://github.com/lilyball> Thanks for the suggestions! I had
assumed that a PR for an impurely-built app would be rejected out of hand,
but if not, then maybe this one has a chance. I’ve force-pushed a new
version that steals even more from the MacVim derivation and I updated to
SwiftFormat 0.44.0 while I was at it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#67226?email_source=notifications&email_token=AAL6SO3ZUU5C3FDTDAJ3QJLQ7OUF5A5CNFSM4IOP3H42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ4T3SY#issuecomment-578371019>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL6SO534G4W3FZ32X3BBPDQ7OUF5ANCNFSM4IOP3H4Q>
.
|
The PR title needs to be updated |
let | ||
buildSymlinks = runCommand "swiftformat-build-symlinks" {} '' | ||
mkdir -p $out/bin | ||
ln -s /usr/bin/xcodebuild $out/bin |
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.
Do we actually need this? You're not invoking some Makefile that references xcodebuild
or anything like that, you're just invoking xcodebuild
directly in buildPhase
, so I would imagine you could just invoke /usr/bin/xcodebuild
instead.
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.
Indeed you’re right. I’ve force-pushed a new commit that removes that.
This passes
|
Motivation for this change
SwiftFormat is a code formatting and linting tool for Swift. I requested a derivation for it in #67221; it turned out to be pretty easy to package, with the caveat that it impurely uses the user’s Xcode toolchain. I would welcome an approach that doesn’t require such a hack.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)