mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
9bb3fccb5b
continuation of #109595 pkgconfig was aliased in 2018, however, it remained in all-packages.nix due to its wide usage. This cleans up the remaining references to pkgs.pkgsconfig and moves the entry to aliases.nix. python3Packages.pkgconfig remained unchanged because it's the canonical name of the upstream package on pypi.
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ stdenv
|
|
, fetchurl
|
|
, qmake
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "3.17.0";
|
|
pname = "dxflib";
|
|
src = fetchurl {
|
|
url = "http://www.qcad.org/archives/dxflib/${pname}-${version}-src.tar.gz";
|
|
sha256 = "09yjgzh8677pzkkr7a59pql5d11451c22pxksk2my30mapxsri96";
|
|
};
|
|
nativeBuildInputs = [
|
|
qmake
|
|
];
|
|
preConfigure = ''
|
|
sed -i 's/CONFIG += staticlib/CONFIG += shared/' dxflib.pro
|
|
'';
|
|
installPhase = ''
|
|
install -d -m 0755 $out/lib
|
|
cp -pr *.so* $out/lib
|
|
install -d -m 0755 $out/include/dxflib
|
|
cp -pr src/*.h $out/include/dxflib
|
|
# Generate pkg-config file
|
|
install -d -m 0755 $out/lib/pkgconfig
|
|
cat << 'EOF' > $out/lib/pkgconfig/dxflib.pc
|
|
prefix=${placeholder "out"}
|
|
libdir=${placeholder "out"}/lib
|
|
includedir=${placeholder "out"}/include
|
|
Name: dxflib
|
|
Description: A C++ library for reading and writing DXF files
|
|
Version: %{version}
|
|
Libs: -L${placeholder "out"}/lib -ldxflib
|
|
Cflags: -I${placeholder "out"}/include/dxflib
|
|
EOF
|
|
'';
|
|
doCheck = true;
|
|
|
|
meta = {
|
|
maintainers = with stdenv.lib.maintainers; [raskin];
|
|
platforms = stdenv.lib.platforms.linux;
|
|
description = "DXF file format library";
|
|
};
|
|
}
|