Packaging Theos for NixOS #631
Replies: 2 comments
-
Thanks for posting this! I figured I’d move it from an issue to a discussion for the moment. If we decide to come up with something official/permanent, we can make new issues for that. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for this derivation. I have updated it to the latest version of Theos as well as changed from SDK 14.4 to 14.5 as 14.4 is no longer in the Also, I came up with a solution for the There are two versions of this module, one which retains the With Both work correctly, but since Thanks again! |
Beta Was this translation helpful? Give feedback.
-
I've sort-of managed to get Theos packaged using nix. This is a super hacky solution, but it shows some of what needs to be changed in order for a proper packing with Nix: Specifically:
/bin/bash
or/usr/bin/perl
need to be changed to the more flexible/usr/bin/env bash
and/usr/bin/env perl
.toolchain/linux/iphone/bin/ld
needs to be modified so it doesn't completely overwriteLD_LIBRARY_PATH
, as NixOS does not have/lib
(Not sure exactly what this entails).This solution is too incomplete to be put in the wiki. I also only use a very small portion of Theos, so I'm sure there are other uses of Theos that this
.nix
file wouldn't support, but probably could with some modifications.Here is my theos.nix.
This
theos.nix
installs the swift toolchain and exclusively the 14.4 iOS SDK, which may not be specifically what you're looking for, so modify it to suit your needs. Thistheos.nix
also makesnic.pl
accessible viatheos-nic
on thePATH
, but I have not tested it. What I have tested is being able to do something likeTHEOS=/nix/store/zq2vffjnmb7zlx0811a11ijv1vzcxp5d-theos/share/theos make package install
, where I build and install a swift iOS app, specifically this iOS app to an iPhone. This is good confirmation that the ad hoc elf patching in the nix script is thorough enough for other Theos projects.Obviously feel free to reopen this issue if Nix(OS) packaging is of interest.
P.S. Thank you Theos devs for the awesome work.
Beta Was this translation helpful? Give feedback.
All reactions