nix: point nix edit and ofborf at the original version attribute

This way `nix edit` will just at the location close to the attribute
definition and not the common code.
This commit is contained in:
Sergei Trofimovich 2023-12-26 10:47:29 +00:00
parent 9d52d8789e
commit b88dcacafd

View File

@ -6,7 +6,7 @@
, src ? fetchFromGitHub { owner = "NixOS"; repo = "nix"; rev = version; inherit hash; }
, patches ? [ ]
, maintainers ? with lib.maintainers; [ eelco lovesegfault artturin ]
}:
}@args:
assert (hash == null) -> (src != null);
let
atLeast24 = lib.versionAtLeast version "2.4pre";
@ -232,6 +232,9 @@ self = stdenv.mkDerivation {
};
};
# point 'nix edit' and ofborg at the file that defines the attribute,
# not this common file.
pos = builtins.unsafeGetAttrPos "version" args;
meta = with lib; {
description = "Powerful package manager that makes package management reliable and reproducible";
longDescription = ''