Files
millerson-overlay.nix/packages/ds4/package.nix
T
alex e2f24b0876 chore(packages): bump pins to current upstream releases
- awg-tool 0.4.0 -> 0.5.0
- awgen 0.1 -> 0.2
- codeaf 0.7.1 -> 0.8.2
- ds4 -> ee7e840 (2026-10-21)
- freebuff 0.2.19 -> 0.2.34
- graphify 0.9.77 -> 0.9.95 (add pyyaml dependency)
- hipengine 0.6.1 -> 0.8.3
- kubernetes-mcp-server 0.0.67 -> 0.0.69 (build with go_1_27)
- kyojin 1.3 -> 1.7.1 (drop obsolete setup.py/pyproject patches, ship
  gr_mix_hip from the package, add ninja runtime dependency)
- marmel -> de3e99c (2026-10-23)
- omniroute 3.8.50 -> 3.8.52
- open-code-review 1.12.12 -> 1.13.3 (build with go_1_27)
- pilotdeck 2026.10.17 -> 2026.10.20
- radar 1.16.2 -> 1.18.0
- traycer 1.4.2 -> 1.5.1

Verified: nix build passes for every bumped package; kyojin.tests.jit
compiles all five JIT kernels.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-10-24 14:09:34 +03:00

103 lines
3.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
gnumake,
rocmPackages,
autoPatchelfHook,
}:
stdenv.mkDerivation {
pname = "ds4";
version = "0-unstable-2026-10-21";
src = fetchFromGitHub {
owner = "antirez";
repo = "ds4";
rev = "ee7e8405232c8971000cc7ba2b945b00bf6d20d3";
hash = "sha256-o2F3OA2eHIac2iRvck/z3Nj/YYijoSXfPi+1zbdd2tU=";
};
nativeBuildInputs = [
gnumake
rocmPackages.hipcc
autoPatchelfHook
];
buildInputs = [
rocmPackages.clr
rocmPackages.hipblas
rocmPackages.hipblas-common
rocmPackages.hipblaslt
rocmPackages.hipcub
rocmPackages.rocblas
rocmPackages.rocprim
rocmPackages.rocwmma
];
# STRIXHALO.md: rocwmma/internal/ headers may be missing in distro packages.
# nixpkgs builds rocwmma from source so all headers (including internal/) are present.
# ROCM_ARCH defaults to gfx1151 (Strix Halo / Radeon 8060S) in the upstream Makefile.
buildPhase = ''
runHook preBuild
make strix-halo -j"$NIX_BUILD_CORES" \
HIPCC="${rocmPackages.hipcc}/bin/hipcc" \
ROCM_CFLAGS="-O3 -ffast-math -g -fno-finite-math-only -pthread -D__HIP_PLATFORM_AMD__ -Wno-unused-command-line-argument --offload-arch=gfx1151 \
-I${rocmPackages.clr}/include \
-I${rocmPackages.hipblas}/include \
-I${rocmPackages.hipblas-common}/include \
-I${rocmPackages.hipblaslt}/include \
-I${rocmPackages.hipcub}/include \
-I${rocmPackages.rocblas}/include \
-I${rocmPackages.rocprim}/include \
-I${rocmPackages.rocwmma}/include" \
ROCM_LDLIBS="-lm -pthread \
-L${rocmPackages.hipblas}/lib -lhipblas \
-L${rocmPackages.hipblaslt}/lib -lhipblaslt \
-L${rocmPackages.rocblas}/lib -lrocblas \
-L${rocmPackages.clr}/lib -lamdhip64"
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ds4 ds4-server ds4-bench ds4-eval ds4-agent $out/bin/
runHook postInstall
'';
passthru = {
category = "AI Inference";
updateScript = [
"nix-update"
"--flake"
"--version=branch=main"
".#ds4"
];
};
meta = {
description = "DeepSeek 4 Flash and PRO local inference engine for ROCm (Strix Halo)";
longDescription = ''
DS4 is a self-contained local inference engine specifically built for
DeepSeek V4 Flash and PRO. It bundles a CLI, HTTP server, and native
coding agent. This package is built with the ROCm backend for AMD
Strix Halo GPUs (gfx1151, Radeon 8060S).
Runtime requirements (from STRIXHALO.md):
- User must be in 'render' and 'video' groups for /dev/kfd and DRM access
- GPU-visible memory must be increased via kernel parameters:
amd_iommu=off amdgpu.gttsize=126976 ttm.pages_limit=32505856 ttm.page_pool_size=32505856
'';
homepage = "https://github.com/antirez/ds4";
changelog = "https://github.com/antirez/ds4/commits/main";
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
mainProgram = "ds4";
};
}