Fixes a bug preventing `recurseIntoDirectory` from changing the `directory` argument.
Moreover, `processDir` now cannot capture arguments from the `packagesFromDirectoryRecursive` call,
entirely preventing this class of bug from reoccurring should new parameters be added etc.
This essentially reverts 7ce8e7c4cf
asl20-llvm does not produce a valid SPDX ID, it produces a valid SPDX
Expression. However, this is not what the spdxId field promises.
This is relevant because we cannot produce valid SBOMs (e.g. CycloneDX)
using this field as the schemas for these SBOMs check that the IDs are
valid.
This change leaves us with consistently valid SPDX IDs at the cost
of slightly less convenience.
This is a variant composed of clause 1 and 3 of a BSD-Modified found in the
Linux kernel and this extra variant has the words "without modification" added
at the end of clause 1 either with or without a comma. It also lacks the
warranty disclaimer.
See <https://scancode-licensedb.aboutcode.org/bsd-no-disclaimer-unmodified.html>.
Previously if function in defs had set pattern in argument,
this information would be lost.
This keeps functionArgs in set pattern,
by using functor and `__functionArgs`
that is later used by `lib.functionArgs`.
Otherwise nested types such as `attrsOf (attrsOf int)` won't have a
backwards compatible `type.nestedTypes.elemType.functor.wrapped`.
Follow-up work to https://github.com/NixOS/nixpkgs/pull/366015
This reverts commit ce8f304bb6.
The problem was simply a typo (nestedTypes.elemType ->
type.nestedTypes.elemType) ! And CI didn't run for lib in the orginal
PR which is why it didn't get caught.
This gives people some flexibility when they need a path type, and
prevents a "combinatorial explosion" of various path stops.
I've re-implemented our existing `path` and `pathInStore` types using
`pathWith`. Our existing `package` type is potentially a candidate for
similar treatment, but it's a little quirkier (there's some stuff with
`builtins.hasContext` and `toDerivation` that I don't completely
understand), and I didn't want to muddy this PR with that.
As a happy side effect of this work, we get a new feature: the ability
to create a type for paths *not* in the store. This is useful for when a
module needs a path to a file, and wants to protect people from
accidentally leaking that file into the nix store.