From cb77c77f5a769ecca179ff51dfb8329df0fb5496 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Mon, 5 Feb 2024 12:27:34 +0100 Subject: [PATCH] libsForQt5.quickflux: init at 1.1-unstable-2020-11-10 --- .../libraries/quickflux/default.nix | 64 +++++++++++++++++++ pkgs/top-level/qt5-packages.nix | 2 + 2 files changed, 66 insertions(+) create mode 100644 pkgs/development/libraries/quickflux/default.nix diff --git a/pkgs/development/libraries/quickflux/default.nix b/pkgs/development/libraries/quickflux/default.nix new file mode 100644 index 000000000000..9f56e6793191 --- /dev/null +++ b/pkgs/development/libraries/quickflux/default.nix @@ -0,0 +1,64 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, qtbase +, qtquickcontrols2 +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "quickflux"; + version = "1.1-unstable-2020-11-10"; + + src = fetchFromGitHub { + owner = "benlau"; + repo = "quickflux"; + rev = "2a37acff0416c56cb349e5bc1b841b25ff1bb6f8"; + hash = "sha256-c0W3Qj8kY6hMcMy/v5xhwJF9+muZjotmJqhbjqQVab0="; + }; + + outputs = [ + "out" + "dev" + ]; + + postPatch = '' + # Don't hardcode static linking, let stdenv decide + # Use GNUInstallDirs + substituteInPlace CMakeLists.txt \ + --replace-fail 'quickflux STATIC' 'quickflux' \ + --replace-fail 'DESTINATION include' 'DESTINATION ''${CMAKE_INSTALL_INCLUDEDIR}' + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + qtbase + qtquickcontrols2 + ]; + + # Only a QML module + dontWrapQtApps = true; + + cmakeFlags = [ + (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) + ]; + + preFixup = '' + # Has extra $out in includes list, breaks usage of module (complains about non-existent path in module includes) + substituteInPlace $out/lib/cmake/QuickFlux/QuickFluxTargets.cmake \ + --replace "\''${_IMPORT_PREFIX}/include" '${placeholder "dev"}/include' + ''; + + meta = with lib; { + description = "A Flux implementation for QML"; + homepage = "https://github.com/benlau/quickflux"; + license = licenses.asl20; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = platforms.unix; + }; +}) diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index decb95383438..d5387c441e5c 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -245,6 +245,8 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP quazip = callPackage ../development/libraries/quazip { }; + quickflux = callPackage ../development/libraries/quickflux { }; + qscintilla = callPackage ../development/libraries/qscintilla { }; qwt = callPackage ../development/libraries/qwt/default.nix { };