runCommand: set meta.position from the arguments
Currently all packages defined by a call to runCommand have their meta.position pointing to trivial-builders.nix. This change makes uses of runCommand that supply at least one attribute in the second argument point to the right file.
This commit is contained in:
parent
69be6e9c72
commit
2e6013cf1b
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue