Felipe97/llama-cpp-compiled
01.1k
1{ inputs, ... }:2 3{4 perSystem =5 {6 config,7 lib,8 system,9 ...10 }:11 {12 devShells =13 let14 pkgs = import inputs.nixpkgs { inherit system; };15 stdenv = pkgs.stdenv;16 scripts = config.packages.python-scripts;17 in18 lib.pipe (config.packages) [19 (lib.concatMapAttrs (20 name: package: {21 ${name} = pkgs.mkShell {22 name = "${name}";23 inputsFrom = [ package ];24 shellHook = ''25 echo "Entering ${name} devShell"26 '';27 };28 "${name}-extra" =29 if (name == "python-scripts") then30 null31 else32 pkgs.mkShell {33 name = "${name}-extra";34 inputsFrom = [35 package36 scripts37 ];38 # Extra packages that *may* be used by some scripts39 packages = [40 pkgs.python3Packages.tiktoken41 ];42 shellHook = ''43 echo "Entering ${name} devShell"44 addToSearchPath "LD_LIBRARY_PATH" "${lib.getLib stdenv.cc.cc}/lib"45 '';46 };47 }48 ))49 (lib.filterAttrs (name: value: value != null))50 ];51 };52}53 