From a30c4247811381e4fa6329eddf44ba5a4c59d8ec Mon Sep 17 00:00:00 2001 From: Alejandro Gallo Date: Mon, 8 Aug 2022 18:13:32 +0200 Subject: [PATCH] Fix mkl nix --- shell.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shell.nix b/shell.nix index 94f0bc0..3eeecc7 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,6 @@ { compiler ? "gcc" , pkgs ? import {} -, with-mkl ? false +, mkl ? false , cuda ? false , docs ? true }: @@ -13,7 +13,7 @@ let openblas = import ./etc/nix/openblas.nix { inherit pkgs; }; - mkl = import ./etc/nix/mkl.nix { pkgs = unfree-pkgs; }; + mkl-pkg = import ./etc/nix/mkl.nix { pkgs = unfree-pkgs; }; cuda-pkg = if cuda then (import ./cuda.nix { pkgs = unfree-pkgs; }) else {}; in @@ -73,7 +73,7 @@ pkgs.mkShell rec { automake pkg-config ] - ++ (if with-mkl then mkl.buildInputs else openblas.buildInputs) + ++ (if mkl then mkl-pkg.buildInputs else openblas.buildInputs) ++ (if docs then docInputs else []) ; @@ -90,6 +90,7 @@ pkgs.mkShell rec { CC=${CC} LD=${LD} '' + + (if mkl then mkl-pkg.shellHook else openblas.shellHook) + (if cuda then cuda-pkg.shellHook else "") ;