nixpkgs/pkgs/applications/misc/albert/default.nix
2018-12-20 10:28:45 +01:00

52 lines
1.3 KiB
Nix

{ mkDerivation, lib, fetchFromGitHub, makeWrapper, qtbase,
qtdeclarative, qtsvg, qtx11extras, muparser, cmake, python3,
qtcharts }:
mkDerivation rec {
pname = "albert";
version = "0.15.0";
src = fetchFromGitHub {
owner = "albertlauncher";
repo = "albert";
rev = "v${version}";
sha256 = "063z9yq6bsxcsqsw1n93ks5dzhzv6i252mjz1d5mxhxvgmqlfk0v";
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs = [ qtbase qtdeclarative qtsvg qtx11extras muparser python3 qtcharts ];
enableParallelBuilding = true;
# We don't have virtualbox sdk so disable plugin
cmakeFlags = [ "-DBUILD_VIRTUALBOX=OFF" "-DCMAKE_INSTALL_LIBDIR=libs" ];
postPatch = ''
sed -i "/QStringList dirs = {/a \"$out/libs\"," \
lib/albertcore/src/core/albert.cpp
'';
preBuild = ''
mkdir -p "$out/"
ln -s "$PWD/lib" "$out/lib"
'';
postBuild = ''
rm "$out/lib"
'';
postInstall = ''
wrapProgram $out/bin/albert \
--prefix XDG_DATA_DIRS : $out/share
'';
meta = with lib; {
homepage = https://albertlauncher.github.io/;
description = "Desktop agnostic launcher";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ericsagnes synthetica ];
platforms = platforms.linux;
};
}