-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
eiwd: init at 2.8-1 #208844
eiwd: init at 2.8-1 #208844
Conversation
Would be really great if this could make the release... |
Fixed merge conflict. |
eiwd is iwd, minus the dbus dependency. It consists of iwd, plus: - a bunch of `#ifdef HAVE_DBUS` lines added - name resolution defaults to resolvconf instead of systemd - inability to access /etc/resolv.conf is not a fatal error - ell is vendored as a submodule to ensure consistent versions That's it. You control eiwd with ordinary UNIX signals and by simply editing files in its state directory.
Moved into |
"out" "doc" | ||
] ++ lib.optionals enableManpages [ | ||
"man" | ||
] ++ lib.optionals finalAttrs.doCheck [ |
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.
] ++ lib.optionals finalAttrs.doCheck [ | |
] ++ lib.optionals finalAttrs.finalPackage.doCheck [ |
finalAttrs.finalPackage.doCheck
contains the logic in mkDerivation so setting doCheck here will be unnecessary
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.
Yeah but you can't reference finalPackage
in the definition of the package itself. It's infinite recursion.
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.
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.
Yeah but not for outputs
. mkDerivation
is extra-strict in those. Go ahead try your suggestion; you'll get this:
$ nix-instantiate . -A eiwd error: … while calling a functor (an attribute set with a '__functor' attribute)at /git/pr/eiwd/init/lib/customisation.nix:174:34: 173| 174| in if missingArgs == [] then makeOverridable f allArgs else abort error; | ^ 175| … while evaluating a branch condition at /git/pr/eiwd/init/lib/customisation.nix:86:7: 85| in 86| if builtins.isAttrs result then | ^ 87| result // { (stack trace truncated; use '--show-trace' to show the full trace) error: infinite recursion encountered at «none»:0: (source not available)
nix@moore:/git/pr/eiwd/init$ nix-instantiate . -A eiwd --show-trace
error:
… while calling '_internalCallByNamePackageFile'at /git/pr/eiwd/init/pkgs/top-level/by-name-overlay.nix:55:36: 54| # Because at that point the code in ./stage.nix can be changed to not allow definitions in `all-packages.nix` to override ones from `pkgs/by-name` anymore and throw an error if that happens instead. 55| _internalCallByNamePackageFile = file: self.callPackage file { }; | ^ 56| } … from call site at /git/pr/eiwd/init/pkgs/top-level/by-name-overlay.nix:55:42: 54| # Because at that point the code in ./stage.nix can be changed to not allow definitions in `all-packages.nix` to override ones from `pkgs/by-name` anymore and throw an error if that happens instead. 55| _internalCallByNamePackageFile = file: self.callPackage file { }; | ^ 56| } … while calling 'callPackageWith' at /git/pr/eiwd/init/lib/customisation.nix:123:35: 122| */ 123| callPackageWith = autoArgs: fn: args: | ^ 124| let … from call site at /git/pr/eiwd/init/lib/trivial.nix:430:7: 429| { # TODO: Should we add call-time "type" checking like built in? 430| __functor = self: f; | ^ 431| __functionArgs = args; … while calling anonymous lambda at /git/pr/eiwd/init/lib/customisation.nix:73:6: 72| makeOverridable = f: lib.setFunctionArgs 73| (origArgs: let | ^ 74| result = f origArgs; … from call site at /git/pr/eiwd/init/lib/customisation.nix:74:16: 73| (origArgs: let 74| result = f origArgs; | ^ 75| … while calling anonymous lambda at /git/pr/eiwd/init/pkgs/by-name/ei/eiwd/package.nix:1:1: 1| { lib | ^ 2| , stdenv … from call site at /git/pr/eiwd/init/pkgs/by-name/ei/eiwd/package.nix:12:1: 11| 12| stdenv.mkDerivation (finalAttrs: { | ^ 13| pname = "eiwd"; … while calling anonymous lambda at /git/pr/eiwd/init/pkgs/stdenv/generic/make-derivation.nix:548:3: 547| in 548| fnOrAttrs: | ^ 549| if builtins.isFunction fnOrAttrs … from call site at /git/pr/eiwd/init/pkgs/stdenv/generic/make-derivation.nix:550:10: 549| if builtins.isFunction fnOrAttrs 550| then makeDerivationExtensible fnOrAttrs | ^ 551| else makeDerivationExtensibleConst fnOrAttrs … while calling 'makeDerivationExtensible' at /git/pr/eiwd/init/pkgs/stdenv/generic/make-derivation.nix:14:30: 13| # Based off lib.makeExtensible, with modifications: 14| makeDerivationExtensible = rattrs: | ^ 15| let … from call site at /git/pr/eiwd/init/pkgs/stdenv/generic/make-derivation.nix:47:9: 46| finalPackage = 47| mkDerivationSimple overrideAttrs args; | ^ 48| … while calling 'mkDerivationSimple' at /git/pr/eiwd/init/pkgs/stdenv/generic/make-derivation.nix:81:1: 80| # Explanation about derivations in general 81| { | ^ 82| … from call site at /git/pr/eiwd/init/pkgs/stdenv/generic/make-derivation.nix:496:1: 495| 496| lib.extendDerivation | ^ 497| validity.handled … while calling 'extendDerivation' at /git/pr/eiwd/init/lib/customisation.nix:197:43: 196| the derivation itself and check a given condition when evaluating. */ 197| extendDerivation = condition: passthru: drv: | ^ 198| let … from call site at /git/pr/eiwd/init/pkgs/stdenv/generic/make-derivation.nix:545:4: 544| passthru) 545| (derivation (derivationArg // lib.optionalAttrs envIsExportable checkedEnv)); | ^ 546| … while calling anonymous lambda at /builtin/derivation.nix:5:1: (source not available) … from call site at /git/pr/eiwd/init/pkgs/by-name/ei/eiwd/package.nix:28:8: 27| "man" 28| ] ++ lib.optionals finalAttrs.finalPackage.doCheck [ | ^ 29| "test" … while calling 'optionals' at /git/pr/eiwd/init/lib/lists.nix:375:5: 374| # List to return if condition is true 375| elems: if cond then elems else []; | ^ 376| error: infinite recursion encountered at «none»:0: (source not available)
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.
I think outputs
is extra-strict because technically you could have insane things like
outputs = [ "doCheck" ];
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.
In other words, finalAttrs.finalPackage
is strict in outputs
, because the attrnames of outputs
become attrnames of finalPackage
, and Nix attrsets are strict in their attrnames (lazy only in their attrvalues).
So outputs
can't depend on finalAttrs
.
Description of changes
eiwd
isiwd
, minus thedbus
dependency. It consists ofiwd
, plus:#ifdef HAVE_DBUS
lines added, and autoconfery to enable itresolvconf
instead ofsystemd
(one-line change)/etc/resolv.conf
is not a fatal error (one-line change)ell
is vendored as a submodule to ensure consistent versionsThat's it.
You control
eiwd
by simply editing files in its state directory, which it monitors for changes viainotify()
.I use this to manage the wifi card on my daily-driver laptop (
aarch64-linux
) and it has been a huge improvement overwpa_supplicant
. It works very well underrunit
(soon to be replaced withs6
). My only complaint is the cryptic filenames used for SSIDs which contain characters other than[A-Za-z0-9 _-]
.Things done
git diff
against upstreamgit.kernel.org/.../{iwd,ell}
iwd
(see bulleted list above)./result/bin/
)