nixpkgs/pkgs/tools/networking/cmst/default.nix
aszlig 2c024d28a2
cmst: Fix running of {pre,post}Configure
Commit 0055c6a introduced a new preConfigure hook that sets the right
qmake path. Unfortunately the mkDerivation attributes of cmst override
the whole configurePhase, so this hook isn't run at all.

I've also added running the preBuild and postBuild hooks for the sake of
completeness so that it's easier to override the derivation attributes.

This fixes the build of cmst and it now successfully compiles on my
machine.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-04-15 05:26:02 +02:00

55 lines
1.4 KiB
Nix

{ stdenv, fetchFromGitHub, qtbase, makeWrapper, libX11 }:
stdenv.mkDerivation rec {
name = "cmst-2016.01.28";
src = fetchFromGitHub {
sha256 = "1zf4jnrnbi05mrq1fnsji5zx60h1knrkr64pwcz2c7q8p59k4646";
rev = name;
repo = "cmst";
owner = "andrew-bibb";
};
buildInputs = [ qtbase makeWrapper ];
configurePhase = ''
runHook preConfigure
substituteInPlace ./cmst.pro \
--replace "/usr/bin" "$out/bin" \
--replace "/usr/share" "$out/usr/share"
substituteInPlace ./cmst.pri \
--replace "/usr/lib" "$out/lib" \
--replace "/usr/share" "$out/share"
substituteInPlace ./apps/cmstapp/cmstapp.pro \
--replace "/usr/bin" "$out/bin" \
--replace "/usr/share" "$out/share"
substituteInPlace ./apps/rootapp/rootapp.pro \
--replace "/etc" "$out/etc" \
--replace "/usr/share" "$out/share"
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
qmake PREFIX=$out
make
runHook postBuild
'';
postInstall = ''
wrapProgram $out/bin/cmst \
--prefix "QTCOMPOSE" ":" "${libX11}/share/X11/locale"
'';
meta = {
description = "QT GUI for Connman with system tray icon";
homepage = "https://github.com/andrew-bibb/cmst";
maintainers = [ stdenv.lib.maintainers.matejc ];
platforms = stdenv.lib.platforms.linux;
license = stdenv.lib.licenses.mit;
};
}