git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #154066 from NixOS/emacs-melpa-negative-versions

emacs.pkgs.melpa*: Fix version numbers with negative numbers

commit817d73cf9f7fbac82da9a1df19a0d46044b90cad authoradisbladis <adisbladis@gmail.com> dateSun 9 Jan 2022, 11:44 (5 years ago) parent4d8ed987f72520
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);