diff options
author | Naïm Favier <n@monade.li> | 2023-06-18 21:15:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-18 21:15:27 +0200 |
commit | 2f91f7d1c9759a2636f78264d0baba4d015eed2e (patch) | |
tree | c3d36aca755ebf08ed5d81392b3e68197f253cc6 /pkgs/build-support | |
parent | 92a4703048452a504465db54f981fb6e80a5cf41 (diff) | |
parent | 2e6013cf1bdf6b0409589bdaca6588710cc145a2 (diff) |
Merge pull request #237594 from ncfavier/runCommand-position
runCommand: set meta.position from the arguments
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/trivial-builders/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index d3cb22a1f5351..2af36008c7a51 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -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; |