nixpkgs/pkgs/by-name/vi/vital/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

68 lines
1.4 KiB
Nix

{ lib
, stdenv
, fetchzip
, autoPatchelfHook
, makeBinaryWrapper
, alsa-lib
, libjack2
, curl
, xorg
, libGL
, freetype
}:
stdenv.mkDerivation (finalAttrs: {
pname = "vital";
version = "1.5.5";
src = fetchzip {
url = "https://builds.vital.audio/VitalAudio/vital/${builtins.replaceStrings ["."] ["_"] finalAttrs.version}/VitalInstaller.zip";
hash = "sha256-hCwXSUiBB0YpQ1oN6adLprwAoel6f72tBG5fEb61OCI=";
};
nativeBuildInputs = [
autoPatchelfHook
makeBinaryWrapper
];
buildInputs = [
alsa-lib
(lib.getLib stdenv.cc.cc)
libGL
xorg.libSM
xorg.libICE
xorg.libX11
freetype
libjack2
];
dontBuild = true;
installPhase = ''
runHook preInstall
# copy each output to its destination (individually)
mkdir -p $out/{bin,lib/{clap,vst,vst3}}
for f in bin/Vital lib/{clap/Vital.clap,vst/Vital.so,vst3/Vital.vst3}; do
cp -r $f $out/$f
done
wrapProgram $out/bin/Vital \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ curl libjack2 ]}"
runHook postInstall
'';
meta = with lib; {
description = "Spectral warping wavetable synth";
homepage = "https://vital.audio/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = with licenses; [ unfree gpl3Plus ];
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ PowerUser64 ];
mainProgram = "Vital";
};
})