2022-08-09 16:21:31 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, makeWrapper
|
|
|
|
, autoPatchelfHook
|
|
|
|
, dpkg
|
|
|
|
, alsa-lib
|
|
|
|
, curl
|
|
|
|
, avahi
|
|
|
|
, jack2
|
|
|
|
, libxcb
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXext
|
|
|
|
, libXi
|
|
|
|
, libXinerama
|
|
|
|
, libXrandr
|
|
|
|
, libXrender
|
|
|
|
, libXxf86vm
|
|
|
|
, libglvnd
|
|
|
|
, gnome
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
runLibDeps = [
|
|
|
|
curl
|
|
|
|
avahi
|
|
|
|
jack2
|
|
|
|
libxcb
|
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXext
|
|
|
|
libXi
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
libXrender
|
|
|
|
libXxf86vm
|
|
|
|
libglvnd
|
|
|
|
];
|
|
|
|
|
|
|
|
runBinDeps = [
|
|
|
|
gnome.zenity
|
|
|
|
];
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "touchosc";
|
2023-11-15 04:29:19 +01:00
|
|
|
version = "1.2.5.183";
|
2022-08-09 16:21:31 +02:00
|
|
|
|
|
|
|
suffix = {
|
|
|
|
aarch64-linux = "linux-arm64";
|
|
|
|
armv7l-linux = "linux-armhf";
|
2023-05-24 01:43:18 +02:00
|
|
|
x86_64-linux = "linux-x64";
|
2022-08-09 16:21:31 +02:00
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.deb";
|
|
|
|
hash = {
|
2023-11-15 04:29:19 +01:00
|
|
|
aarch64-linux = "sha256-V5615E2jVqk7CcCBbW5A0JEyEi6secC0Rj8KrQpfjns=";
|
|
|
|
armv7l-linux = "sha256-0nyRffx8/OieVJTvJRtUIvrx5IyqmqEMMEZszPPDXb0=";
|
|
|
|
x86_64-linux = "sha256-oV2T7l5/3JqXXoyiR3PeYJyHQe4GcDUxsi6cNxLUcng=";
|
2022-08-09 16:21:31 +02:00
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
|
|
|
};
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
autoPatchelfHook
|
|
|
|
dpkg
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
stdenv.cc.cc.lib
|
|
|
|
alsa-lib
|
|
|
|
];
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r usr/share $out/share
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp opt/touchosc/TouchOSC $out/bin/TouchOSC
|
|
|
|
|
|
|
|
wrapProgram $out/bin/TouchOSC \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath runLibDeps} \
|
|
|
|
--prefix PATH : ${lib.makeBinPath runBinDeps}
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2022-10-21 17:36:28 +02:00
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2022-08-09 16:21:31 +02:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://hexler.net/touchosc";
|
|
|
|
description = "Next generation modular control surface";
|
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ lilyinstarlight ];
|
|
|
|
platforms = [ "aarch64-linux" "armv7l-linux" "x86_64-linux" ];
|
|
|
|
mainProgram = "TouchOSC";
|
|
|
|
};
|
|
|
|
}
|