From 748a08728e64cedca5520eceb117eee8de282cf9 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Tue, 9 Aug 2022 10:21:31 -0400 Subject: [PATCH] touchosc: init at 1.1.4.143 --- pkgs/applications/audio/touchosc/default.nix | 108 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 110 insertions(+) create mode 100644 pkgs/applications/audio/touchosc/default.nix diff --git a/pkgs/applications/audio/touchosc/default.nix b/pkgs/applications/audio/touchosc/default.nix new file mode 100644 index 000000000000..1a2cc43e4d88 --- /dev/null +++ b/pkgs/applications/audio/touchosc/default.nix @@ -0,0 +1,108 @@ +{ 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"; + version = "1.1.4.143"; + + 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 = { + aarch64-linux = "sha256-BLPTCaFtsvYzesFvOJVCCofgRVpT2hCvrpYbceh95J4="; + armv7l-linux = "sha256-RpHAXj2biZDqeE9xy3Q+fcGTIvCXfTJNn/jMObfL44g="; + x86_64-linux = "sha256-CD8JR1QVMBe//MyrNfo8RE1ogoVU0H87IU5rTg5rDAU="; + }.${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 + ''; + + 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"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bb4f26a9956c..6b7ba79ca852 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35678,6 +35678,8 @@ with pkgs; thinkfan = callPackage ../tools/system/thinkfan { }; + touchosc = callPackage ../applications/audio/touchosc {}; + tp-auto-kbbl = callPackage ../tools/system/tp-auto-kbbl { }; tup = callPackage ../development/tools/build-managers/tup { };