From 050fb28fa7efd40ad26bc5aeb36740ac36c936d2 Mon Sep 17 00:00:00 2001 From: Lila Date: Sun, 14 Jun 2020 02:11:58 +0200 Subject: [PATCH] Override callPackage to statify executables This has the advantage of enabling us to just use survey.haskellPackages.callPackage, callCabal2nix, developPackage directly instead of having to add an override. --- survey/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/survey/default.nix b/survey/default.nix index 828beaa..da95a90 100644 --- a/survey/default.nix +++ b/survey/default.nix @@ -1259,12 +1259,12 @@ let # (which is the case in `pkgsStatic` only): "--extra-lib-dirs=${final.libffi}/lib" ]); + + statifyIfExecutable = drv: if isExecutable drv then statify drv else drv; in - final.lib.mapAttrs - (name: value: - if (isProperHaskellPackage value && isExecutable value) then statify value else value - ) - super + { + callPackage = drv: args: statifyIfExecutable (super.callPackage drv args); + } ); }); };