-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Misc fixups that may be of interest (don't merge as-is) #28
Conversation
|
Does this still have the issue with release.nix in #26 (comment) ? |
Not anymore, although TBH I'm not sure this is best-- not sure I follow what the expected workflow is here? So might be missing a dep on the source directory or something. |
These actually look mostly good to me. Ideally we could move the AppImage derivations into Nixpkgs so others could use it. Besides that though it's all helpful. If you can rebase and squash, I can definitely merge this |
Makefile
Outdated
install: nix-bundle.sh nix-run.sh appdir.nix appimagetool.nix appimage.nix AppRun.c appimage-top.nix default.nix appdir.sh nix2appimage.sh | ||
.PHONY: install | ||
|
||
install:: nix-bundle.sh nix-run.sh appdir.nix appimagetool.nix appimage.nix AppRun.c appimage-top.nix default.nix appdir.sh nix2appimage.sh |
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.
I'm confused what's going on here- but I think I've resolved this issue in dcbfa1a.
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.
Different approaches, I wasn't sure of how this was intended to be used so tried to be more careful about modifying things :).
I'll rebase+squash as requested, and drop this.
Note that hardcoded config strings "x86_64-unknown-linux-musl" means this won't work on non-x86_64 machines, not sure if nix-bundle (or even AppImage) are expected to work on other platforms anyway but just thought I'd draw your attention to it. Cleaned history a bit, but didn't fully squash if that's what you meant. Suit yourself if you'd like to do so as you merge (github has option for that I think?). |
Looks good! I just meant to get rid of the "revert" commit everything else is fine. I think it's okay to include the hardcoded localSystem.config but I think @Ericson2314 has a way to generate these in lib/systems/parse.nix. In the future, we might want to support multi-arch bundles (this should be possible in arx). |
What does the |
Musl should statically compile everything for us. You should only need musl at build time (which Nixpkgs will pull in for you). |
Also @dtzWill I am having issues getting Musl to bootstrap correctly:
I think it's related to a bad wildcard pattern (/nix/store/v0vw2xad4vxgp7kdfzczsy0xk15amliq-bootstrap-tools/lib/ld-musl-x86_64.so.1 exists). I can file a bug report if necessary. |
That's strange. Unfortunately I'm AFK for the day, file an issue if this is urgent or if you don't hear back from me within ~12 hours. Pattern looks right to me but... well we'll see. |
Unfortunately my initial attempts are reproducing, namely using a redirected store, fail early in the the first build.... but for both musl and glibc :(. And not during unpacking/patching of bootstrap tools, that succeeds, but the first build using them. What version of Nix are you using? I'll try in a docker container or something fresh in a bit.... sorry not sure why that'd be happening :(. |
It's Nix 2.0 but in a weird environment. No root access so running through a Proot. Shouldn't Muslpkgs be in the binary cache, though? Tried the same thing on my VM and got memory issues bootstrapping on gcc. |
Not yet in official binary caches, although they are for cross-compiling to musl :). There's some cleanup to be done to make this possible with I am somewhat surprised by this behavior (similarly that gcc bootstrap doesn't work?) since musl packages are available in my binary cache which you can use with something like:
I'm investigating this currently. Strangely bootstrap seems to work better on aarch64 ^_^. [1] NixOS/rfcs#23 |
@matthewbauer won't be available in anyone's cache but can you check if using https://github.com/dtzWill/nixpkgs/tree/musl-native-bootstrap fixes the problem you're seeing when unpacking the tools? Something like:
(or same Using this fixed a similar--different but hopefully not too much so-- problem that caused problems bootstrapping musl from within a Docker container, so I'm hoping it helps in your proot case too. |
Still no luck- getting the same issue. I'm starting to think it's a local system issue. This is a university machine so the Nix store has to be put on an NFS drive and it sometimes breaks with big files. There could also be some issue with it being an older kernel:
I'll start up a VirtualBox machine to see if I can get things to work. |
As soon as the RFC is approved I'll get working on having Hydra at least cache the stdenv, sorry about this :). If you're on NixOS, the instructions under "Quickstart with Binary Cache" on the musl PR will configure your system to use the ALLVM binary cache as well, which will save you a bunch of building. I use it all the time, all builds on sandboxed nodes running NixOS... but make your own trust decisions 👍. |
Ok looks good! Finally got it to work. It's too bad we can't get it to run natively on NixOS but I suppose those are already available to us. Closure size of VLC is surprisingly bad:
I wonder if we can get shrink systemd or samba with multiple outputs? |
systemd seems pretty unhelpful for vlc offhand, but doubly so when bundled up? (note that "...systemd-237-lib" would be for libsystemd which has possibly utility, but it seems rather unlikely VLC will require systemd binaries ;)) Samba seems a bit rough too, would expect to only need lib outputs there too. Good news is closure size impacts everyone so this is something that can be taken to nixpkgs "upstream" and be useful to everyone to improve :). |
Builds on top of #26
With these, was able to do:
Don't have immediate access to a non-NixOS machine with a display server (and new-enough kernel/permissions to support appimage-ness), so haven't tested elsewhere.
LMK if any of this looks useful, or just cherry-pick as you see fit, just thought I'd share in case it helps.