Unverified Commit 31fd4966 authored by Felix Bargfeldt's avatar Felix Bargfeldt Committed by GitHub
Browse files

camilladsp: init at 3.0.1 (#403234)

parents 94f61059 222b02ef
Loading
Loading
Loading
Loading
+3483 −0

File added.

Preview size limit exceeded, changes collapsed.

+57 −0
Original line number Diff line number Diff line
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  pkg-config,
  libpulseaudio,
  openssl,
  stdenv,
  alsa-lib,
  nix-update-script,
  versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "camilladsp";
  version = "3.0.1";

  src = fetchFromGitHub {
    owner = "HEnquist";
    repo = "camilladsp";
    tag = "v${finalAttrs.version}";
    hash = "sha256-IJ1sYprBh8ys1Og3T3newIDlBlR0PoQiblbJmzLbsfs=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
  };

  postPatch = ''
    ln -s ${./Cargo.lock} Cargo.lock
  '';

  nativeBuildInputs = [
    pkg-config
    rustPlatform.bindgenHook
  ];

  buildInputs = [
    libpulseaudio
    openssl
  ] ++ lib.optionals stdenv.isLinux [ alsa-lib ];

  passthru.updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; };

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgramArg = "--version";

  meta = {
    description = "Flexible cross-platform IIR and FIR engine for crossovers, room correction etc";
    homepage = "https://github.com/HEnquist/camilladsp";
    changelog = "https://github.com/HEnquist/camilladsp/blob/v${finalAttrs.version}/CHANGELOG.md";
    license = lib.licenses.gpl3Only;
    platforms = lib.platforms.linux;
    maintainers = with lib.maintainers; [ paepcke ];
    mainProgram = "camilladsp";
  };
})