summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-12-20 20:00:01 +0100
committertv <tv@krebsco.de>2022-12-20 20:00:40 +0100
commit02751cb50d2791be12476db14554a2093a52b6a0 (patch)
tree01c1c41f1492f20e88bfeb3b356ed6b0044ad9f6
parentefbcfce7a78d12a5a6adebba5f1ec3bb9f602286 (diff)
lib.haskell.substitutePkg: sort and dedup deps
-rw-r--r--lib/haskell.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/haskell.nix b/lib/haskell.nix
index 4f0ee05ab..f87cfa761 100644
--- a/lib/haskell.nix
+++ b/lib/haskell.nix
@@ -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