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>
This commit is contained in:
parent
dd57c164e9
commit
c52b5b8a5d
@ -5,7 +5,7 @@
|
|||||||
, static ? false # link statically
|
, static ? false # link statically
|
||||||
|
|
||||||
, stdenv, fetchFromGitHub, cmake, makeWrapper, dconf
|
, stdenv, fetchFromGitHub, cmake, makeWrapper, dconf
|
||||||
, qtbase, qtscript
|
, mkDerivation, qtbase, qtscript
|
||||||
, phonon, libdbusmenu, qca-qt5
|
, phonon, libdbusmenu, qca-qt5
|
||||||
|
|
||||||
, withKDE ? true # enable KDE integration
|
, withKDE ? true # enable KDE integration
|
||||||
@ -20,6 +20,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (stdenv) lib;
|
||||||
buildClient = monolithic || client;
|
buildClient = monolithic || client;
|
||||||
buildCore = monolithic || enableDaemon;
|
buildCore = monolithic || enableDaemon;
|
||||||
in
|
in
|
||||||
@ -31,7 +32,7 @@ assert !buildClient -> !withKDE; # KDE is used by the client only
|
|||||||
let
|
let
|
||||||
edf = flag: feature: [("-D" + feature + (if flag then "=ON" else "=OFF"))];
|
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}";
|
name = "quassel${tag}-${version}";
|
||||||
version = "0.13.1";
|
version = "0.13.1";
|
||||||
|
|
||||||
@ -67,13 +68,15 @@ in with stdenv; mkDerivation rec {
|
|||||||
++ edf client "WANT_QTCLIENT"
|
++ edf client "WANT_QTCLIENT"
|
||||||
++ edf withKDE "WITH_KDE";
|
++ edf withKDE "WITH_KDE";
|
||||||
|
|
||||||
preFixup =
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
|
postFixup =
|
||||||
lib.optionalString enableDaemon ''
|
lib.optionalString enableDaemon ''
|
||||||
wrapProgram "$out/bin/quasselcore" --suffix PATH : "${qtbase.bin}/bin"
|
wrapProgram "$out/bin/quasselcore" --suffix PATH : "${qtbase.bin}/bin"
|
||||||
'' +
|
'' +
|
||||||
lib.optionalString buildClient ''
|
lib.optionalString buildClient ''
|
||||||
wrapProgram "$out/bin/quassel${lib.optionalString client "client"}" \
|
wrapQtApp "$out/bin/quassel${lib.optionalString client "client"}" \
|
||||||
--prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules"
|
--prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user