diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/yder')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/yder/default.nix | 46 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/yder/fix-pkgconfig.patch | 9 |
2 files changed, 55 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/yder/default.nix b/nixpkgs/pkgs/development/libraries/yder/default.nix new file mode 100644 index 000000000000..82d2d20cb3ee --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/yder/default.nix @@ -0,0 +1,46 @@ +{ stdenv, lib, fetchFromGitHub, cmake, orcania, systemd, check, subunit +, withSystemd ? stdenv.isLinux +}: +assert withSystemd -> systemd != null; +stdenv.mkDerivation rec { + pname = "yder"; + version = "1.4.7"; + + src = fetchFromGitHub { + owner = "babelouest"; + repo = pname; + rev = "v${version}"; + sha256 = "19ghiwpi972wjqvlgg576nk2nkf1ii5l1kvzb056496xfmlysrwa"; + }; + + patches = [ + # We set CMAKE_INSTALL_LIBDIR to the absolute path in $out, so + # prefix and exec_prefix cannot be $out, too + ./fix-pkgconfig.patch + ]; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ orcania ] ++ lib.optional withSystemd systemd; + + checkInputs = [ check subunit ]; + + cmakeFlags = [ + "-DBUILD_YDER_TESTING=on" + ] ++ lib.optional (!withSystemd) "-DWITH_JOURNALD=off"; + + doCheck = true; + + preCheck = '' + export LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" + export DYLD_FALLBACK_LIBRARY_PATH="$(pwd):$DYLD_FALLBACK_LIBRARY_PATH" + ''; + + meta = with lib; { + description = "Logging library for C applications"; + homepage = "https://github.com/babelouest/yder"; + license = licenses.lgpl21; + maintainers = with maintainers; [ johnazoidberg ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/yder/fix-pkgconfig.patch b/nixpkgs/pkgs/development/libraries/yder/fix-pkgconfig.patch new file mode 100644 index 000000000000..61a67c5897b8 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/yder/fix-pkgconfig.patch @@ -0,0 +1,9 @@ +--- i/libyder.pc.in ++++ w/libyder.pc.in +@@ -1,7 +1,5 @@ +-prefix=@CMAKE_INSTALL_PREFIX@ +-exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ +-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ ++libdir=@CMAKE_INSTALL_LIBDIR@ ++includedir=@CMAKE_INSTALL_INCLUDEDIR@ |