7 stdenv.mkDerivation rec {
11 url = "https://qcad.org/archives/dxflib/${pname}-${version}-src.tar.gz";
12 sha256 = "0pwic33mj6bp4axai5jiyn4xqf31y0xmb1i0pcf55b2h9fav8zah";
17 dontWrapQtApps = true;
19 sed -i 's/CONFIG += staticlib/CONFIG += shared/' dxflib.pro
22 install -d -m 0755 $out/lib
23 cp -pr *${stdenv.hostPlatform.extensions.sharedLibrary}* $out/lib
24 install -d -m 0755 $out/include/dxflib
25 cp -pr src/*.h $out/include/dxflib
26 # Generate pkg-config file
27 install -d -m 0755 $out/lib/pkgconfig
28 cat << 'EOF' > $out/lib/pkgconfig/dxflib.pc
29 prefix=${placeholder "out"}
30 libdir=${placeholder "out"}/lib
31 includedir=${placeholder "out"}/include
33 Description: A C++ library for reading and writing DXF files
35 Libs: -L${placeholder "out"}/lib -ldxflib
36 Cflags: -I${placeholder "out"}/include/dxflib
42 homepage = "https://qcad.org/en/90-dxflib";
43 maintainers = with lib.maintainers; [ raskin ];
44 platforms = lib.platforms.unix;
45 description = "DXF file format library";