at 23.11-beta 78 lines 1.6 kB view raw
1{ stdenv 2, lib 3, fetchFromGitHub 4, gitUpdater 5, testers 6, cmake 7, cmake-extras 8, glib 9, gobject-introspection 10, gtest 11, intltool 12, pkg-config 13, systemd 14, vala 15}: 16 17stdenv.mkDerivation (finalAttrs: { 18 pname = "libayatana-common"; 19 version = "0.9.9"; 20 21 src = fetchFromGitHub { 22 owner = "AyatanaIndicators"; 23 repo = "libayatana-common"; 24 rev = finalAttrs.version; 25 hash = "sha256-IBLJPgi+dKZKbR0Yjr2aNjCdpY+PE1k9QLSsk++6Wqo="; 26 }; 27 28 postPatch = '' 29 # Queries via pkg_get_variable, can't override prefix 30 substituteInPlace data/CMakeLists.txt \ 31 --replace 'DESTINATION "''${SYSTEMD_USER_UNIT_DIR}"' 'DESTINATION "${placeholder "out"}/lib/systemd/user"' 32 ''; 33 34 strictDeps = true; 35 36 nativeBuildInputs = [ 37 cmake 38 gobject-introspection 39 intltool 40 pkg-config 41 vala 42 ]; 43 44 buildInputs = [ 45 cmake-extras 46 glib 47 systemd 48 ]; 49 50 checkInputs = [ 51 gtest 52 ]; 53 54 cmakeFlags = [ 55 "-DENABLE_TESTS=${lib.boolToString finalAttrs.doCheck}" 56 "-DENABLE_LOMIRI_FEATURES=OFF" 57 "-DGSETTINGS_LOCALINSTALL=ON" 58 "-DGSETTINGS_COMPILE=ON" 59 ]; 60 61 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 62 63 passthru = { 64 tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 65 updateScript = gitUpdater { }; 66 }; 67 68 meta = with lib; { 69 description = "Common functions for Ayatana System Indicators"; 70 homepage = "https://github.com/AyatanaIndicators/libayatana-common"; 71 license = licenses.gpl3Only; 72 maintainers = with maintainers; [ OPNA2608 ]; 73 platforms = platforms.linux; 74 pkgConfigModules = [ 75 "libayatana-common" 76 ]; 77 }; 78})