nixos-config/packages/the-usual-suspects/ostirus/package.nix

37 lines
925 B
Nix

{ stdenv, pkgs, fetchurl, lib, unzip, autoPatchelfHook, makeWrapper, ... }:
stdenv.mkDerivation rec {
pname = "ostirus";
version = "latest";
src = fetchurl {
url = "https://dsp56300.com/builds/ostirus/beta/DSP56300Emu-1.4.2-Linux_x86_64-OsTIrus-CLAP.zip";
sha256 = "sha256-+Tu3YkTAj0LiFm70HW7DEQSeu3wYW29X/02DcL5aXT0=";
};
nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ];
buildInputs = with pkgs; [
freetype
fontconfig
alsa-lib
pipewire
stdenv.cc.cc.lib
];
unpackPhase = ''
unzip $src
'';
installPhase = ''
mkdir -p $out/lib/clap
cp -r usr/local/lib/clap/OsTIrus.clap $out/lib/clap/
'';
postFixup = ''
patchelf --set-rpath "${lib.makeLibraryPath buildInputs}" $out/lib/clap/OsTIrus.clap
'';
meta = with lib; {
homepage = "https://dsp56300.wordpress.com/ostirus/";
description = "OsTIrus";
platforms = platforms.linux;
};
}