-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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/stub-ld: init module #269551
nixos/stub-ld: init module #269551
Conversation
Should the message be shorter, with a link to a more in-depth discussion online, perhaps in the nixos manual? Should I mention nix-autobahn and/or nix-alien? |
Not sure, are these common tools one would use? (As in: Is the tool known and used by many or is it just "one of many tools available") One sentence saying something about these tools being available might be good.
I would move parts about packaging to the manual and just link to a new section in the manual. And from that section link to the relevant parts of packaging. Since packaging is usually more complicated then "just run this".
|
55e4e52
to
a6d85be
Compare
a6d85be
to
d147492
Compare
Hmm, should I add a new section to the nixpkgs manual? Or perhaps just link to https://nix.dev/tutorials/packaging-existing-software? |
I honestly don't feel like the manuals are quite the right place for this to exist. It's more introductory content than reference content. It needs to be somewhere, though. Right now, afaik, there just isn't a resource which clearly lays out the options one has when trying to run software on nixos that isn't in nixpkgs. @NixOS/documentation-team may want to weigh in here. Where should this live? |
@Mic92 As the maintainer of |
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.
This is indeed a good topic for a guide on nix.dev. Probably doesn't need to be much more than that if there is reference documentation one can link to.
It's not really NixOS specific, and only needs a note on NixOS with links to the relevant options.
d147492
to
080883a
Compare
080883a
to
f06114e
Compare
5ccd10c
to
f4505b8
Compare
For $reasons I'm setting this stuff up in activation scripts on work machines, and trying to fit that back into derivations is going to be messy. Frankly I just don't have the time or motivation for these kinds of changes at the moment, so I'm reverting my nixpkgs for now. For what it's worth, disabling this via I understand the motivation behind this and it's of course a good idea to make an easy declarative setup available for simple use-cases, but - as is my usual criticism - things like this should always provide an escape hatch. |
The simplest solution would probably be to disable |
This seems to work fine: { lib, modulesPath, ... }:
{
disabledModules = [ (modulesPath + "/config/ldso.nix") ];
options.environment.ldso = lib.mkOption { type = lib.types.unspecified; };
options.environment.ldso32 = lib.mkOption { type = lib.types.unspecified; };
} |
Work around issues caused by NixOS/nixpkgs#269551
Create the default overlay manually as NixOS/nixpkgs#269551 seems to have caused some issues with easyOverlay where it's trying to touch an i686 package when that system is not in the listed systems.
Create the default overlay manually as NixOS/nixpkgs#269551 seems to have caused some issues with easyOverlay where it's trying to touch an i686 package when that system is not in the listed systems.
I must unfortunately say that the assumption that there exists a working 32bit variant of the package set for 64-bit x86 systems is inaccurate. |
There is. |
That still evaluates pkgsi686Linux via libDir32 in the tmpfiles rules. |
Ugh. I'm not sure it's feasible to make that option such that the module cleans up after itself when the option is changed. How about this:
|
Oh! Here's another idea: switch the module to using |
Or, generalize the for reference:
|
It feels like the design is still being fleshed out. Given how core the change is, that it's blocking many users, and that it has been two months, we should consider reverting. Not permanently, but that way, you have time to figure this out while also not blocking other users. |
Remove the `environment.ldso32` option until it can be better thought out. The option creates a new instance of nixpkgs and doesn't work on all architectures. Fixes: error: i686 Linux package set can only be used with the x86 family.
This feature was introduced in NixOS/nixpkgs#269551 and is mostly useful for servers. Saves around 80MiB of evaluation on x86_64 due to the extra i686 nixpkgs instance.
Follow-up to NixOS#269551 Avoid creating a new instance of nixpkgs to access two variables. `pkgs.pkgsi686Linux` was being accessed whenever the feature is being used or not. A second instance of nixpkgs is being created in `nixos/modules/config/stub-ld.nix` and can be disabled by setting `environment.ldso32 = null` or `environment.stub-ld.enable = false`. Both combined fixes this error: error: attribute 'i686-linux' missing
This feature was introduced in NixOS/nixpkgs#269551 and is mostly useful for servers. Saves around 80MiB of evaluation on x86_64 due to the extra i686 nixpkgs instance.
This feature was introduced in NixOS/nixpkgs#269551 and is mostly useful for servers. Saves around 80MiB of evaluation on x86_64 due to the extra i686 nixpkgs instance.
Follow-up to #269551 Avoid creating a new instance of nixpkgs to access two variables. `pkgs.pkgsi686Linux` was being accessed whenever the feature is being used or not. A second instance of nixpkgs is being created in `nixos/modules/config/stub-ld.nix` and can be disabled by setting `environment.ldso32 = null` or `environment.stub-ld.enable = false`. Both combined fixes this error: error: attribute 'i686-linux' missing
This feature was introduced in NixOS/nixpkgs#269551 and is mostly useful for servers. Saves around 80MiB of evaluation on x86_64 due to the extra i686 nixpkgs instance.
Follow-up to NixOS#269551 Avoid creating a new instance of nixpkgs to access two variables. `pkgs.pkgsi686Linux` was being accessed whenever the feature is being used or not. A second instance of nixpkgs is being created in `nixos/modules/config/stub-ld.nix` and can be disabled by setting `environment.ldso32 = null` or `environment.stub-ld.enable = false`. Both combined fixes this error: error: attribute 'i686-linux' missing
Description of changes
Adds a new nixos option, enabled by default, which installs a stub ELF loader in the default FHS location. This stub simply prints out an informative error message when invoked, giving new users better feedback when they attempt to use binaries not compiled for nixos.
Closes #208187.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Priorities
Add a 👍 reaction to pull requests you find important.