From e1e464990229fca86835d83842e2511d560cf4bb Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 15 Sep 2018 15:27:35 +0200 Subject: optional thermoprint-client --- custom/bar-service.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/custom/bar-service.nix b/custom/bar-service.nix index cf4f7a8c..5ec3a9d0 100644 --- a/custom/bar-service.nix +++ b/custom/bar-service.nix @@ -96,7 +96,7 @@ in { nixpkgs.config.allowUnfree = true; - packages.thermoprint.enable = true; + packages.thermoprint.enable = cfg.thermoprintBaseURL != null; users.users."${cfg.user}" = { group = cfg.group; @@ -112,7 +112,13 @@ in { haskell = superPkgs.haskell // { packages = superPkgs.haskell.packages // { ghc822 = superPkgs.haskell.packages.ghc822.extend (selfH: superH: { - bar = superPkgs.callPackage ./bar { haskellPackages = selfH; }; + bar = superPkgs.callPackage ./bar { + haskellPackages = selfH // { + thermoprint-client = if (cfg.thermoprintBaseURL != null) + then selfH.thermoprint-client + else null; + }; + }; }); }; }; -- cgit v1.2.3