about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/quickflux
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-20 12:16:56 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-20 12:16:56 +0100
commitb24d64b3b1ef897f07cd072a88a9881cb330aa7f (patch)
treea87bb2eed9af3ef1efd51dd65221d91f0c949041 /nixpkgs/pkgs/development/libraries/quickflux
parent73338df7473bb3810e70a16b8b0cba4f0f606f2b (diff)
parentfa15b53dbea5028db38d6e09b4cef6eba42aeebb (diff)
downloadnixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.gz
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.bz2
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.lz
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.xz
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.zst
nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/quickflux')
-rw-r--r--nixpkgs/pkgs/development/libraries/quickflux/default.nix64
1 files changed, 64 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/quickflux/default.nix b/nixpkgs/pkgs/development/libraries/quickflux/default.nix
new file mode 100644
index 000000000000..9f56e6793191
--- /dev/null
+++ b/nixpkgs/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;
+  };
+})