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