ik_llama.cpp/.devops/nix/devshells.nix
Aliez Ren f6c8b5f2cb
Update nix flake: sync with upstream, fix for newer nixpkgs (#1371)
* Update nix flake: sync with upstream, fix for newer nixpkgs

- Sync package.nix with upstream: add rocmGpuTargets/useRpc params,
  fix env optionals→optionalAttrs, remove unused inputs
- Rewrite devshells.nix to use mkShell directly instead of passthru
- Fix CUDA license check in nixpkgs-instances.nix for list-type licenses
- Update flake inputs (nixpkgs, flake-parts) to latest
- Update references from ggerganov/llama.cpp to ikawrakow/ik_llama.cpp

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Apply nix review suggestions from baileylu121 (#1371)

- Use legacyPackages instead of import to avoid extra nixpkgs instances
- Use inherit (pkgs) stdenv idiom
- Remove unnecessary lib.pipe wrapper in devshells.nix
- Simplify license normalization with lib.toList in nixpkgs-instances.nix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 08:17:52 +01:00

45 lines
1.1 KiB
Nix

{ inputs, ... }:
{
perSystem =
{
config,
lib,
system,
...
}:
{
devShells =
let
pkgs = inputs.nixpkgs.legacyPackages.${system};
inherit (pkgs) stdenv;
in
lib.concatMapAttrs (
name: package: {
${name} = pkgs.mkShell {
name = "${name}";
inputsFrom = [ package ];
shellHook = ''
echo "Entering ${name} devShell"
'';
};
"${name}-extra" = pkgs.mkShell {
name = "${name}-extra";
inputsFrom = [ package ];
packages = with pkgs.python3Packages; [
numpy
sentencepiece
tiktoken
torchWithoutCuda
transformers
];
shellHook = ''
echo "Entering ${name}-extra devShell"
addToSearchPath "LD_LIBRARY_PATH" "${lib.getLib stdenv.cc.cc}/lib"
'';
};
}
) config.packages;
};
}