Something went wrong. Try again.
Sample-rate conversion for audio in Zig: any rate to any other, as a stream
Something went wrong. Try again.
zig-resample package.nix
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us># SPDX-License-Identifier: MIT
{ lib, stdenv, callPackage, zig_0_17,}:let # Generated from build.zig.zon by zon2nix; regenerate with # nix develop -c zon2nix --17 --nix=build.zig.zon.nix build.zig.zon zigDeps = callPackage ./build.zig.zon.nix { };instdenv.mkDerivation (finalAttrs: { pname = "zig-resample"; version = "0.2.0";
# Named rather than the whole directory, so that editing a test or the # README does not rebuild the package and, through it, every virtual machine # that has it installed. src = lib.fileset.toSource { root = ./.; fileset = lib.fileset.unions [ ./build.zig ./build.zig.zon ./src ./tests ./tools ]; };
nativeBuildInputs = [ zig_0_17 ];
# `--system` does not merely offer the directory, it forbids fetching # outright: a dependency missing from it is a build error naming the # package, rather than a silent attempt to reach a network the sandbox does # not have. zigBuildFlags = [ "--system" "${zigDeps}" ]; # The check phase assembles its own flags rather than reusing the build's, # so without this `zig build test` runs without --system, tries to fetch, # and fails in the sandbox. zigCheckFlags = finalAttrs.zigBuildFlags;
doCheck = true;
# A library and nothing else: `zig build install` installs nothing, and # what the package is for is the check phase above, which runs the tests # and the published vectors. Nix still wants an output to exist. postInstall = '' mkdir -p $out '';
meta = { description = "Sample-rate conversion for audio, in Zig"; homepage = "https://git.jcollie.dev/jeff/zig-resample"; license = lib.licenses.mit; maintainers = [ ]; };})