mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 21:18:28 +03:00
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
@ -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 New Issue
Block a user