diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-12-26 10:47:29 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2023-12-26 10:47:29 +0000 |
commit | b88dcacafdae994a8be1504dd5493488682fa13d (patch) | |
tree | a2c83cccfd0b466329a6704d6c7d3711c93dfbaf /pkgs/tools/package-management | |
parent | 9d52d8789eeb3d06c96e72f248013b3f1fbb4d7a (diff) | |
download | nixlib-b88dcacafdae994a8be1504dd5493488682fa13d.tar nixlib-b88dcacafdae994a8be1504dd5493488682fa13d.tar.gz nixlib-b88dcacafdae994a8be1504dd5493488682fa13d.tar.bz2 nixlib-b88dcacafdae994a8be1504dd5493488682fa13d.tar.lz nixlib-b88dcacafdae994a8be1504dd5493488682fa13d.tar.xz nixlib-b88dcacafdae994a8be1504dd5493488682fa13d.tar.zst nixlib-b88dcacafdae994a8be1504dd5493488682fa13d.zip |
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.
Diffstat (limited to 'pkgs/tools/package-management')
-rw-r--r-- | pkgs/tools/package-management/nix/common.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index 0ea47dd7e17c..e57b04246aa5 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -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 = '' |