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

appimagekit: init at 20180727 #44520

Merged
merged 1 commit into from Aug 6, 2018
Merged

Conversation

oxij
Copy link
Member

@oxij oxij commented Aug 5, 2018

Motivation for this change

@matthewbauer mentioned in https://github.com/matthewbauer/nix-bundle/blob/master/appimagetool.nix that he couldn't build it via nix, I thought I'd give it a try myself. Took quite some work, indeed.

Things done
  • It builds.
  • But I have not tested that the runtime works outside of NixOS, it's likely to need some more patching.

But I feel it's better to contribute this now, as opposed to fermenting this patch in my local branch till I feel like continuing this.

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: appimagekit

Partial log (click to expand)

'./util.h' -> '/nix/store/f6sqy0v4fynkgy2zi2zw1pv4f9bfrjsf-squashfuse-20161009/include/util.h'
'./xattr.h' -> '/nix/store/f6sqy0v4fynkgy2zi2zw1pv4f9bfrjsf-squashfuse-20161009/include/xattr.h'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/f6sqy0v4fynkgy2zi2zw1pv4f9bfrjsf-squashfuse-20161009
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/f6sqy0v4fynkgy2zi2zw1pv4f9bfrjsf-squashfuse-20161009/lib
patching script interpreter paths in /nix/store/f6sqy0v4fynkgy2zi2zw1pv4f9bfrjsf-squashfuse-20161009
checking for references to /build in /nix/store/f6sqy0v4fynkgy2zi2zw1pv4f9bfrjsf-squashfuse-20161009...
cannot build derivation '/nix/store/j2p8fa11v14vmzsknhyji0sb8zi9sfhn-appimagekit-20180727.drv': 1 dependencies couldn't be built
error: build of '/nix/store/j2p8fa11v14vmzsknhyji0sb8zi9sfhn-appimagekit-20180727.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: appimagekit

Partial log (click to expand)

shrinking /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/bin/digest
shrinking /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/bin/appimagetool
shrinking /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/bin/AppRun
shrinking /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/lib/libappimage.so
shrinking /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/lib/appimagekit/runtime
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/lib  /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/bin
patching script interpreter paths in /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727
checking for references to /build in /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727...
/nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727

@oxij
Copy link
Member Author

oxij commented Aug 6, 2018 via email

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: appimagekit

Partial log (click to expand)

shrinking /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/bin/digest
shrinking /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/bin/appimagetool
shrinking /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/bin/AppRun
shrinking /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/lib/libappimage.so
shrinking /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/lib/appimagekit/runtime
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/lib  /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727/bin
patching script interpreter paths in /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727
checking for references to /build in /nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727...
/nix/store/m9hl0m1da28bhpj2g3dp7xar8dhcbmx2-appimagekit-20180727

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: appimagekit

Partial log (click to expand)

[ 15%] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/TargetRegisterInfo.cpp.o
[ 15%] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/TargetSchedule.cpp.o
[ 15%] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/TargetSubtargetInfo.cpp.o
[ 15%] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/TwoAddressInstructionPass.cpp.o
building of '/nix/store/vff81n3cngba2ff4h19x0m77rb8ad276-llvm-6.0.1.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/q0gpscjwykqmra28r3zk05y57jlvh4mn-mesa-noglu-18.1.4.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/8yjsqaqr21zlhc1d3hw5v8762xba1gd9-libGL-1.0.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/710vqvygw8six7aw8sbla2ap2c44mxbx-cairo-1.15.12.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/j2p8fa11v14vmzsknhyji0sb8zi9sfhn-appimagekit-20180727.drv': 1 dependencies couldn't be built
error: build of '/nix/store/j2p8fa11v14vmzsknhyji0sb8zi9sfhn-appimagekit-20180727.drv' failed

@oxij
Copy link
Member Author

oxij commented Aug 6, 2018 via email

@matthewbauer
Copy link
Member

Thanks! I will definitely make use of this in nix-bundle.

@matthewbauer matthewbauer merged commit 0590b31 into NixOS:master Aug 6, 2018
@oxij
Copy link
Member Author

oxij commented Aug 6, 2018

@matthewbauer

TBH, after playing with nix-bundle (it's pretty awesome, thanks for making it) I think that it should be slurped into nixpkgs.

Like wouldn't it be awesome if one could just do nix-build ./default.nix pkgsAppImage.emacs (or whatever else) and distribute the result. With nix-bundle integrated into nixpkgs the answer to the general question of "What is the most simple way to turn my app into AppImage on any distro?" would be "Install nix, package your app for nixpkgs." That would work for cross-compilation too almost automagically, which is very hard to do with other tools I'm aware of. And it would also solve the problem of nix installer for non-NixOS not working on distros with different libcs (which was my motivation in making this; it's easy to forget that other things exist when using nix, but I was recently reminded that they do, and my first idea was to just install nix there, but it failed :( so I played with nix-bundle till I hacked something that worked good enough, the whole thing would've been much better if nix was distributed as a self-sufficient bundle).

@matthewbauer
Copy link
Member

Like wouldn't it be awesome if one could just do nix-build ./default.nix pkgsAppImage.emacs (or whatever else) and distribute the result. With nix-bundle integrated into nixpkgs the answer to the general question of "What is the most simple way to turn my app into AppImage on any distro?" would be "Install nix, package your app for nixpkgs."

I think this is definitely an option in the future. The main issue is how slow startup times are. Even small things take up to a second to start up. But I definitely think we can get the times down if we switch

That would work for cross-compilation too almost automagically, which is very hard to do with other tools I'm aware of. And it would also solve the problem of nix installer for non-NixOS not working on distros with different libcs (which was my motivation in making this; it's easy to forget that other things exist when using nix, but I was recently reminded that they do, and my first idea was to just install nix there, but it failed :(

We would have trouble putting the Nix installer in nix-bundle - the chroot will prevent it from working I think. I think the more cross-platform alternative to nix-bundle for these use cases is just to link everything statically.

so I played with nix-bundle till I hacked something that worked good enough, the whole thing would've been much better if nix was distributed as a self-sufficient bundle).

I actually provide a single executable Nix at https://matthewbauer.us/nix. I use it a lot in places where I don't have sudo. You can build it yourself with this pr: matthewbauer/nix-bundle#35.

@oxij
Copy link
Member Author

oxij commented Aug 6, 2018 via email

@oxij oxij deleted the pkg/appimagekit branch November 18, 2018 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants