Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv 2, lib 3, fetchFromGitHub 4, gitUpdater 5, testers 6, cmake 7, glib 8, gobject-introspection 9, gtest 10, intltool 11, lomiri 12, pkg-config 13, systemd 14, vala 15}: 16 17stdenv.mkDerivation (finalAttrs: { 18 pname = "libayatana-common"; 19 version = "0.9.10"; 20 21 src = fetchFromGitHub { 22 owner = "AyatanaIndicators"; 23 repo = "libayatana-common"; 24 rev = finalAttrs.version; 25 hash = "sha256-qi3xsnZjqSz3I7O+xPxDnI91qDIA0XFJ3tCQQF84vIg="; 26 }; 27 28 postPatch = '' 29 # Queries via pkg_get_variable, can't override prefix 30 substituteInPlace data/CMakeLists.txt \ 31 --replace 'pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemd_user_unit_dir)' 'set(SYSTEMD_USER_UNIT_DIR ''${CMAKE_INSTALL_PREFIX}/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 lomiri.cmake-extras 46 glib 47 lomiri.lomiri-url-dispatcher 48 systemd 49 ]; 50 51 checkInputs = [ 52 gtest 53 ]; 54 55 cmakeFlags = [ 56 "-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}" 57 "-DENABLE_LOMIRI_FEATURES=ON" 58 "-DGSETTINGS_LOCALINSTALL=ON" 59 "-DGSETTINGS_COMPILE=ON" 60 ]; 61 62 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 63 64 passthru = { 65 tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 66 updateScript = gitUpdater { }; 67 }; 68 69 meta = with lib; { 70 description = "Common functions for Ayatana System Indicators"; 71 homepage = "https://github.com/AyatanaIndicators/libayatana-common"; 72 license = licenses.gpl3Only; 73 maintainers = with maintainers; [ OPNA2608 ]; 74 platforms = platforms.linux; 75 pkgConfigModules = [ 76 "libayatana-common" 77 ]; 78 }; 79})