-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
NixOS Packaging #1716
Comments
As an aside, Setting HOME in the script does nothing; presumably it looks up the homedir some other way. |
Would #1699 solve the first and/or third feature requests? |
It would, if I can set the location without using the GUI. It can't simply be a location relative to home, as home is /var/empty and unwriteable. A flag would be ideal. (CKAN appears to have no flags whatsoever at the moment, but I'm imagining something like "--store-path=/foo/wherever". One potential snag is that I'd also need the ability to concatenate stores, which is trivial if they're just directories with tarballs, but difficult if there's a registry.) The reason for #2 is that Nix is somewhat opinionated. I'll be storing mods in "derivations", which are named by hash of the configuration and code which creates them, so it'd be very hard to avoid downloading some mods multiple times unless I can store them individually. |
There is a |
Could your script for creating a Steam+KSP install make a symlink from a world-writeable folder to SteamLibrary/steamapps/common/KerbalSpace Program/CKAN/downloads? That would share your downloads across KSP installs, and is basically how most people running mutiple installs are doing it now. |
Unfortunately, no. Nix operates at a system-wide level, so I can't access the homedir of any particular user while building packages, not even the user who requested the build. |
It might be best if I bypass CKAN for the initial build, read the manifests with custom code, and then only use the ckan binary itself to do the final install. I'd still need some way of telling it where to find the files it's installing, though. |
Can you take the KSP from Steam and built a package for it that doesn't involve Steam? There are no access controls on KSP |
I don't understand how any operating system can exist that doesn't allow a file location to be set up as world-writable. |
The location might not even exist. It's entirely legit for an admin to request KSP be installed system-wide, and common even if it's a single-user system, plus if the same setup is requested by two distinct users it will provide the same package without rebuilding. Can't have one user's installation depend on another's. The workflow I'm envisioning looks like this:
KSP versions will be disambiguated by hash, as is protocol. That's all the manual work that should be required. At this point, it's up to whatever configuration the user has supplied. Something like this:
Which will create a Behind the scenes, the build script will:
Does that explain it a little? This all needs to be submitted to https://github.com/NixOS/nixpkgs/ in the end, and I don't think they'll accept anything overly hacky. :) |
No, I don't think I'm getting the milieu you're working in. |
After a bit of thought, I think it's almost definitely better if I clone ckan (the binary) rather than attempt to shoehorn my approach into the current one. Thanks anyway! |
Hi,
(This'll be a slightly longwinded feature request. Skip to the bottom if you prefer.)
I (very) recently packaged CKAN for NixOS. Well, practically that's still in progress; see NixOS/nixpkgs#15278.
That works. It autodetects the Steam-homed KSP installation, installs mods correctly, and so on. Don't know how I'd live without it. :)
However, like many players I'd like to maintain multiple KSP installs. Unlike most players, I can't do so without packaging KSP for NixOS, to some level or another. Steam uses a chroot that makes the distro looks like Ubuntu, but running KSP outside of Steam is otherwise not going to work at all; /lib and /usr don't even exist, let alone contain the libraries it expects.
So I need to fix that, and while I'm at it I'm going to add a kspWithMods package constructor. That will make it much easier for me to handle disparate installations, plus by the nature of things, the KSP directory is supposed to be read-only... save, I suppose for savegames. Time will tell how possible that is.
I don't actually need anything from you, emphasis on 'need'. I can make the package build script run
ckan install
without that being a problem. Unfortunately, doing so will make every rebuild re-download every mod, which is not exactly ideal; package builds always happen in a clean workspace, so CKAN's native caching cannot work.Therefore, I'd like to request three features:
ckan download
command that just downloads some mod, not including its dependencies, and drops it in CWD.ckan show
which outputs the dependencies in machine-readable format. JSON is fine. Alternately, I guess I can try to parse the manifests myself. I'd offer to send a PR, but I've never touched C# before. :xckan install
which looks for files downloaded to CWD before re-downloading. Well, basically a flag to select the cache directory would be fine.The basic idea being that, if a user requests four separate mods, I can construct packages for each of those four mods such that the Nix store will cache them, before installing them all in to KSP install being built.
The text was updated successfully, but these errors were encountered: