nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 54 lines 1.2 kB view raw
1{ stdenv 2, lib 3, fetchFromGitHub 4, cmake 5, orcania 6, systemd 7, check 8, subunit 9, withSystemd ? stdenv.isLinux 10}: 11 12stdenv.mkDerivation rec { 13 pname = "yder"; 14 version = "1.4.15"; 15 16 src = fetchFromGitHub { 17 owner = "babelouest"; 18 repo = pname; 19 rev = "v${version}"; 20 sha256 = "sha256-hPAL1UngodNbQCCdKulaF5faI0JOjmWdz3q8oyPH7C4="; 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 checkInputs = [ check subunit ]; 35 36 cmakeFlags = [ 37 "-DBUILD_YDER_TESTING=on" 38 ] ++ lib.optional (!withSystemd) "-DWITH_JOURNALD=off"; 39 40 doCheck = true; 41 42 preCheck = '' 43 export LD_LIBRARY_PATH="$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" 44 export DYLD_FALLBACK_LIBRARY_PATH="$(pwd):$DYLD_FALLBACK_LIBRARY_PATH" 45 ''; 46 47 meta = with lib; { 48 description = "Logging library for C applications"; 49 homepage = "https://github.com/babelouest/yder"; 50 license = licenses.lgpl21; 51 maintainers = with maintainers; [ johnazoidberg ]; 52 platforms = platforms.all; 53 }; 54}