diff options
author | Nikolay Amiantov <ab@fmap.me> | 2017-02-03 17:46:20 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2017-02-03 18:16:51 +0300 |
commit | 99a83fbe1de57a25fc779a153075cdae7cc3e46e (patch) | |
tree | ab9d779421dbd6169c49e57f8188ff93fa00a1fb /pkgs/development/libraries | |
parent | a14217ec6ea4afbe77ec8cb5a5201095cbc188cf (diff) |
qt5.env: use buildEnv
This both simplifies the code and ensures that libraries are linked too.
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/qt-5/qt-env.nix | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/pkgs/development/libraries/qt-5/qt-env.nix b/pkgs/development/libraries/qt-5/qt-env.nix index b2b7121d51d58..fad68fbd74505 100644 --- a/pkgs/development/libraries/qt-5/qt-env.nix +++ b/pkgs/development/libraries/qt-5/qt-env.nix @@ -1,28 +1,22 @@ -{ lib, runCommand, lndir, qtbase }: name: paths: +{ lib, buildEnv, qtbase }: name: paths: -runCommand name { qtbase = qtbase.dev; paths = lib.chooseDevOutputs paths; } '' +buildEnv { + inherit name; + paths = [ qtbase ] ++ paths; -mkdir -p "$out/bin" "$out/mkspecs" "$out/include" "$out/lib" "$out/share" + pathsToLink = [ "/bin" "/mkspecs" "/include" "/lib" "/share" ]; + extraOutputsToInstall = [ "dev" ]; -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 pkg in $paths $qtbase; do - if [[ -d "$pkg/mkspecs" ]]; then - ${lndir}/bin/lndir -silent "$pkg/mkspecs" "$out/mkspecs" - - for dir in bin include lib share; do - if [[ -d "$pkg/$dir" ]]; then - ${lndir}/bin/lndir -silent "$pkg/$dir" "$out/$dir" - fi - done - fi -done -'' + postBuild = '' + rm "$out/bin/qmake" + cp "${qtbase.dev}/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 + ''; +} |