depot/third_party/nixpkgs/pkgs/desktops/plasma-5/3rdparty/addons/krunner-symbols.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

47 lines
1.3 KiB
Nix

{ lib
, stdenv
, cmake
, fetchFromGitHub
, extra-cmake-modules
, qtbase
, wrapQtAppsHook
, ki18n
, kdelibs4support
, krunner
}:
stdenv.mkDerivation rec {
pname = "krunner-symbols";
version = "1.1.0";
src = fetchFromGitHub {
owner = "domschrei";
repo = "krunner-symbols";
rev = version;
sha256 = "sha256-YsoZdPTWpk3/YERwerrVEcaf2IfGVJwpq32onhP8Exo=";
};
buildInputs = [ qtbase ki18n kdelibs4support krunner ];
nativeBuildInputs = [ cmake wrapQtAppsHook extra-cmake-modules ];
postPatch = ''
# symbols.cpp hardcodes the location of configuration files
substituteInPlace symbols.cpp \
--replace "/usr/share/config/krunner-symbol" "$out/share/config/krunner-symbol"
# change cmake flag names to output using the correct qt-plugin prefix and kservice location
substituteInPlace CMakeLists.txt \
--replace "LOCATION_PLUGIN" "KDE_INSTALL_PLUGINDIR" \
--replace "LOCATION_DESKTOP" "KDE_INSTALL_KSERVICES5DIR"
'';
cmakeFlags = [ "-DLOCATION_CONFIG=share/config" ];
meta = with lib; {
description = "Little krunner plugin (Plasma 5) to retrieve unicode symbols, or any other string, based on a corresponding keyword";
homepage = "https://github.com/domschrei/krunner-symbols";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ hqurve ];
platforms = platforms.linux;
};
}