-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Add lib.fileset.optional :: Bool -> FileSet -> FileSet #266106
Copy link
Copy link
Open
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: libThe Nixpkgs function libraryThe Nixpkgs function library
Description
OT: I would quite like to have fileset.optional : Bool -> FileSet -> FileSet such that optional false x == fileset.empty. Example:
mkDerivation(finalAttrs: {
src = fileset.unions [
./src
(fileset.optional finalAttrs.doCheck ./tests)
];
})Originally posted by @roberth in #265964 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: libThe Nixpkgs function libraryThe Nixpkgs function library
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status