Merge pull request #237594 from ncfavier/runCommand-position

runCommand: set meta.position from the arguments
This commit is contained in:
Naïm Favier 2023-06-18 21:15:27 +02:00 committed by GitHub
commit 2f91f7d1c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,6 +87,10 @@ rec {
inherit buildCommand name;
passAsFile = [ "buildCommand" ]
++ (derivationArgs.passAsFile or []);
pos = let args = builtins.attrNames derivationArgs; in
if builtins.length args > 0
then builtins.unsafeGetAttrPos (builtins.head args) derivationArgs
else null;
}
// (lib.optionalAttrs runLocal {
preferLocalBuild = true;