From bc0bf248d365e37c6ed93f7e88975bc48c13fd73 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sat, 9 Jul 2022 23:58:27 +0300 Subject: albert: 0.17.2 -> 0.17.3 --- pkgs/applications/misc/albert/default.nix | 82 +++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 26 deletions(-) diff --git a/pkgs/applications/misc/albert/default.nix b/pkgs/applications/misc/albert/default.nix index c862872a793..1239d22f1f3 100644 --- a/pkgs/applications/misc/albert/default.nix +++ b/pkgs/applications/misc/albert/default.nix @@ -1,45 +1,75 @@ -{ mkDerivation, lib, fetchFromGitHub, makeWrapper, qtbase, - qtdeclarative, qtsvg, qtx11extras, muparser, cmake, python3, - qtcharts }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, muparser +, python3 +, qtbase +, qtcharts +, qtdeclarative +, qtgraphicaleffects +, qtsvg +, qtx11extras +, wrapQtAppsHook +, nix-update-script +}: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "albert"; - version = "0.17.2"; + version = "0.17.3"; src = fetchFromGitHub { - owner = "albertlauncher"; - repo = "albert"; - rev = "v${version}"; - sha256 = "0lpp8rqx5b6rwdpcdldfdlw5327harr378wnfbc6rp3ajmlb4p7w"; + owner = "albertlauncher"; + repo = "albert"; + rev = "v${version}"; + sha256 = "sha256-UIG6yLkIcdf5IszhNPwkBcSfZe4/CyI5shK/QPOmpPE="; fetchSubmodules = true; }; - nativeBuildInputs = [ cmake makeWrapper ]; + nativeBuildInputs = [ + cmake + wrapQtAppsHook + ]; - buildInputs = [ qtbase qtdeclarative qtsvg qtx11extras muparser python3 qtcharts ]; - - # We don't have virtualbox sdk so disable plugin - cmakeFlags = [ "-DBUILD_VIRTUALBOX=OFF" "-DCMAKE_INSTALL_LIBDIR=libs" ]; + buildInputs = [ + muparser + python3 + qtbase + qtcharts + qtdeclarative + qtgraphicaleffects + qtsvg + qtx11extras + ]; postPatch = '' - sed -i "/QStringList dirs = {/a \"$out/libs\"," \ - src/app/main.cpp - ''; + find -type f -name CMakeLists.txt -exec sed -i {} -e '/INSTALL_RPATH/d' \; - preBuild = '' - mkdir -p "$out/" - ln -s "$PWD/lib" "$out/lib" + sed -i src/app/main.cpp \ + -e "/QStringList dirs = {/a QFileInfo(\"$out/lib\").canonicalFilePath()," ''; - postBuild = '' - rm "$out/lib" + postFixup = '' + for i in $out/{bin/.albert-wrapped,lib/albert/plugins/*.so}; do + patchelf $i --add-rpath $out/lib/albert + done ''; + passthru.updateScript = nix-update-script { + attrPath = pname; + }; + meta = with lib; { - homepage = "https://albertlauncher.github.io/"; - description = "Desktop agnostic launcher"; - license = licenses.gpl3Plus; + description = "A fast and flexible keyboard launcher"; + longDescription = '' + Albert is a desktop agnostic launcher. Its goals are usability and beauty, + performance and extensibility. It is written in C++ and based on the Qt + framework. + ''; + homepage = "https://albertlauncher.github.io"; + changelog = "https://github.com/albertlauncher/albert/blob/${src.rev}/CHANGELOG.md"; + license = licenses.gpl3Plus; maintainers = with maintainers; [ ericsagnes synthetica ]; - platforms = platforms.linux; + platforms = platforms.linux; }; } -- cgit 1.4.1