diff options
| author | adisbladis <adisbladis@gmail.com> | 2022-01-09 12:13:23 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-09 12:13:23 +1200 |
| commit | 00acdb2aa817048fbe1f91ece18fe7de09762531 (patch) | |
| tree | db217c290283a8b2df0e5141bb6e92069a083f26 | |
| parent | Merge pull request #154057 from NixOS/backport-153927-to-release-21.11 (diff) | |
| parent | emacs.pkgs.melpa*: Fix version number checks if number is zero (diff) | |
| download | nixpkgs-00acdb2aa817048fbe1f91ece18fe7de09762531.tar.gz | |
Merge pull request #154069 from NixOS/backport-154066-to-release-21.11
[Backport release-21.11] emacs.pkgs.melpa*: Fix version numbers with negative numbers
| -rw-r--r-- | pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix b/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix index 8ecce11a7421..1b131750c69c 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix @@ -69,7 +69,10 @@ in { melpaBuild { inherit pname ename commit; version = if isNull version then "" else - lib.concatStringsSep "." (map toString version); + lib.concatStringsSep "." (map toString + # Hack: Melpa archives contains versions with parse errors such as [ 4 4 -4 413 ] which should be 4.4-413 + # This filter method is still technically wrong, but it's computationally cheap enough and tapers over the issue + (builtins.filter (n: n >= 0) version)); # TODO: Broken should not result in src being null (hack to avoid eval errors) src = if (isNull sha256 || broken) then null else lib.getAttr fetcher (fetcherGenerators args sourceArgs); |
