nixpkgs/pkgs/by-name/de/decent-sampler/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

94 lines
2.3 KiB
Nix
Raw Normal View History

2023-12-21 03:45:42 +01:00
{ lib
, stdenv
, fetchzip
, fetchurl
, makeDesktopItem
, copyDesktopItems
2023-12-21 03:45:42 +01:00
, buildFHSEnv
, alsa-lib
, freetype
, nghttp2
, libX11
, }:
let
pname = "decent-sampler";
2024-02-25 16:08:08 +01:00
version = "1.10.0";
2023-12-21 03:45:42 +01:00
icon = fetchurl {
url = "https://archive.org/download/ds-256/DS256.png";
hash = "sha256-SV8zY5QJ6uRSrLuGTmT1zwGoIIXCV9GD2ZNiqK+i1Bc=";
};
decent-sampler = stdenv.mkDerivation {
2023-12-21 03:45:42 +01:00
inherit pname version;
src = fetchzip {
# dropbox links: https://www.dropbox.com/sh/dwyry6xpy5uut07/AABBJ84bjTTSQWzXGG5TOQpfa\
2023-12-21 03:45:42 +01:00
url = "https://archive.org/download/decent-sampler-linux-static-download-mirror/Decent_Sampler-${version}-Linux-Static-x86_64.tar.gz";
2024-02-25 16:08:08 +01:00
hash = "sha256-KYCf/F2/ziuXDHim4FPZQBARiSywvQDJBzKbHua+3SM=";
2023-12-21 03:45:42 +01:00
};
nativeBuildInputs = [ copyDesktopItems ];
desktopItems = [
(makeDesktopItem {
type = "Application";
name = "decent-sampler";
desktopName = "Decent Sampler";
comment = "DecentSampler player";
icon = "decent-sampler";
exec = "decent-sampler";
categories = [ "Audio" "AudioVideo" ];
})
];
2023-12-21 03:45:42 +01:00
installPhase = ''
runHook preInstall
install -Dm755 DecentSampler $out/bin/decent-sampler
2024-02-25 16:22:45 +01:00
install -Dm755 DecentSampler.so -t $out/lib/vst
install -d "$out/lib/vst3" && cp -r "DecentSampler.vst3" $out/lib/vst3
install -Dm444 ${icon} $out/share/pixmaps/decent-sampler.png
2023-12-21 03:45:42 +01:00
runHook postInstall
'';
};
in
buildFHSEnv {
2024-02-25 16:22:45 +01:00
inherit (decent-sampler) pname version;
2023-12-21 03:45:42 +01:00
targetPkgs = pkgs: [
alsa-lib
decent-sampler
freetype
nghttp2
libX11
];
runScript = "decent-sampler";
2024-02-25 16:22:45 +01:00
extraInstallCommands = ''
cp -r ${decent-sampler}/lib $out/lib
cp -r ${decent-sampler}/share $out/share
2024-02-25 16:22:45 +01:00
'';
2023-12-21 03:45:42 +01:00
meta = with lib; {
description = "An audio sample player";
longDescription = ''
Decent Sampler is an audio sample player.
Allowing you to play sample libraries in the DecentSampler format
(files with extensions: dspreset and dslibrary).
'';
mainProgram = "decent-sampler";
homepage = "https://www.decentsamples.com/product/decent-sampler-plugin/";
# It claims to be free but we currently cannot find any license
# that it is released under.
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ adam248 ];
};
}