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

37 lines
918 B
Nix

{ stdenv, pkgs, fetchurl, lib, unzip, autoPatchelfHook, makeWrapper, ... }:
stdenv.mkDerivation rec {
pname = "osirus";
version = "latest";
src = fetchurl {
url = "https://dsp56300.com/builds/osirus/beta/DSP56300Emu-1.4.2-Linux_x86_64-Osirus-CLAP.zip";
sha256 = "sha256-JHZOsoDMS7RpVIigFjyZKCDzsyIergopWblyQ6wVL2k=";
};
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/Osirus.clap $out/lib/clap/
'';
postFixup = ''
patchelf --set-rpath "${lib.makeLibraryPath buildInputs}" $out/lib/clap/Osirus.clap
'';
meta = with lib; {
homepage = "https://dsp56300.wordpress.com/osirus/";
description = "Osirus";
platforms = platforms.linux;
};
}