1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 14:47:06 +00:00
nixpkgs/pkgs/development/libraries/qtscriptgenerator/default.nix
2020-04-10 17:54:53 +01:00

49 lines
1.4 KiB
Nix

{ stdenv, fetchurl, qt4 }:
stdenv.mkDerivation {
name = "qtscriptgenerator-0.1.0";
src = fetchurl {
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/qtscriptgenerator/qtscriptgenerator-src-0.1.0.tar.gz";
sha256 = "0h8zjh38n2wfz7jld0jz6a09y66dbsd2jhm4f2024qfgcmxcabj6";
};
buildInputs = [ qt4 ];
patches = [ ./qtscriptgenerator.gcc-4.4.patch ./qt-4.8.patch ];
postPatch = ''
# remove phonon stuff which causes errors (thanks to Gentoo bug reports)
sed -i "/typesystem_phonon.xml/d" generator/generator.qrc
sed -i "/qtscript_phonon/d" qtbindings/qtbindings.pro
'';
configurePhase = ''
( cd generator; qmake )
( cd qtbindings; qmake )
'';
buildPhase = ''
makeFlags="SHELL=$SHELL ''${enableParallelBuilding:+-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES}"
make $makeFlags -C generator
# Set QTDIR, see https://code.google.com/archive/p/qtscriptgenerator/issues/38
( cd generator; QTDIR=${qt4} ./generator )
make $makeFlags -C qtbindings
'';
installPhase = ''
mkdir -p $out/lib/qt4/plugins/script
cp -av plugins/script/* $out/lib/qt4/plugins/script
'';
enableParallelBuilding = true;
hardeningDisable = [ "format" ];
meta = {
description = "QtScript bindings generator";
homepage = "https://code.qt.io/cgit/qt-labs/qtscriptgenerator.git/";
inherit (qt4.meta) platforms;
license = stdenv.lib.licenses.lgpl21;
};
}