diff options
author | Samuel Dionne-Riel <samuel@dionne-riel.com> | 2019-08-30 00:22:16 -0400 |
---|---|---|
committer | worldofpeace <worldofpeace@protonmail.ch> | 2019-10-01 01:23:10 -0400 |
commit | c52b5b8a5d3319e7e0321c57c9435b32de824cf2 (patch) | |
tree | 40a0defd9109108ca5d87a2c44d83224ea073deb /pkgs/applications/networking/irc | |
parent | dd57c164e9aa0eb8562feaa47aea7f6841bd97ca (diff) | |
download | nixlib-c52b5b8a5d3319e7e0321c57c9435b32de824cf2.tar nixlib-c52b5b8a5d3319e7e0321c57c9435b32de824cf2.tar.gz nixlib-c52b5b8a5d3319e7e0321c57c9435b32de824cf2.tar.bz2 nixlib-c52b5b8a5d3319e7e0321c57c9435b32de824cf2.tar.lz nixlib-c52b5b8a5d3319e7e0321c57c9435b32de824cf2.tar.xz nixlib-c52b5b8a5d3319e7e0321c57c9435b32de824cf2.tar.zst nixlib-c52b5b8a5d3319e7e0321c57c9435b32de824cf2.zip |
quassel: Fix use of `mkDerivation`
The `with stdenv;` would override the `mkDerivation` to be the regular one, instead of the libsForQt5 one. This simply removes the dangerous use of the all-encompassing `with`, and prefers using a more precise inherit for `lib`. See #65399 Co-authored-by: worldofpeace <worldofpeace@protonmail.ch>
Diffstat (limited to 'pkgs/applications/networking/irc')
-rw-r--r-- | pkgs/applications/networking/irc/quassel/default.nix | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pkgs/applications/networking/irc/quassel/default.nix b/pkgs/applications/networking/irc/quassel/default.nix index 6addd66ac634..d1b950a7757c 100644 --- a/pkgs/applications/networking/irc/quassel/default.nix +++ b/pkgs/applications/networking/irc/quassel/default.nix @@ -5,7 +5,7 @@ , static ? false # link statically , stdenv, fetchFromGitHub, cmake, makeWrapper, dconf -, qtbase, qtscript +, mkDerivation, qtbase, qtscript , phonon, libdbusmenu, qca-qt5 , withKDE ? true # enable KDE integration @@ -20,6 +20,7 @@ }: let + inherit (stdenv) lib; buildClient = monolithic || client; buildCore = monolithic || enableDaemon; in @@ -31,7 +32,7 @@ assert !buildClient -> !withKDE; # KDE is used by the client only let edf = flag: feature: [("-D" + feature + (if flag then "=ON" else "=OFF"))]; -in with stdenv; mkDerivation rec { +in (if !buildClient then stdenv.mkDerivation else mkDerivation) rec { name = "quassel${tag}-${version}"; version = "0.13.1"; @@ -67,13 +68,15 @@ in with stdenv; mkDerivation rec { ++ edf client "WANT_QTCLIENT" ++ edf withKDE "WITH_KDE"; - preFixup = + dontWrapQtApps = true; + + postFixup = lib.optionalString enableDaemon '' - wrapProgram "$out/bin/quasselcore" --suffix PATH : "${qtbase.bin}/bin" + wrapProgram "$out/bin/quasselcore" --suffix PATH : "${qtbase.bin}/bin" '' + lib.optionalString buildClient '' - wrapProgram "$out/bin/quassel${lib.optionalString client "client"}" \ - --prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules" + wrapQtApp "$out/bin/quassel${lib.optionalString client "client"}" \ + --prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules" ''; meta = with stdenv.lib; { |