nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, fetchFromGitHub
4, cmake
5, libqalculate
6, muparser
7, python3Packages
8, qtbase
9, qtscxml
10, qtsvg
11, wrapQtAppsHook
12, nix-update-script
13}:
14
15stdenv.mkDerivation rec {
16 pname = "albert";
17 version = "0.20.13";
18
19 src = fetchFromGitHub {
20 owner = "albertlauncher";
21 repo = "albert";
22 rev = "v${version}";
23 sha256 = "sha256-zG6XlFOzSpUSswG4kvKf2lgwUSZkzEVslgQBjzVTLYQ=";
24 fetchSubmodules = true;
25 };
26
27 nativeBuildInputs = [
28 cmake
29 wrapQtAppsHook
30 ];
31
32 buildInputs = [
33 libqalculate
34 muparser
35 qtbase
36 qtscxml
37 qtsvg
38 ] ++ (with python3Packages; [ python pybind11 ]);
39
40 postPatch = ''
41 find -type f -name CMakeLists.txt -exec sed -i {} -e '/INSTALL_RPATH/d' \;
42
43 sed -i src/nativepluginprovider.cpp \
44 -e "/QStringList dirs = {/a QFileInfo(\"$out/lib\").canonicalFilePath(),"
45 '';
46
47 postFixup = ''
48 for i in $out/{bin/.albert-wrapped,lib/albert/plugins/*.so}; do
49 patchelf $i --add-rpath $out/lib/albert
50 done
51 '';
52
53 passthru.updateScript = nix-update-script { };
54
55 meta = with lib; {
56 description = "A fast and flexible keyboard launcher";
57 longDescription = ''
58 Albert is a desktop agnostic launcher. Its goals are usability and beauty,
59 performance and extensibility. It is written in C++ and based on the Qt
60 framework.
61 '';
62 homepage = "https://albertlauncher.github.io";
63 changelog = "https://github.com/albertlauncher/albert/blob/${src.rev}/CHANGELOG.md";
64 license = licenses.gpl3Plus;
65 maintainers = with maintainers; [ ericsagnes synthetica ];
66 platforms = platforms.linux;
67 };
68}