From 3983ad1b0b1367a6e0d670ee44b56a5d1e67c9cf Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 12 Mar 2024 22:05:08 +0100 Subject: [PATCH] Add `-iog-full` flavor (with R and Postgres) --- dynamic.nix | 4 ++-- flake.nix | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dynamic.nix b/dynamic.nix index 13a72126..11010442 100644 --- a/dynamic.nix +++ b/dynamic.nix @@ -1,5 +1,5 @@ # define a development shell for dynamically linked applications (default) -{ self, pkgs, compiler, compiler-nix-name, toolsModule, withHLS ? true, withHlint ? true, withIOG ? true }: +{ self, pkgs, compiler, compiler-nix-name, toolsModule, withHLS ? true, withHlint ? true, withIOGFull ? false, withIOG ? (withIOGFull || true) }: let tool-version-map = import ./tool-map.nix; tool = tool-name: pkgs.haskell-nix.tool compiler-nix-name tool-name [(tool-version-map compiler-nix-name tool-name) toolsModule]; cabal-install = pkgs.haskell-nix.nix-tools-unchecked.exes.cabal; @@ -101,6 +101,6 @@ pkgs.mkShell { jq yq-go ] - ++ map pkgs.lib.getDev (with pkgs; [ libblst libsodium-vrf secp256k1 R_4_1_3 postgresql icu ])) + ++ map pkgs.lib.getDev (with pkgs; [ libblst libsodium-vrf secp256k1 icu ] ++ pkgs.lib.optional (withIOGFull) [ R_4_1_3 postgresql ])) ; } diff --git a/flake.nix b/flake.nix index ce4fc590..a4aa7942 100644 --- a/flake.nix +++ b/flake.nix @@ -133,6 +133,14 @@ pkgs.lib.nameValuePair "${short-name}-minimal-iog" ( import ./dynamic.nix (args // { withHLS = false; withHlint = false; withIOG = true; }) )) (compilers pkgs) + // pkgs.lib.mapAttrs' (short-name: args: + pkgs.lib.nameValuePair "${short-name}-iog-full" ( + import ./dynamic.nix (args // { withIOGFull = true; }) + )) (compilers pkgs) + // pkgs.lib.mapAttrs' (short-name: args: + pkgs.lib.nameValuePair "${short-name}-minimal-iog-full" ( + import ./dynamic.nix (args // { withHLS = false; withIOG = false; withIOGFull = true; }) + )) (compilers pkgs) // pkgs.lib.mapAttrs' (short-name: args: pkgs.lib.nameValuePair "${short-name}-static-iog" ( import ./static.nix (args // { withIOG = true; })