mumble: refactor and fix Qt 5 version
* Use -rc version instead of a git checkout. Rename derivation accordingly; * Change PLUGIN_PATH similar to Arch; * Fix install phase so that random files aren't installed and plugins use separate directory; * Use linkSoVersions to remove duplicate libraries.
This commit is contained in:
parent
44884cdf29
commit
17d29239b8
@ -14,7 +14,7 @@ assert iceSupport -> zeroc_ice != null;
|
|||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
let
|
let
|
||||||
generic = overrides: source: stdenv.mkDerivation (source // overrides // {
|
generic = overrides: source: (if source.qtVersion == 5 then qt5.mkDerivation else stdenv.mkDerivation) (source // overrides // {
|
||||||
name = "${overrides.type}-${source.version}";
|
name = "${overrides.type}-${source.version}";
|
||||||
|
|
||||||
patches = (source.patches or []) ++ optional jackSupport ./mumble-jack-support.patch;
|
patches = (source.patches or []) ++ optional jackSupport ./mumble-jack-support.patch;
|
||||||
@ -26,7 +26,7 @@ let
|
|||||||
# protobuf is freezed to 3.6 because of this bug: https://github.com/mumble-voip/mumble/issues/3617
|
# protobuf is freezed to 3.6 because of this bug: https://github.com/mumble-voip/mumble/issues/3617
|
||||||
# this could be reverted to the latest version in a future release of mumble as it is already fixed in master
|
# this could be reverted to the latest version in a future release of mumble as it is already fixed in master
|
||||||
buildInputs = [ boost protobuf3_6 avahi ]
|
buildInputs = [ boost protobuf3_6 avahi ]
|
||||||
++ { qt4 = [ qt4 ]; qt5 = [ qt5.qtbase ]; }."qt${toString source.qtVersion}"
|
++ optional (source.qtVersion == 4) qt4
|
||||||
++ (overrides.buildInputs or [ ]);
|
++ (overrides.buildInputs or [ ]);
|
||||||
|
|
||||||
qmakeFlags = [
|
qmakeFlags = [
|
||||||
@ -45,20 +45,23 @@ let
|
|||||||
++ (overrides.configureFlags or [ ]);
|
++ (overrides.configureFlags or [ ]);
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
qmakeFlags="$qmakeFlags DEFINES+=PLUGIN_PATH=$out/lib"
|
qmakeFlags="$qmakeFlags DEFINES+=PLUGIN_PATH=$out/lib/mumble"
|
||||||
patchShebangs scripts
|
patchShebangs scripts
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = [ "release" ];
|
makeFlags = [ "release" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/{lib,bin}
|
runHook preInstall
|
||||||
find release -type f -not -name \*.\* -exec cp {} $out/bin \;
|
|
||||||
find release -type f -name \*.\* -exec cp {} $out/lib \;
|
|
||||||
|
|
||||||
|
${overrides.installPhase}
|
||||||
|
|
||||||
|
# doc stuff
|
||||||
mkdir -p $out/share/man/man1
|
mkdir -p $out/share/man/man1
|
||||||
cp man/mum* $out/share/man/man1
|
install -Dm644 man/mum* $out/share/man/man1/
|
||||||
'' + (overrides.installPhase or "");
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
@ -74,7 +77,7 @@ let
|
|||||||
client = source: generic {
|
client = source: generic {
|
||||||
type = "mumble";
|
type = "mumble";
|
||||||
|
|
||||||
nativeBuildInputs = optionals (source.qtVersion == 5) [ qt5.qttools ];
|
nativeBuildInputs = optional (source.qtVersion == 5) qt5.qttools;
|
||||||
buildInputs = [ libopus libsndfile speex ]
|
buildInputs = [ libopus libsndfile speex ]
|
||||||
++ optional (source.qtVersion == 5) qt5.qtsvg
|
++ optional (source.qtVersion == 5) qt5.qtsvg
|
||||||
++ optional stdenv.isLinux alsaLib
|
++ optional stdenv.isLinux alsaLib
|
||||||
@ -89,12 +92,19 @@ let
|
|||||||
NIX_CFLAGS_COMPILE = optional speechdSupport "-I${speechd}/include/speech-dispatcher";
|
NIX_CFLAGS_COMPILE = optional speechdSupport "-I${speechd}/include/speech-dispatcher";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/share/applications
|
# bin stuff
|
||||||
cp scripts/mumble.desktop $out/share/applications
|
install -Dm755 release/mumble $out/bin/mumble
|
||||||
|
install -Dm755 scripts/mumble-overlay $out/bin/mumble-overlay
|
||||||
|
|
||||||
mkdir -p $out/share/icons{,/hicolor/scalable/apps}
|
# lib stuff
|
||||||
cp icons/mumble.svg $out/share/icons
|
mkdir -p $out/lib/mumble
|
||||||
ln -s $out/share/icons/mumble.svg $out/share/icons/hicolor/scalable/apps
|
cp -P release/libmumble.so* $out/lib
|
||||||
|
cp -P release/libcelt* $out/lib/mumble
|
||||||
|
cp -P release/plugins/* $out/lib/mumble
|
||||||
|
|
||||||
|
# icons
|
||||||
|
install -Dm644 scripts/mumble.desktop $out/share/applications/mumble.desktop
|
||||||
|
install -Dm644 icons/mumble.svg $out/share/icons/hicolor/scalable/apps/mumble.svg
|
||||||
'';
|
'';
|
||||||
} source;
|
} source;
|
||||||
|
|
||||||
@ -110,6 +120,11 @@ let
|
|||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ libcap ] ++ optional iceSupport zeroc_ice;
|
buildInputs = [ libcap ] ++ optional iceSupport zeroc_ice;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
# bin stuff
|
||||||
|
install -Dm755 release/murmurd $out/bin/murmurd
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
stableSource = rec {
|
stableSource = rec {
|
||||||
@ -138,26 +153,24 @@ let
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
gitSource = rec {
|
rcSource = rec {
|
||||||
version = "2019-07-10";
|
version = "1.3.0-rc2";
|
||||||
qtVersion = 5;
|
qtVersion = 5;
|
||||||
|
|
||||||
# Needs submodules
|
# Needs submodules
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "mumble-voip";
|
owner = "mumble-voip";
|
||||||
repo = "mumble";
|
repo = "mumble";
|
||||||
rev = "41b265584654c7ac216fd3ccb9c141734d3f839b";
|
rev = version;
|
||||||
sha256 = "00irlzz5q4drmsfbwrkyy7p7w8a5fc1ip5vyicq3g3cy58dprpqr";
|
sha256 = "00irlzz5q4drmsfbwrkyy7p7w8a5fc1ip5vyicq3g3cy58dprpqr";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
mumble = client stableSource;
|
mumble = client stableSource;
|
||||||
mumble_git = client gitSource;
|
mumble_rc = client rcSource;
|
||||||
murmur = server stableSource;
|
murmur = server stableSource;
|
||||||
murmur_git = (server gitSource).overrideAttrs (old: {
|
murmur_rc = (server rcSource).overrideAttrs (old: {
|
||||||
meta = old.meta // { broken = iceSupport; };
|
meta = old.meta // { broken = iceSupport; };
|
||||||
|
|
||||||
nativeBuildInputs = old.nativeBuildInputs or [] ++ [ qt5.wrapQtAppsHook ];
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -416,6 +416,10 @@ mapAliases ({
|
|||||||
gst-plugins-good = pkgs.gst-plugins-good;
|
gst-plugins-good = pkgs.gst-plugins-good;
|
||||||
gst-plugins-ugly = pkgs.gst-plugins-ugly;
|
gst-plugins-ugly = pkgs.gst-plugins-ugly;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# added 2019-08-01
|
||||||
|
mumble_git = pkgs.mumble_rc;
|
||||||
|
murmur_git = pkgs.murmur_rc;
|
||||||
} // (with ocaml-ng; { # added 2016-09-14
|
} // (with ocaml-ng; { # added 2016-09-14
|
||||||
ocaml_4_00_1 = ocamlPackages_4_00_1.ocaml;
|
ocaml_4_00_1 = ocamlPackages_4_00_1.ocaml;
|
||||||
ocaml_4_01_0 = ocamlPackages_4_01_0.ocaml;
|
ocaml_4_01_0 = ocamlPackages_4_01_0.ocaml;
|
||||||
|
@ -19428,7 +19428,7 @@ in
|
|||||||
speechdSupport = config.mumble.speechdSupport or false;
|
speechdSupport = config.mumble.speechdSupport or false;
|
||||||
pulseSupport = config.pulseaudio or false;
|
pulseSupport = config.pulseaudio or false;
|
||||||
iceSupport = config.murmur.iceSupport or true;
|
iceSupport = config.murmur.iceSupport or true;
|
||||||
}) mumble mumble_git murmur;
|
}) mumble mumble_rc murmur;
|
||||||
|
|
||||||
inherit (callPackages ../applications/networking/mumble {
|
inherit (callPackages ../applications/networking/mumble {
|
||||||
avahi = avahi-compat;
|
avahi = avahi-compat;
|
||||||
@ -19436,7 +19436,7 @@ in
|
|||||||
speechdSupport = config.mumble.speechdSupport or false;
|
speechdSupport = config.mumble.speechdSupport or false;
|
||||||
pulseSupport = config.pulseaudio or false;
|
pulseSupport = config.pulseaudio or false;
|
||||||
iceSupport = false;
|
iceSupport = false;
|
||||||
}) murmur_git;
|
}) murmur_rc;
|
||||||
|
|
||||||
mumble_overlay = callPackage ../applications/networking/mumble/overlay.nix {
|
mumble_overlay = callPackage ../applications/networking/mumble/overlay.nix {
|
||||||
mumble_i686 = if stdenv.hostPlatform.system == "x86_64-linux"
|
mumble_i686 = if stdenv.hostPlatform.system == "x86_64-linux"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user