Skip to content

Commit

Permalink
nix: point nix edit and ofborf at the original version attribute
Browse files Browse the repository at this point in the history
This way `nix edit` will just at the location close to the attribute
definition and not the common code.
  • Loading branch information
trofi committed Dec 26, 2023
1 parent 9d52d87 commit b88dcac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkgs/tools/package-management/nix/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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 = ''
Expand Down

0 comments on commit b88dcac

Please sign in to comment.