git.iko.soy/typeable/nixpkgs
on master help sign in
emacs.pkgs.melpa*: Fix version numbers with negative numbers
commit7f7252093ffdd080d0e3f3faa7a4a9ccda51e616 authoradisbladis <adisbladis@gmail.com> dateSun 9 Jan 2022, 12:20 (5 years ago) parent92a5cfe
1 file changed+4−1
pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix+4−1
pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix+4−1
@@ -69,7 +69,10 @@ in {
6969 melpaBuild {
7070 inherit pname ename commit;
7171 version = if isNull version then "" else
72− lib.concatStringsSep "." (map toString version);
72+ lib.concatStringsSep "." (map toString
73+ # Hack: Melpa archives contains versions with parse errors such as [ 4 4 -4 413 ] which should be 4.4-413
74+ # This filter method is still technically wrong, but it's computationally cheap enough and tapers over the issue
75+ (builtins.filter (n: n > 0) version));
7376 # TODO: Broken should not result in src being null (hack to avoid eval errors)
7477 src = if (isNull sha256 || broken) then null else
7578 lib.getAttr fetcher (fetcherGenerators args sourceArgs);