Merge pull request #242099 from ncfavier/runCommand-meta-position

runCommand: don't set meta.position if meta is given
This commit is contained in:
Naïm Favier 2023-07-16 14:50:23 +02:00 committed by GitHub
commit 4dadd7ef86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,6 +87,8 @@ rec {
inherit buildCommand name;
passAsFile = [ "buildCommand" ]
++ (derivationArgs.passAsFile or []);
}
// lib.optionalAttrs (! derivationArgs?meta) {
pos = let args = builtins.attrNames derivationArgs; in
if builtins.length args > 0
then builtins.unsafeGetAttrPos (builtins.head args) derivationArgs