at 25.11-pre 1.5 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitLab, 5 fetchurl, 6 fixDarwinDylibNames, 7 qtbase, 8 qmake, 9}: 10 11stdenv.mkDerivation (finalAttrs: { 12 pname = "qcustomplot"; 13 version = "2.1.1"; 14 15 srcs = [ 16 (fetchFromGitLab { 17 owner = "ecme2"; 18 repo = "QCustomPlot"; 19 tag = "v${finalAttrs.version}"; 20 hash = "sha256-BW8H/vDbhK3b8t8oB92icEBemzcdRdrIz2aKqlUi6UU="; 21 }) 22 (fetchurl { 23 url = "https://www.qcustomplot.com/release/${finalAttrs.version}/QCustomPlot-source.tar.gz"; 24 hash = "sha256-Xi0i3sd5248B81fL2yXlT7z5ca2u516ujXrSRESHGC8="; 25 }) 26 ]; 27 28 sourceRoot = "."; 29 30 buildInputs = [ qtbase ]; 31 32 nativeBuildInputs = 33 [ 34 qmake 35 ] 36 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 37 fixDarwinDylibNames 38 ]; 39 40 env.LANG = "C.UTF-8"; 41 42 qmakeFlags = [ "sharedlib/sharedlib-compilation/sharedlib-compilation.pro" ]; 43 44 dontWrapQtApps = true; 45 46 postUnpack = '' 47 cp -rv source/* . 48 cp -rv qcustomplot-source/* . 49 ''; 50 51 installPhase = '' 52 runHook preInstall 53 54 install -vDm 644 "qcustomplot.h" -t "$out/include/" 55 install -vdm 755 "$out/lib/" 56 cp -av libqcustomplot*${stdenv.hostPlatform.extensions.sharedLibrary}* "$out/lib/" 57 58 runHook postInstall 59 ''; 60 61 meta = { 62 homepage = "https://qtcustomplot.com/"; 63 description = "Qt C++ widget for plotting and data visualization"; 64 license = lib.licenses.gpl3Plus; 65 platforms = lib.platforms.unix; 66 maintainers = with lib.maintainers; [ Cryolitia ]; 67 }; 68})