Unverified Commit 2e6013cf authored by Naïm Favier's avatar Naïm Favier
Browse files

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.
parent 69be6e9c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;