nixpkgs-suyu/pkgs/applications/audio/midas/generic.nix

44 lines
1.2 KiB
Nix
Raw Normal View History

2020-11-19 21:54:19 +01:00
{ stdenv, fetchurl, lib, libX11, libXext, alsaLib, freetype, brand, type, version, homepage, url, sha256, ... }:
2018-05-17 14:30:23 +02:00
stdenv.mkDerivation rec {
inherit type;
baseName = "${type}-Edit";
name = "${lib.toLower baseName}-${version}";
2018-05-17 14:30:23 +02:00
src = fetchurl {
2020-11-19 21:54:19 +01:00
inherit url;
2018-05-17 14:30:23 +02:00
inherit sha256;
};
sourceRoot = ".";
dontBuild = true;
dontStrip = true;
installPhase = ''
mkdir -p $out/bin
cp ${baseName} $out/bin
'';
preFixup = let
# we prepare our library path in the let clause to avoid it become part of the input of mkDerivation
libPath = lib.makeLibraryPath [
libX11 # libX11.so.6
libXext # libXext.so.6
alsaLib # libasound.so.2
freetype # libfreetype.so.6
stdenv.cc.cc.lib # libstdc++.so.6
];
in ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}" \
$out/bin/${baseName}
'';
meta = with stdenv.lib; {
inherit homepage;
description = "Editor for the ${brand} ${type} digital mixer";
license = licenses.unfree;
platforms = platforms.linux;
maintainers = [ maintainers.magnetophon ];
};
}