summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-11-30 09:40:53 +0100
committertv <tv@krebsco.de>2018-11-30 09:47:26 +0100
commit5f0b1b803500f468a1d60217cc0fc81bb8fd58aa (patch)
tree571084ed5310b02647258152aa06d24a7f367a1a /krebs
parent53359a60f5f0114b013c6241b52aa7387d1b922a (diff)
lib: add mapNixDir{,1}
Diffstat (limited to 'krebs')
-rw-r--r--krebs/5pkgs/haskell/default.nix9
-rw-r--r--krebs/5pkgs/simple/default.nix8
2 files changed, 2 insertions, 15 deletions
diff --git a/krebs/5pkgs/haskell/default.nix b/krebs/5pkgs/haskell/default.nix
index 7cdf65ea5..e824699f9 100644
--- a/krebs/5pkgs/haskell/default.nix
+++ b/krebs/5pkgs/haskell/default.nix
@@ -1,13 +1,6 @@
with import <stockholm/lib>;
let
- overrides = self: super:
- listToAttrs
- (map
- (name: nameValuePair (removeSuffix ".nix" name)
- (self.callPackage (./. + "/${name}") {}))
- (filter
- (name: name != "default.nix" && !hasPrefix "." name)
- (attrNames (readDir ./.))));
+ overrides = self: super: mapNixDir (path: self.callPackage path {}) ./.;
in
self: super:
{
diff --git a/krebs/5pkgs/simple/default.nix b/krebs/5pkgs/simple/default.nix
index 1b9d8c235..6ba4fec83 100644
--- a/krebs/5pkgs/simple/default.nix
+++ b/krebs/5pkgs/simple/default.nix
@@ -15,10 +15,4 @@ let
else override;
in
- listToAttrs
- (map
- (name: nameValuePair (removeSuffix ".nix" name)
- (callPackage (./. + "/${name}") {}))
- (filter
- (name: name != "default.nix" && !hasPrefix "." name)
- (attrNames (readDir ./.))))
+ mapNixDir (path: callPackage path {}) ./.