-
Notifications
You must be signed in to change notification settings - Fork 171
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
Nixpkgs build: Did not recognize UNIX operating system! #5657
Comments
Im not familiar with NIX but I can try to help out. Some questions:
Do you mean to force CMAKE to build for a different system than it is defaulting to? In which you might want to look at cmake's docs on it. Although Im not sure it's a good idea. Why do you need to overwrite the OS? Does NIX not have a built in mechanism for this? Since different OSes would need to package binaries differently.
What specifics are you talking about? CMAKE uses the OS to change a lot of behavior since Windows, Linux and Mac all do things fairly differently. |
Hey!
I am talking about this part here. It checks for the contacts of
For Nix, you get the correct compiled packages from the resolver, so I do not have to take care of what gcc or cmake is being used. I can change my dependencies or other things depending on the system type ( |
What exactly do you mean that it's "not allowed"? theoretically, you should be able to add some code to that function that does another check to see if the OS is Nix |
While the package is being built/compiled, it is "put" in a sandbox. It is unaware of its surroundings, so it can not depend on files outside of the sandbox. You can guide the process with certain variables, like if some additional dependencies should be included for a system type or an architecture, but that is about it. Long story short, it would be nice to have a flag which would overwrite this part here: ISIS3/isis/cmake/Utilities.cmake Lines 90 to 185 in 437e334
and assign the final value of get_os_version to the flags input.If it isn't provided, the usual checks would still come into play. |
I guess my point is in my last message is that if you have unique knowledge on how to get the package built for nixpkgs, why not contribute the change yourself? Mostly likely a simple enough change. You would be more suited to make that contribution. Also, unless someone else says otherwise, this isn't a priority for this project right now. |
Description
Since we had some problems with conda here and there at work, I took it upon myself to package ISIS using Nix. At the beginning I had the problem, that it did not recognize my system, due to packages being build inside a sandbox. This is because the builds need to be reproducable and should not depend on outside factors. I was able to bypass this by running the build command with the
--option sandbox false
flag and sudo. I was wondering if it would be possible to provide a cmake flag with the OS type, instead of letting the script figure it out. Or in other words: if the flag isn't set, let the script figure it out, but if is, then take that value.I also didn't understand quote well why some specifics of the system are needed in that regard. Can someone elaborate on it?
Example
Maybe check for
CMAKE_SYSTEM_VERSION
beforehand and give examples on how the string should look like.On another note, if someone wants, they can try out my build using the
nix
command:The text was updated successfully, but these errors were encountered: