From 59f24bec41c1bae7b2c2179df6d603ccbfc1851f Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Tue, 27 Dec 2022 21:22:46 +0300 Subject: [PATCH] cutecom: enable on darwin --- pkgs/tools/misc/cutecom/default.nix | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/misc/cutecom/default.nix b/pkgs/tools/misc/cutecom/default.nix index b3d412b8fda0..1d264926fd7c 100644 --- a/pkgs/tools/misc/cutecom/default.nix +++ b/pkgs/tools/misc/cutecom/default.nix @@ -1,6 +1,6 @@ -{ mkDerivation, lib, fetchFromGitLab, qtbase, qtserialport, cmake }: +{ stdenv, lib, fetchFromGitLab, qtserialport, cmake, wrapQtAppsHook }: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "cutecom"; version = "0.51.0+patch"; @@ -11,10 +11,17 @@ mkDerivation rec { sha256 = "X8jeESt+x5PxK3rTNC1h1Tpvue2WH09QRnG2g1eMoEE="; }; - buildInputs = [ qtbase qtserialport ]; - nativeBuildInputs = [ cmake ]; + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace "/Applications" "$out/Applications" + ''; - postInstall = '' + buildInputs = [ qtserialport ]; + nativeBuildInputs = [ cmake wrapQtAppsHook ]; + + postInstall = if stdenv.isDarwin then '' + mkdir -p $out/Applications + '' else '' cd .. mkdir -p "$out"/share/{applications,icons/hicolor/scalable/apps,man/man1} cp cutecom.desktop "$out/share/applications" @@ -25,8 +32,8 @@ mkDerivation rec { meta = with lib; { description = "A graphical serial terminal"; homepage = "https://gitlab.com/cutecom/cutecom/"; - license = licenses.gpl3; + license = licenses.gpl3Plus; maintainers = with maintainers; [ bennofs ]; - platforms = platforms.linux; + platforms = platforms.unix; }; }