nixpkgs/pkgs/applications/audio/touchosc/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

111 lines
2.2 KiB
Nix
Raw Normal View History

2022-08-09 14:21:31 +00: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-03-15 12:18:42 +00:00
version = "1.1.9.163";
2022-08-09 14:21:31 +00:00
suffix = {
aarch64-linux = "linux-arm64";
armv7l-linux = "linux-armhf";
x86_64-linux = "linux-x86_64";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
src = fetchurl {
url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.deb";
hash = {
2023-03-15 12:18:42 +00:00
aarch64-linux = "sha256-LhF0pgMRbEXeLt5g56VBNuCssaTjsczx/+C76ckmGZo=";
armv7l-linux = "sha256-T4AzXIbhO6fNN8xDFwz6M2lSH6hLgNjVyDsSt8m+Mr4=";
x86_64-linux = "sha256-LJ36kHx8PPzfLpJMx1ANSmifS84saCQ8pF0quhgzdt0=";
2022-08-09 14:21:31 +00:00
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
unpackCmd = "mkdir root; dpkg-deb -x $curSrc root";
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 15:36:28 +00:00
passthru.updateScript = ./update.sh;
2022-08-09 14:21:31 +00: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";
};
}