depot/third_party/nixpkgs/pkgs/applications/audio/midas/generic.nix
Default email 889482aab3 Project import generated by Copybara.
GitOrigin-RevId: f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5
2022-06-26 12:26:21 +02:00

43 lines
1.2 KiB
Nix

{ stdenv, fetchurl, lib, libX11, libXext, alsa-lib, freetype, brand, type, version, homepage, url, sha256, ... }:
stdenv.mkDerivation rec {
pname = "${lib.toLower type}-edit";
inherit version;
src = fetchurl {
inherit url;
inherit sha256;
};
sourceRoot = ".";
dontBuild = true;
dontStrip = true;
installPhase = ''
mkdir -p $out/bin
cp ${pname} $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
alsa-lib # 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/${pname}
'';
meta = with lib; {
inherit homepage;
description = "Editor for the ${brand} ${type} digital mixer";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = platforms.linux;
maintainers = [ maintainers.magnetophon ];
};
}