From 93010d0ed06c2adb9d41ca80e98b69398206649a Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 21 Dec 2024 19:58:49 +0000 Subject: [PATCH] 3p/nixpkgs: openterface-qt: init --- .../by-name/op/openterface-qt/package.nix | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 third_party/nixpkgs/pkgs/by-name/op/openterface-qt/package.nix diff --git a/third_party/nixpkgs/pkgs/by-name/op/openterface-qt/package.nix b/third_party/nixpkgs/pkgs/by-name/op/openterface-qt/package.nix new file mode 100644 index 0000000000..b241127504 --- /dev/null +++ b/third_party/nixpkgs/pkgs/by-name/op/openterface-qt/package.nix @@ -0,0 +1,68 @@ +{ + lib, + stdenv, + makeDesktopItem, + copyDesktopItems, + fetchFromGitHub, + qt6, + libusb1, +}: +let + version = "0.0.5"; + description = "Openterface mini-KVM host application for linux"; +in +stdenv.mkDerivation { + pname = "openterface-qt"; + inherit version; + + src = fetchFromGitHub { + owner = "TechxArtisanStudio"; + repo = "Openterface_QT"; + rev = "v${version}"; + hash = "sha256-pe7idedtlxGGlNUvXQjIF57m2wW+WlWVM0BYOR+CxBU="; + }; + + nativeBuildInputs = [ + copyDesktopItems + qt6.wrapQtAppsHook + ]; + buildInputs = [ + libusb1 + qt6.qtbase + qt6.qtmultimedia + qt6.qtserialport + qt6.qtsvg + qt6.qmake + ]; + + enableParallelBuilding = true; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp ./openterfaceQT $out/bin/ + mkdir -p $out/share/pixmaps + cp images/icon_256.png $out/share/pixmaps/openterfaceQT.png + runHook postInstall + ''; + + desktopItems = [ + (makeDesktopItem { + name = "openterfaceQT"; + exec = "openterfaceQT"; + icon = "openterfaceQT"; + comment = description; + desktopName = "Openterface QT"; + categories = [ "Utility" ]; + }) + ]; + + meta = { + inherit description; + homepage = "https://github.com/TechxArtisanStudio/Openterface_QT"; + license = lib.licenses.agpl3Only; + mainProgram = "openterfaceQT"; + maintainers = with lib.maintainers; [ samw ]; + platforms = lib.platforms.linux; + }; +}