lib.haskell.substitutePkg: sort and dedup deps

This commit is contained in:
tv 2022-12-20 20:00:01 +01:00
parent efbcfce7a7
commit 02751cb50d

View File

@ -39,7 +39,12 @@ rec {
in
if parse == null then
(pkgs.writeText name s).overrideAttrs (old: {
dependencies = old.dependencies or [] ++ dependencies;
dependencies =
lib.uniq
(lib.sort (lib.on lib.lessThan (lib.getAttr "name"))
(filter
(lib.ne null)
(old.dependencies or [] ++ dependencies)));
})
else