Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 49 lines 1.1 kB view raw
1{ stdenv 2, lib 3, fetchFromGitHub 4, cmake 5, orcania 6, systemd 7, check 8, subunit 9, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd 10}: 11 12stdenv.mkDerivation rec { 13 pname = "yder"; 14 version = "1.4.20"; 15 16 src = fetchFromGitHub { 17 owner = "babelouest"; 18 repo = pname; 19 rev = "v${version}"; 20 sha256 = "sha256-BaCF1r5mOYxj0zKc11uoKI9gVKuxWd8GaneGcV+qIFg="; 21 }; 22 23 patches = [ 24 # We set CMAKE_INSTALL_LIBDIR to the absolute path in $out, so 25 # prefix and exec_prefix cannot be $out, too 26 ./fix-pkgconfig.patch 27 ]; 28 29 nativeBuildInputs = [ cmake ]; 30 31 buildInputs = [ orcania ] 32 ++ lib.optional withSystemd systemd; 33 34 nativeCheckInputs = [ check subunit ]; 35 36 cmakeFlags = [ 37 "-DBUILD_YDER_TESTING=on" 38 ] ++ lib.optional (!withSystemd) "-DWITH_JOURNALD=off"; 39 40 doCheck = true; 41 42 meta = with lib; { 43 description = "Logging library for C applications"; 44 homepage = "https://github.com/babelouest/yder"; 45 license = licenses.lgpl21; 46 maintainers = with maintainers; [ johnazoidberg ]; 47 platforms = platforms.all; 48 }; 49}