diff options
author | Thomas Tuegel <ttuegel@gmail.com> | 2015-08-29 17:47:49 -0500 |
---|---|---|
committer | Thomas Tuegel <ttuegel@gmail.com> | 2015-08-29 17:47:49 -0500 |
commit | b873f5bd623ae1064a5c0c7c4edb374abf84d409 (patch) | |
tree | 6e1fba8bad18470ae0311adb180d25903c90c3fa /pkgs/development/libraries/qt-5/qt-env.nix | |
parent | da6b3690297df26a83862b39f8f75da79ca78e73 (diff) | |
download | nixpkgs-b873f5bd623ae1064a5c0c7c4edb374abf84d409.tar nixpkgs-b873f5bd623ae1064a5c0c7c4edb374abf84d409.tar.gz nixpkgs-b873f5bd623ae1064a5c0c7c4edb374abf84d409.tar.bz2 nixpkgs-b873f5bd623ae1064a5c0c7c4edb374abf84d409.tar.lz nixpkgs-b873f5bd623ae1064a5c0c7c4edb374abf84d409.tar.xz nixpkgs-b873f5bd623ae1064a5c0c7c4edb374abf84d409.tar.zst nixpkgs-b873f5bd623ae1064a5c0c7c4edb374abf84d409.zip |
Add qtEnv
Diffstat (limited to 'pkgs/development/libraries/qt-5/qt-env.nix')
-rw-r--r-- | pkgs/development/libraries/qt-5/qt-env.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qt-5/qt-env.nix b/pkgs/development/libraries/qt-5/qt-env.nix new file mode 100644 index 00000000000..01ddbf31428 --- /dev/null +++ b/pkgs/development/libraries/qt-5/qt-env.nix @@ -0,0 +1,31 @@ +{ runCommand, lndir }: + +{ paths, qtbase }: + +runCommand "qt-env" { inherit paths qtbase; } '' + +mkdir -p "$out/bin" "$out/mkspecs" "$out/include" "$out/lib" "$out/share" + +cp "$qtbase/bin/qmake" "$out/bin" +cat >"$out/bin/qt.conf" <<EOF +[Paths] +Prefix = $out +Plugins = lib/qt5/plugins +Imports = lib/qt5/imports +Qml2Imports = lib/qt5/qml +Documentation = share/doc/qt5 +EOF + +for path in $paths; do + if [[ -d "$path/mkspecs" ]]; then + ${lndir}/bin/lndir -silent "$path/mkspecs" "$out/mkspecs" + + for dir in bin include lib share; do + if [[ -d "$path/$dir" ]]; then + ${lndir}/bin/lndir -silent "$path/$dir" "$out/$dir" + fi + done + fi +done + +'' |