-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Merged
Merged
eiwd: init at 2.8-1 #208844
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5134c37
eiwd: init at 2.0-1
5c8f765
eiwd: 2.0-1 -> 2.1-1
83daf63
eiwd: 2.1-1 -> 2.2-1
a4a6133
eiwd: 2.2-1 -> 2.3-1
3471586
eiwd: 2.3-1 -> 2.4-1
7c1fecd
eiwd: 2.4-1 -> 2.5-1
369134f
eiwd: 2.5-1 -> 2.6-1
1e3ec20
eiwd: 2.6-1 -> 2.8-1
66eb36f
eiwd: move to pkgs/by-name
57cb2ad
https://github.com/NixOS/nixpkgs/pull/208844#discussion_r1381145197
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, autoreconfHook | ||
, pkg-config | ||
, python3Packages # for tests | ||
, openssl # for tests | ||
, enableManpages ? true | ||
, docutils # for manpages | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "eiwd"; | ||
version = "2.8-1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "illiliti"; | ||
repo = "eiwd"; | ||
rev = finalAttrs.version; | ||
hash = "sha256-SD/RJFuGBwFT4G73f93VrWO/6mGKQxjVhmNrpKRA/WY="; | ||
fetchSubmodules = true; | ||
}; | ||
|
||
outputs = [ | ||
"out" "doc" | ||
] ++ lib.optionals enableManpages [ | ||
"man" | ||
] ++ lib.optionals finalAttrs.doCheck [ | ||
"test" | ||
]; | ||
|
||
postUnpack = '' | ||
patchShebangs . | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
autoreconfHook | ||
pkg-config | ||
] ++ lib.optionals enableManpages [ | ||
docutils # only for the man pages | ||
]; | ||
|
||
buildInputs = [ ]; | ||
This conversation was marked as resolved.
Show resolved
Hide resolved
|
||
|
||
checkInputs = [ | ||
python3Packages.python | ||
(lib.getBin openssl) | ||
]; | ||
|
||
configureFlags = [ | ||
"--disable-dbus" | ||
] ++ lib.optionals (!enableManpages) [ | ||
"--disable-manual-pages" | ||
]; | ||
|
||
enableParallelBuilding = true; | ||
|
||
# override this to false if you don't want to build python3 | ||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform; | ||
|
||
# prevent the `install-data-local` Makefile rule from running; | ||
# all it does is attempt to `mkdir` the `localstatedir`. | ||
preInstall = '' | ||
mkdir install-data-local | ||
substituteInPlace Makefile --replace \ | ||
'$(MKDIR_P) -m 700 $(DESTDIR)$(daemon_storagedir)' \ | ||
'true' | ||
''; | ||
|
||
postInstall = '' | ||
mkdir -p $doc/share/doc | ||
cp -a doc $doc/share/doc/iwd | ||
cp -a README AUTHORS TODO $doc/share/doc/iwd | ||
'' + lib.optionalString finalAttrs.doCheck '' | ||
mkdir -p $test/bin | ||
cp -a test/* $test/bin/ | ||
''; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/illiliti/eiwd/"; | ||
description = "Fork of iwd (wifi daemon) which does not require dbus"; | ||
license = licenses.lgpl21Plus; | ||
platforms = platforms.linux; | ||
}; | ||
}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
finalAttrs.finalPackage.doCheck
contains the logic in mkDerivation so setting doCheck here will be unnecessaryThere 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.
Yes you can https://github.com/search?q=repo%3ANixOS%2Fnixpkgs%20finalAttrs.finalPackage.doCheck&type=code
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: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 likeThere 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 inoutputs
, because the attrnames ofoutputs
become attrnames offinalPackage
, and Nix attrsets are strict in their attrnames (lazy only in their attrvalues).So
outputs
can't depend onfinalAttrs
.