Files
millerson-overlay.nix/packages/ds4/package.nix
T
alex 6013b17aad chore(packages): bump pins to current upstream releases
Refresh every package pin so the overlay stops carrying versions upstream
has moved past, and repair the pins where an automated bump had produced a
version that no longer resolves:

- graphify 0.9.61 -> 1.0.0 and back to tag tracking: the branch-tracking
  update script generated v0.9.77-unstable-<date> for a rev = "v${version}"
  src, a tag that never existed
- radar 1.13.1 -> 1.16.2 (upstream retagged its releases as k8s-ui-v*)
- llama-cpp b9645 -> b11439
- hipengine 0.5.0 -> 0.6.1, traycer 1.3.0 -> 1.4.2, freetoken 0.1.2 -> 0.1.3
- awg-tool 0.4.0, freebuff 0.2.19, kubernetes-mcp-server 0.0.67,
  marmel 0-unstable-2026-10-05, open-code-review 1.12.12,
  ds4 0-unstable-2026-09-20
- version-string normalisation for the branch-tracked packages already at
  their newest commit (g3, haivemind, shardr, skillsmcp)

Every changed src hash was re-fetched and verified. omniroute stays at
3.8.50: 3.8.51 changes its npm lockfile, so its npmDepsHash would have to
be recomputed before the bump is usable.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-10-06 16:46:26 +03:00

103 lines
3.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
gnumake,
rocmPackages,
autoPatchelfHook,
}:
stdenv.mkDerivation {
pname = "ds4";
version = "0-unstable-2026-09-20";
src = fetchFromGitHub {
owner = "antirez";
repo = "ds4";
rev = "0aaea5a238fb41a35106a551e73c8409dfb751ac";
hash = "sha256-Bo/td1HwVjw6bwz3BDwTP+ZSudkVFCo2aIVK4axvmXg=";
};
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";
};
}