at master 65 lines 1.5 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 cmake, 6 qtbase, 7 qtquickcontrols2, 8}: 9 10stdenv.mkDerivation (finalAttrs: { 11 pname = "quickflux"; 12 version = "1.1-unstable-2020-11-10"; 13 14 src = fetchFromGitHub { 15 owner = "benlau"; 16 repo = "quickflux"; 17 rev = "2a37acff0416c56cb349e5bc1b841b25ff1bb6f8"; 18 hash = "sha256-c0W3Qj8kY6hMcMy/v5xhwJF9+muZjotmJqhbjqQVab0="; 19 }; 20 21 outputs = [ 22 "out" 23 "dev" 24 ]; 25 26 postPatch = '' 27 # Don't hardcode static linking, let stdenv decide 28 # Use GNUInstallDirs 29 substituteInPlace CMakeLists.txt \ 30 --replace-fail 'quickflux STATIC' 'quickflux' \ 31 --replace-fail 'DESTINATION include' 'DESTINATION ''${CMAKE_INSTALL_INCLUDEDIR}' 32 ''; 33 34 strictDeps = true; 35 36 nativeBuildInputs = [ 37 cmake 38 ]; 39 40 buildInputs = [ 41 qtbase 42 qtquickcontrols2 43 ]; 44 45 # Only a QML module 46 dontWrapQtApps = true; 47 48 cmakeFlags = [ 49 (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) 50 ]; 51 52 preFixup = '' 53 # Has extra $out in includes list, breaks usage of module (complains about non-existent path in module includes) 54 substituteInPlace $out/lib/cmake/QuickFlux/QuickFluxTargets.cmake \ 55 --replace "\''${_IMPORT_PREFIX}/include" '${placeholder "dev"}/include' 56 ''; 57 58 meta = with lib; { 59 description = "Flux implementation for QML"; 60 homepage = "https://github.com/benlau/quickflux"; 61 license = licenses.asl20; 62 maintainers = with maintainers; [ OPNA2608 ]; 63 platforms = platforms.unix; 64 }; 65})