Merge staging-next into staging

This commit is contained in:
Frederik Rietdijk
2019-08-14 13:46:33 +02:00
356 changed files with 10426 additions and 11723 deletions

View File

@@ -4,29 +4,30 @@ let
parquet-testing = fetchFromGitHub {
owner = "apache";
repo = "parquet-testing";
rev = "8991d0b58d5a59925c87dd2a0bdb59a5a4a16bd4";
sha256 = "00js5d1s98y3ianrvh1ggrd157yfmia4g55jx9xmfcz4a8mcbawx";
};
# Enable non-bundled uriparser
# Introduced in https://github.com/apache/arrow/pull/4092
Finduriparser_cmake = fetchurl {
url = https://raw.githubusercontent.com/apache/arrow/af4f52961209a5f1b43a19483536285c957e3bed/cpp/cmake_modules/Finduriparser.cmake;
sha256 = "1cylrw00n2nkc2c49xk9j3rrza351rpravxgpw047vimcw0sk93s";
rev = "a277dc4e55ded3e3ea27dab1e4faf98c112442df";
sha256 = "1yh5a8l4ship36hwmgmp2kl72s5ac9r8ly1qcs650xv2g9q7yhnq";
};
in
stdenv.mkDerivation rec {
name = "arrow-cpp-${version}";
version = "0.13.0";
version = "0.14.1";
src = fetchurl {
url = "mirror://apache/arrow/arrow-${version}/apache-arrow-${version}.tar.gz";
sha256 = "06irh5zx6lc7jjf6hpz1vzk0pvbdx08lcirc8cp8ksb8j7fpfamc";
sha256 = "0a0xrsbr7dd1yp34yw82jw7psfkfvm935jhd5mam32vrsjvdsj4r";
};
sourceRoot = "apache-arrow-${version}/cpp";
ARROW_JEMALLOC_URL = fetchurl {
# From
# ./cpp/cmake_modules/ThirdpartyToolchain.cmake
# ./cpp/thirdparty/versions.txt
url = "https://github.com/jemalloc/jemalloc/releases/download/5.2.0/jemalloc-5.2.0.tar.bz2";
sha256 = "1d73a5c5qdrwck0fa5pxz0myizaf3s9alsvhiqwrjahdlr29zgkl";
};
patches = [
# patch to fix python-test
./darwin.patch
@@ -42,8 +43,6 @@ stdenv.mkDerivation rec {
preConfigure = ''
substituteInPlace cmake_modules/FindLz4.cmake --replace CMAKE_STATIC_LIBRARY CMAKE_SHARED_LIBRARY
cp ${Finduriparser_cmake} cmake_modules/Finduriparser.cmake
patchShebangs build-support/
# Fix build for ARROW_USE_SIMD=OFF
@@ -64,7 +63,7 @@ stdenv.mkDerivation rec {
PARQUET_TEST_DATA = if doInstallCheck then "${parquet-testing}/data" else null;
installCheckInputs = [ perl which ];
installCheckPhase = (stdenv.lib.optionalString stdenv.isDarwin ''
for f in release/*-test; do
for f in release/*test; do
install_name_tool -add_rpath "$out"/lib "$f"
done
'') + ''

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "actor-framework-${version}";
version = "0.16.3";
version = "0.17.0";
src = fetchFromGitHub {
owner = "actor-framework";
repo = "actor-framework";
rev = "${version}";
sha256 = "0nqw1cv7wxbcn2qwm08qffb6k4n3kgvdiaphks5gjgm305jk4vnx";
sha256 = "10dcpmdsfq6r7hpvg413pqi1q3rjvgn7f87c17ghyz30x6rjhaic";
};
nativeBuildInputs = [ cmake ];

View File

@@ -1,14 +1,14 @@
{ stdenv, fetchFromGitHub, cmake, boost, brigand, catch2 }:
stdenv.mkDerivation rec {
name = "fcppt-${version}";
version = "3.0.0";
pname = "fcppt";
version = "3.2.2";
src = fetchFromGitHub {
owner = "freundlich";
repo = "fcppt";
rev = version;
sha256 = "0l78fjhy9nl3afrf0da9da4wzp1sx3kcyc2j6b71i60kvk44v4in";
sha256 = "09mah52m3lih2n0swpsh8qb72yzl4nixaq99xp7wxyxxprhf4bpa";
};
nativeBuildInputs = [ cmake ];

View File

@@ -6,12 +6,7 @@
callPackage ./generic.nix (args // rec {
version = "${branch}";
branch = "4.1.4";
sha256 = "01w44ygm5bvc243hlhfnvb2lxfb0blz2cxnphxqgw30vj3c1prx7";
patches = [(fetchpatch { # remove on update
name = "fix-hardcoded-tables.diff";
url = "http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/c8232e50074f";
sha256 = "0jlksks4fjajby8fjk7rfp414gxfdgd6q9khq26i52xvf4kg2dw6";
})];
branch = "4.2";
sha256 = "1f3glany3p2j832a9wia5vj8ds9xpm0xxlyia91y17hy85gxwsrh";
darwinFrameworks = [ Cocoa CoreMedia VideoToolbox ];
})

View File

@@ -1,12 +1,12 @@
{ stdenv, fetchurl, cmake, vtk }:
{ stdenv, fetchurl, cmake, vtk, darwin }:
stdenv.mkDerivation rec {
version = "3.0.0";
version = "3.0.1";
name = "gdcm-${version}";
src = fetchurl {
url = "mirror://sourceforge/gdcm/${name}.tar.bz2";
sha256 = "1rhblnl0q4bl3hmanz4ckv5kzdrzdiqp9xlcqh8df3rfrgk4d81x";
sha256 = "1n206rr28f9ysd5yns6hc6vxwhwj1ck59p2j1wqyclm60zr84isq";
};
dontUseCmakeBuildDir = true;
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
'';
enableParallelBuilding = true;
buildInputs = [ cmake vtk ];
buildInputs = [ cmake vtk ] ++ stdenv.lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices darwin.apple_sdk.frameworks.Cocoa ];
propagatedBuildInputs = [ ];
meta = with stdenv.lib; {

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "glbinding";
version = "3.0.2";
version = "3.1.0";
src = fetchFromGitHub {
owner = "cginternals";
repo = pname;
rev = "v${version}";
sha256 = "1lvcps0n0p8gg0p2bkm5aq4b4kv8bvxlaaf4fcham2pgbgzil9d4";
sha256 = "1avd7ssms11xx7h0cm8h4pfpk55f07f1j1ybykxfgsym2chb2z08";
};
buildInputs = [ cmake libGLU xlibsWrapper ];

View File

@@ -1,11 +1,11 @@
{ stdenv, fetchurl, libunwind }:
stdenv.mkDerivation rec {
name = "gperftools-2.6.3";
name = "gperftools-2.7";
src = fetchurl {
url = "https://github.com/gperftools/gperftools/releases/download/${name}/${name}.tar.gz";
sha256 = "17zfivp6n00rlqbrx6q6h71y2f815nvlzysff1ihgk4mxpv2yjri";
sha256 = "1jb30zxmw7h9qxa8yi76rfxj4ssk60rv8n9y41m6pzqfk9lwis0y";
};
buildInputs = stdenv.lib.optional stdenv.isLinux libunwind;

View File

@@ -4,13 +4,13 @@
stdenv.mkDerivation rec {
name = "intel-gmmlib-${version}";
version = "19.2.1";
version = "19.2.3";
src = fetchFromGitHub {
owner = "intel";
repo = "gmmlib";
rev = name;
sha256 = "174bpkmr20ng9h9xf9fy85lj3pw6ysmbhcvhjfmj30xg3hs2ar3k";
sha256 = "0hki53czv1na7h5b06fcwkd8bhn690ywg6dwjfs3x9fa4g48kqjb";
};
nativeBuildInputs = [ cmake ];

View File

@@ -1,11 +1,11 @@
{ stdenv, fetchurl, cmake, libX11, libuuid, xz, vtk }:
{ stdenv, fetchurl, cmake, libX11, libuuid, xz, vtk, darwin }:
stdenv.mkDerivation rec {
name = "itk-4.13.2";
name = "itk-5.0.0";
src = fetchurl {
url = mirror://sourceforge/itk/InsightToolkit-4.13.2.tar.xz;
sha256 = "19cgfpd63gqrvc3m27m394gy2d7w79g5y6lvznb5qqr49lihbgns";
url = mirror://sourceforge/itk/InsightToolkit-5.0.0.tar.xz;
sha256 = "0bs63mk4q8jmx38f031jy5w5n9yy5ng9x8ijwinvjyvas8cichqi";
};
cmakeFlags = [
@@ -21,13 +21,12 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
nativeBuildInputs = [ cmake xz ];
buildInputs = [ libX11 libuuid vtk ];
buildInputs = [ libX11 libuuid vtk ] ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ];
meta = {
description = "Insight Segmentation and Registration Toolkit";
homepage = http://www.itk.org/;
license = stdenv.lib.licenses.asl20;
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux ++ darwin;
};
}

View File

@@ -1,17 +1,24 @@
{ autoconf, automake, fetchgit, libtool, stdenv, openssl }:
{ stdenv, fetchFromGitHub
, autoconf
, automake
, libtool
, openssl
}:
let version = "1.8"; in
stdenv.mkDerivation rec {
pname = "libetpan";
version = "1.9.3";
stdenv.mkDerivation {
name = "libetpan-${version}";
src = fetchgit {
url = "git://github.com/dinhviethoa/libetpan";
rev = "refs/tags/" + version;
sha256 = "09xqy1n18qn63x7idfrpwm59lfkvb1p5vxkyksywvy4f6mn4pyxk";
src = fetchFromGitHub {
owner = "dinhviethoa";
repo = "libetpan";
rev = version;
sha256 = "19g4qskg71jv7sxfxsdkjmrxk9mk5kf9b6fhw06g6wvm3205n95f";
};
buildInputs = [ autoconf automake libtool openssl ];
nativeBuildInputs = [ libtool autoconf automake ];
buildInputs = [ openssl ];
configureScript = "./autogen.sh";

View File

@@ -9,11 +9,11 @@
stdenv.mkDerivation rec {
pname = "libfilezilla";
version = "0.17.1";
version = "0.18.0";
src = fetchurl {
url = "https://download.filezilla-project.org/${pname}/${pname}-${version}.tar.bz2";
sha256 = "1cnkcl9vif5lz1yx813qrphlpc6gvmzxdmkbd17kh5jqiqdi9vyk";
sha256 = "0g4zbyvnxs4db3l5pqazyk42ahvwdqfz2222dbkl8zygblxncyjp";
};
nativeBuildInputs = [ pkgconfig ];

View File

@@ -34,7 +34,6 @@ stdenv.mkDerivation rec {
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
configureFlags = [
"--disable-static"
"--disable-openssl"
"--without-cython"
];

View File

@@ -0,0 +1,54 @@
{ stdenv, fetchFromGitHub, automake, autoconf, libtool, pkgconfig
, libusb
, readline
}:
stdenv.mkDerivation rec {
pname = "libirecovery";
version = "2019-01-28";
src = fetchFromGitHub {
owner = "libimobiledevice";
repo = pname;
rev = "5da2a0d7d60f79d93c283964888c6fbbc17be1a3";
sha256 = "0fqmr1h4b3qn608dn606y7aqv3bsm949gx72b5d6433xlw9b23n8";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [
autoconf
automake
libtool
pkgconfig
];
buildInputs = [
libusb
readline
];
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
# Packager note: Not clear whether this needs a NixOS configuration,
# as only the `idevicerestore` binary was tested so far (which worked
# without further configuration).
configureFlags = [
"--with-udevrulesdir=${placeholder ''out''}/lib/udev/rules.d"
''--with-udevrule="OWNER=\"root\", GROUP=\"myusergroup\", MODE=\"0660\""''
];
meta = with stdenv.lib; {
homepage = https://github.com/libimobiledevice/libirecovery;
description = "Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux";
longDescription = ''
libirecovery is a cross-platform library which implements communication to
iBoot/iBSS found on Apple's iOS devices via USB. A command-line utility is also
provided.
'';
license = licenses.lgpl21;
# Upstream description says it works on more platforms, but packager hasn't tried that yet
platforms = platforms.linux;
maintainers = with maintainers; [ nh2 ];
};
}

View File

@@ -1,7 +1,7 @@
{ stdenv, fetchurl, qt4, pkgconfig, libsamplerate, fftwSinglePrec, which, cmake
, darwin }:
let version = "1.0.9"; in
let version = "1.1.0"; in
stdenv.mkDerivation rec {
name = "liblastfm-${version}";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://github.com/lastfm/liblastfm/tarball/${version}";
name = "${name}.tar.gz";
sha256 = "09qiaxsxw6g2m7mvkffpfsi5wis8nl1x4lgnk0sa30859z54iw53";
sha256 = "1j34xc30vg7sfszm2jx9mlz9hy7p1l929fka9wnfcpbib8gfi43x";
};
prefixKey = "--prefix ";

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "liblcf-${version}";
version = "0.6.0";
version = "0.6.1";
src = fetchFromGitHub {
owner = "EasyRPG";
repo = "liblcf";
rev = version;
sha256 = "1nhwwb32c3x0y82s0w93k0xz8h6xsd0sb4r1a0my8fd8p5rsnwbi";
sha256 = "18kx9h004bncyi0hbj6vrc7f4k8l1rwp96cwncv3xm0lwspj0vyl";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];

View File

@@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
_name = "liblockfile";
version = "1.14";
version = "1.15";
name = "${_name}-${version}";
src = fetchurl {
url = "mirror://debian/pool/main/libl/${_name}/${_name}_${version}.orig.tar.gz";
sha256 = "0q6hn78fnzr6lhisg85a948rmpsd9rx67skzx3vh9hnbx2ix8h5b";
sha256 = "04ml9isvdl72fbr1825x7jb680xp8aprdq4pag32ahyjqk909cmh";
};
preConfigure = ''

View File

@@ -0,0 +1,29 @@
{ stdenv, fetchFromGitHub
, cmake, pkgconfig }:
stdenv.mkDerivation rec {
pname = "libmodule";
version = "4.2.0";
src = fetchFromGitHub {
owner = "FedeDP";
repo = "libmodule";
rev = version;
sha256 = "1qn54pysdm0q7v1gnisd43i5i4ylf8s8an77jk6jd8qimysv08mx";
};
nativeBuildInputs = [
cmake
pkgconfig
];
meta = with stdenv.lib; {
description = "C simple and elegant implementation of an actor library";
homepage = https://github.com/FedeDP/libmodule;
platforms = platforms.linux;
license = licenses.mit;
maintainers = with maintainers; [
eadwu
];
};
}

View File

@@ -1,31 +1,36 @@
{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook, glib, db, pkgconfig }:
{ stdenv, fetchurl, fetchFromGitHub
, autoreconfHook
, glib
, db
, pkgconfig
}:
let
modelData = fetchurl {
url = "mirror://sourceforge/libpinyin/models/model14.text.tar.gz";
sha256 = "0qqk30nflj07zjhs231c95ln4yj4ipzwxxiwrxazrg4hb8bhypqq";
url = "mirror://sourceforge/libpinyin/models/model17.text.tar.gz";
sha256 = "1kb2nswpsqlk2qm5jr7vqcp97f2dx7nvpk24lxjs1g12n252f5z0";
};
in
stdenv.mkDerivation rec {
name = "libpinyin-${version}";
version = "2.1.91";
nativeBuildInputs = [ autoreconfHook glib db pkgconfig ];
postUnpack = ''
tar -xzf ${modelData} -C $sourceRoot/data
'';
version = "2.3.0";
src = fetchFromGitHub {
owner = "libpinyin";
repo = "libpinyin";
rev = version;
sha256 = "0jbvn65p3zh0573hh27aasd3qly5anyfi8jnps2dxi0my09wbrq3";
sha256 = "14fkpp16s5k0pbw5wwd24pqr0qbdjgbl90n9aqwx72m03n7an40l";
};
postUnpack = ''
tar -xzf ${modelData} -C $sourceRoot/data
'';
nativeBuildInputs = [ autoreconfHook glib db pkgconfig ];
meta = with stdenv.lib; {
description = "Library for intelligent sentence-based Chinese pinyin input method";
homepage = https://sourceforge.net/projects/libpinyin;
homepage = "https://sourceforge.net/projects/libpinyin";
license = licenses.gpl2;
maintainers = with maintainers; [ ericsagnes ];
platforms = platforms.linux;

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "librealsense-${version}";
version = "2.21.0";
version = "2.23.0";
src = fetchFromGitHub {
owner = "IntelRealSense";
repo = "librealsense";
rev = "v${version}";
sha256 = "0fg4js390gj9lhyh9hmr7k3lhg5q1r47skyvziv9dmbj9dqm1ll7";
sha256 = "055fvfmkfi71bk7yxa527awq5qrq4dni5xhlaldhak2vlis8glwk";
};
buildInputs = [

View File

@@ -1,19 +1,28 @@
{ stdenv, fetchurl, pkgconfig, gnutls, zlib }:
{ stdenv, fetchFromGitHub
, autoreconfHook
, gnutls
, openssl
, pkgconfig
, zlib
}:
stdenv.mkDerivation rec {
name = "librelp-1.3.0";
pname = "librelp";
version = "1.4.0";
src = fetchurl {
url = "http://download.rsyslog.com/librelp/${name}.tar.gz";
sha256 = "1xg99ndn65984mrh30qvys5npc73ag4348whshghrcj9azya494z";
src = fetchFromGitHub {
owner = "rsyslog";
repo = "librelp";
rev = "v${version}";
sha256 = "1q0k8zm7p6wpkri419kkpz734lp1hnxfqx1aa3xys4pj7zgx9jck";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gnutls zlib ];
nativeBuildInputs = [ pkgconfig autoreconfHook ];
buildInputs = [ gnutls zlib openssl ];
meta = with stdenv.lib; {
homepage = https://www.librelp.com/;
description = "A reliable logging library";
homepage = "https://www.librelp.com/";
license = licenses.gpl2;
platforms = platforms.linux;
};

View File

@@ -0,0 +1,30 @@
{stdenv, fetchgit, gettext, python, elfutils}:
stdenv.mkDerivation {
pname = "libsystemtap";
version = "3.2";
src = fetchgit {
url = git://sourceware.org/git/systemtap.git;
rev = "4051c70c9318c837981384cbb23f3e9eb1bd0892";
sha256 = "0sd8n3j3rishks3gyqj2jyqhps7hmlfjyz8i0w8v98cczhhh04rq";
fetchSubmodules = false;
};
dontBuild = true;
nativeBuildInputs = [ gettext python elfutils ];
installPhase = ''
mkdir -p $out/include
cp -r includes/* $out/include/
'';
meta = with stdenv.lib; {
description = "Statically defined probes development files";
homepage = "https://sourceware.org/systemtap/";
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = [ stdenv.lib.maintainers.farlion ];
};
}

View File

@@ -1,10 +1,8 @@
{ stdenv, fetchFromGitHub, cmake }:
let
version = "2.8.1";
in
stdenv.mkDerivation {
name = "libversion-${version}";
stdenv.mkDerivation rec {
pname = "libversion";
version = "2.9.0";
src = fetchFromGitHub {
owner = "repology";

View File

@@ -1,31 +1,78 @@
{ stdenv, fetchurl, pkgconfig, libX11, gtk3, intltool, gobject-introspection, gnome3 }:
{ stdenv
, fetchurl
, fetchpatch
, meson
, ninja
, pkgconfig
, gtk-doc
, docbook_xsl
, docbook_xml_dtd_412
, libX11
, glib
, gtk3
, pango
, cairo
, libXres
, libstartup_notification
, gettext
, gobject-introspection
, gnome3
}:
let
stdenv.mkDerivation rec{
pname = "libwnck";
version = "3.30.0";
in stdenv.mkDerivation rec{
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "0f9lvhm3w25046dqq8xyg7nzggxpmdriwrb661nng05a8qk0svdc";
};
version = "3.32.0";
outputs = [ "out" "dev" "devdoc" ];
outputBin = "dev";
configureFlags = [ "--enable-introspection" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1jp3p1lnwnwi6fxl2rz3166cmwzwy9vqz896anpwc3wdy9f875cm";
};
nativeBuildInputs = [ pkgconfig intltool gobject-introspection ];
propagatedBuildInputs = [ libX11 gtk3 ];
patches = [
# https://gitlab.gnome.org/GNOME/libwnck/issues/139
(fetchpatch {
url = https://gitlab.gnome.org/GNOME/libwnck/commit/0d9ff7db63af568feef8e8c566e249058ccfcb4e.patch;
sha256 = "18f78aayq9jma54v2qz3rm2clmz1cfq5bngxw8p4zba7hplyqsl9";
})
# https://gitlab.gnome.org/GNOME/libwnck/merge_requests/12
./fix-pc-file.patch
];
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "dev"}/share/gir-1.0";
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0";
nativeBuildInputs = [
meson
ninja
pkgconfig
gettext
gobject-introspection
gtk-doc
docbook_xsl
docbook_xml_dtd_412
];
buildInputs = [
libX11
libstartup_notification
pango
cairo
libXres
];
propagatedBuildInputs = [
glib
gtk3
];
mesonFlags = [
"-Dgtk_doc=true"
];
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
attrPath = "gnome3.${pname}";
attrPath = "${pname}${stdenv.lib.versions.major version}";
};
};

View File

@@ -0,0 +1,24 @@
diff --git a/meson.build b/meson.build
index 28799d8..047e523 100644
--- a/meson.build
+++ b/meson.build
@@ -72,11 +72,15 @@
pc_conf = configuration_data()
pc_conf.set('prefix', get_option('prefix'))
pc_conf.set('exec_prefix', '${prefix}')
-pc_conf.set('libdir', '${exec_prefix}/' + get_option('libdir'))
-pc_conf.set('includedir', '${prefix}/' + get_option('includedir'))
-pc_conf.set('STARTUP_NOTIFICATION_PACKAGE', STARTUP_NOTIFICATION_PACKAGE)
+pc_conf.set('libdir', '${exec_prefix}' / get_option('libdir'))
+pc_conf.set('includedir', '${prefix}' / get_option('includedir'))
+if conf.has('HAVE_' + STARTUP_NOTIFICATION_PACKAGE.to_upper().underscorify())
+ pc_conf.set('STARTUP_NOTIFICATION_PACKAGE', STARTUP_NOTIFICATION_PACKAGE)
+endif
pc_conf.set('X11_PACKAGE', X11_PACKAGE)
-pc_conf.set('XRES_PACKAGE', XRES_PACKAGE)
+if conf.has('HAVE_' + XRES_PACKAGE.to_upper().underscorify())
+ pc_conf.set('XRES_PACKAGE', XRES_PACKAGE)
+endif
pc_conf.set('VERSION', meson.project_version())
foreach pc: [PACKAGE_NAME, PACKAGE_NAME + '-uninstalled']

View File

@@ -3,14 +3,14 @@
# Based on https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD
stdenv.mkDerivation rec {
name = "live555-${version}";
version = "2019.05.29";
version = "2019.06.28";
src = fetchurl { # the upstream doesn't provide a stable URL
urls = [
"mirror://sourceforge/slackbuildsdirectlinks/live.${version}.tar.gz"
"https://download.videolan.org/contrib/live555/live.${version}.tar.gz"
];
sha256 = "08i63jr8ihn1xiq5z5n3yls3yz6li5sg0s454l56p5bcvbrw81my";
sha256 = "0pn5zhid9z8dsmwkhp2lvy84j5ahjskq1a8srdhd06hvh2w8dh2r";
};
postPatch = ''

View File

@@ -1,9 +1,9 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "matio-1.5.16";
name = "matio-1.5.17";
src = fetchurl {
url = "mirror://sourceforge/matio/${name}.tar.gz";
sha256 = "0i2g7jqbb4j8xlf1ly7gfpw5zyxmr245qf57v6w0jmwx4rfkvfj7";
sha256 = "00644612zhn53j25vj50q73kmjcrsns2lnmy99y2kavhsckmaiay";
};
meta = with stdenv.lib; {

View File

@@ -1,19 +1,21 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, icu, catch2 }:
{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, icu, catch2, ronn }:
stdenv.mkDerivation rec {
name = "nuspell-${version}";
version = "2.2.0";
version = "2.3.0";
src = fetchFromGitHub {
owner = "nuspell";
repo = "nuspell";
rev = "v${version}";
sha256 = "17khkb1sxn1p6rfql72l7a4lxafbxj0dwi95hsmyi6wajvfrg9sy";
sha256 = "0n5cajrp1fhk8p54ch3akkd9nl8b9c6wwf25980dhagcdys3vab3";
};
nativeBuildInputs = [ cmake pkgconfig ];
nativeBuildInputs = [ cmake pkgconfig ronn ];
buildInputs = [ boost icu ];
outputs = [ "out" "lib" "dev" "man" ];
enableParallelBuilding = true;
postPatch = ''
@@ -21,6 +23,10 @@ stdenv.mkDerivation rec {
ln -sf ${catch2.src} external/Catch2
'';
postInstall = ''
rm -rf $out/share/doc
'';
meta = with stdenv.lib; {
description = "Free and open source C++ spell checking library";
homepage = "https://nuspell.github.io/";

View File

@@ -1,17 +1,28 @@
{ stdenv, fetchFromGitHub, cmake }:
{ stdenv, fetchFromGitHub, cmake, check, subunit }:
stdenv.mkDerivation rec {
pname = "orcania";
version = "2.0.0";
version = "2.0.1";
src = fetchFromGitHub {
owner = "babelouest";
repo = pname;
rev = "v${version}";
sha256 = "11ihbfm7qbqf55wdi7azqx75ggd3l0n8ybyq2ikidffvmg13l4g9";
sha256 = "1kq1cpayflh4xy442q6prrkalm8lcz2cxydrp1fv8ppq1cnq4zr7";
};
nativeBuildInputs = [ cmake ];
checkInputs = [ check subunit ];
cmakeFlags = [ "-DBUILD_ORCANIA_TESTING=on" ];
doCheck = true;
preCheck = ''
export LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH"
export DYLD_FALLBACK_LIBRARY_PATH="$(pwd):$DYLD_FALLBACK_LIBRARY_PATH"
'';
meta = with stdenv.lib; {
description = "Potluck with different functions for different purposes that can be shared among C programs";
homepage = "https://github.com/babelouest/orcania";

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "apfel-${version}";
version = "3.0.3";
version = "3.0.4";
src = fetchFromGitHub {
owner = "scarrazza";
repo = "apfel";
rev = version;
sha256 = "13dvcc5ba6djflrcy5zf5ikaw8s78zd8ac6ickc0hxhbmx1gjb4j";
sha256 = "13n5ygbqvskg3qq5n4sff1nbii0li0zf1vqissai7x0hynxgy7p6";
};
buildInputs = [ gfortran lhapdf python2 ];

View File

@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "hepmc-${version}";
version = "2.06.09";
version = "2.06.10";
src = fetchurl {
url = "http://lcgapp.cern.ch/project/simu/HepMC/download/HepMC-${version}.tar.gz";
sha256 = "020sc7hzy7d6d1i6bs352hdzy5zy5zxkc33cw0jhh8s0jz5281y6";
url = "http://hepmc.web.cern.ch/hepmc/releases/HepMC-${version}.tar.gz";
sha256 = "190i9jlnwz1xpc495y0xc70s4zdqb9s2zdq1zkjy2ivl7ygdvpjs";
};
patches = [ ./in_source.patch ];
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
meta = {
description = "The HepMC package is an object oriented event record written in C++ for High Energy Physics Monte Carlo Generators";
license = stdenv.lib.licenses.gpl2;
homepage = http://lcgapp.cern.ch/project/simu/HepMC/;
homepage = http://hepmc.web.cern.ch/hepmc/;
platforms = stdenv.lib.platforms.unix;
maintainers = with stdenv.lib.maintainers; [ veprbl ];
};

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, boost, fastjet, hepmc, lhapdf, rsync, zlib }:
{ stdenv, fetchurl, boost, fastjet, hepmc2, lhapdf, rsync, zlib }:
stdenv.mkDerivation rec {
name = "pythia-${version}";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "0y8w5gdaczg8vdw63rkgjr1dcvqs2clqkdia34p30xcwgm1jgv7q";
};
buildInputs = [ boost fastjet hepmc zlib rsync lhapdf ];
buildInputs = [ boost fastjet hepmc2 zlib rsync lhapdf ];
preConfigure = ''
patchShebangs ./configure
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags = [
"--enable-shared"
"--with-hepmc2=${hepmc}"
"--with-hepmc2=${hepmc2}"
"--with-lhapdf6=${lhapdf}"
];

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, fastjet, ghostscript, gsl, hepmc, imagemagick, less, python2, texlive, yoda, which, makeWrapper }:
{ stdenv, fetchurl, fastjet, ghostscript, gsl, hepmc2, imagemagick, less, python2, texlive, yoda, which, makeWrapper }:
stdenv.mkDerivation rec {
name = "rivet-${version}";
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
xkeyval
xstring
;};
buildInputs = [ hepmc imagemagick python2 latex makeWrapper ];
buildInputs = [ hepmc2 imagemagick python2 latex makeWrapper ];
propagatedBuildInputs = [ fastjet ghostscript gsl yoda ];
preConfigure = ''
@@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-fastjet=${fastjet}"
"--with-hepmc=${hepmc}"
"--with-hepmc=${hepmc2}"
"--with-yoda=${yoda}"
];

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, boost, fastjet, gsl, hepmc, lhapdf, rivet, zlib }:
{ stdenv, fetchurl, boost, fastjet, gsl, hepmc2, lhapdf, rivet, zlib }:
stdenv.mkDerivation rec {
name = "thepeg-${version}";
@@ -9,10 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "1rmmwhk9abn9mc9j3127axjwpvymv21ld4wcivwz01pldkxh06n6";
};
buildInputs = [ boost fastjet gsl hepmc lhapdf rivet zlib ];
buildInputs = [ boost fastjet gsl hepmc2 lhapdf rivet zlib ];
configureFlags = [
"--with-hepmc=${hepmc}"
"--with-hepmc=${hepmc2}"
"--with-rivet=${rivet}"
"--without-javagui"
];

View File

@@ -5,11 +5,11 @@ assert docSupport -> doxygen != null;
stdenv.mkDerivation rec {
name = "pngpp-${version}";
version = "0.2.9";
version = "0.2.10";
src = fetchurl {
url = "mirror://savannah/pngpp/png++-${version}.tar.gz";
sha256 = "14c74fsc3q8iawf60m74xkkawkqbhd8k8x315m06qaqjcl2nmg5b";
sha256 = "1qgf8j25r57wjqlnzdkm8ya5x1bmj6xjvapv8f2visqnmcbg52lr";
};
doCheck = true;

View File

@@ -1,36 +1,27 @@
{ stdenv, fetchFromGitHub, zlib, python, cmake }:
{ stdenv, fetchFromGitHub, zlib, python, cmake, pkg-config }:
stdenv.mkDerivation rec
{
name = "ptex-${version}";
version = "2.3.0";
pname = "ptex";
version = "2.3.2";
src = fetchFromGitHub {
owner = "wdas";
repo = "ptex";
rev = "v${version}";
sha256 = "0nfz0y66bmi6xckn1whi4sfd8i3ibln212fgm4img2z98b6vccyg";
sha256 = "1c3pdqszn4y3d86qzng8b0hqdrchnl39adq5ab30wfnrgl2hnm4z";
};
outputs = [ "bin" "dev" "out" "lib" ];
buildInputs = [ zlib python cmake ];
buildInputs = [ zlib python cmake pkg-config ];
enableParallelBuilding = true;
buildPhase = ''
mkdir -p $out
make prefix=$out
mkdir -p $bin/bin
mkdir -p $dev/include
mkdir -p $lib/lib
'';
installPhase = ''
make install
mv $out/bin $bin/
# Can be removed in the next release
# https://github.com/wdas/ptex/pull/42
patchPhase = ''
echo v${version} >version
'';
meta = with stdenv.lib; {

View File

@@ -10,6 +10,8 @@ stdenv.mkDerivation rec {
preConfigure = stdenv.lib.optionalString stdenv.isAarch32 ''
configureFlagsArray=("CFLAGS=-DJB_SP=8 -DJB_PC=9")
'' + stdenv.lib.optionalString (stdenv.hostPlatform.libc == "glibc") ''
configureFlagsArray+=("ac_cv_check_sjlj=ssjlj")
'';
meta = with stdenv.lib; {
@@ -17,6 +19,5 @@ stdenv.mkDerivation rec {
homepage = https://www.gnu.org/software/pth;
license = licenses.lgpl21Plus;
platforms = platforms.all;
broken = stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isAarch64;
};
}

View File

@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, gtk3, qtbase, qmake }:
{ mkDerivation, lib, fetchFromGitHub, pkgconfig, gtk3, qtbase, qmake }:
stdenv.mkDerivation rec {
name = "qgnomeplatform-${version}";
mkDerivation rec {
pname = "qgnomeplatform";
version = "0.5";
src = fetchFromGitHub {
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
--replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "QPlatformTheme for a better Qt application inclusion in GNOME";
homepage = https://github.com/FedoraQt/QGnomePlatform;
license = licenses.lgpl21Plus;

View File

@@ -146,6 +146,11 @@ stdenv.mkDerivation {
sed -i mkspecs/common/linux.conf \
-e "/^QMAKE_INCDIR_OPENGL/ s|$|${libGL.dev or libGL}/include|" \
-e "/^QMAKE_LIBDIR_OPENGL/ s|$|${libGL.out}/lib|"
'' +
lib.optionalString (stdenv.hostPlatform.isx86_32 && stdenv.cc.isGNU)
''
sed -i mkspecs/common/gcc-base-unix.conf \
-e "/^QMAKE_LFLAGS_SHLIB/ s/-shared/-shared -static-libgcc/"
''
);

View File

@@ -1,89 +1,74 @@
{ stdenv
, fetchurl
, fetchpatch
, fetchFromGitLab
, makeWrapper
, which
, autoconf
, help2man
, file
, pari
}:
stdenv.mkDerivation rec {
version = "1.018.1";
version = "2.023.4";
name = "sympow-${version}";
src = fetchurl {
# Original website no longer reachable
url = "mirror://sageupstream/sympow/sympow-${version}.tar.bz2";
sha256 = "0hphs7ia1wr5mydf288zvwj4svrymfpadcg3pi6w80km2yg5bm3c";
src = fetchFromGitLab {
group = "rezozer";
owner = "forks";
repo = "sympow";
rev = "v${version}";
sha256 = "0j2qdw9csbr081h8arhlx1z7ibgi5am4ndmvyc8y4hccfa8n4w1y";
};
postUnpack = ''
patchShebangs .
'';
nativeBuildInputs = [
makeWrapper
which
autoconf
help2man
file
pari
];
configurePhase = ''
runHook preConfigure
export PREFIX="$out"
export VARPREFIX="$out" # see comment on postInstall
./Configure # doesn't take any options
runHook postConfigure
'';
installPhase = ''
runHook preInstall
install -D datafiles/* --target-directory "$out/share/sympow/datafiles/"
install *.gp "$out/share/sympow/"
install -Dm755 sympow "$out/share/sympow/sympow"
install -D new_data "$out/bin/new_data"
makeWrapper "$out/share/sympow/sympow" "$out/bin/sympow" \
--run 'export SYMPOW_LOCAL="$HOME/.local/share/sympow"' \
--run 'if [ ! -d "$SYMPOW_LOCAL" ]; then
mkdir -p "$SYMPOW_LOCAL"
cp -r ${placeholder "out"}/share/sympow/* "$SYMPOW_LOCAL"
chmod -R +xw "$SYMPOW_LOCAL"
fi' \
--run 'cd "$SYMPOW_LOCAL"'
runHook postInstall
# Usually, sympow has 3 levels of caching: statically distributed in /usr/,
# shared in /var and per-user in ~/.sympow. The shared cache assumes trust in
# other users and a shared /var is not compatible with nix's approach, so we
# set VARPREFIX to the read-only $out. This effectively disables shared
# caching. See https://trac.sagemath.org/ticket/3360#comment:36 and sympow's
# README for more details on caching.
# sympow will complain at runtime about the lack of write-permissions on the
# shared cache. We pass the `-quiet` flag by default to disable this.
postInstall = ''
wrapProgram "$out/bin/sympow" --add-flags '-quiet'
'';
patches = [
# don't hardcode paths
(fetchpatch {
name = "do_not_hardcode_paths.patch";
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/sympow/patches/Configure.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
sha256 = "1611p8ra8zkxvmxn3gm2l64bd4ma4m6r4vd6vwswcic91k1fci04";
})
# bug on some platforms in combination with a newer gcc:
# https://trac.sagemath.org/ticket/11920
(fetchpatch {
name = "fix_newer_gcc1.patch";
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/sympow/patches/fpu.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
sha256 = "14gfa56w3ddfmd4d5ir9a40y2zi43cj1i4d2l2ij9l0qlqdy9jyx";
})
(fetchpatch {
name = "fix_newer_gcc2.patch";
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/sympow/patches/execlp.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
sha256 = "190gqhgz9wgw4lqwz0nwb1izc9zffx34bazsiw2a2sz94bmgb54v";
})
# fix pointer initialization bug (https://trac.sagemath.org/ticket/22862)
(fetchpatch {
name = "fix_pointer_initialization1.patch";
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/sympow/patches/initialize-tacks.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
sha256 = "02341vdbbidfs39s26vi4n5wigz619sw8fdbl0h9qsmwwhscgf85";
})
(fetchpatch {
name = "fix_pointer_initialization2.patch";
url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sympow-datafiles.patch?h=packages/sympow&id=5088e641a45b23d0385d8e63be65315129b4cf58";
sha256 = "1m0vz048layb47r1jjf7fplw650ccc9x0w3l322iqmppzmv3022a";
})
];
# Example from the README as a sanity check.
doInstallCheck = true;
installCheckPhase = ''
export HOME="$TMP/home"
mkdir -p "$HOME"
"$out/bin/sympow" -sp 2p16 -curve "[1,2,3,4,5]" | grep '8.3705'
'';
meta = with stdenv.lib; {
description = "A package to compute special values of symmetric power elliptic curve L-functions";
description = "Compute special values of symmetric power elliptic curve L-functions";
license = {
shortName = "sympow";
fullName = "Custom, BSD-like. See COPYING file.";
free = true;
};
maintainers = with maintainers; [ timokau ];
platforms = platforms.all;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,39 @@
{ stdenv, fetchurl, boost, zlib, libevent, openssl, python, pkgconfig, bison
, flex, twisted
}:
stdenv.mkDerivation rec {
pname = "thrift";
version = "0.10.0";
src = fetchurl {
url = "https://archive.apache.org/dist/thrift/${version}/${pname}-${version}.tar.gz";
sha256 = "02x1xw0l669idkn6xww39j60kqxzcbmim4mvpb5h9nz8wqnx1292";
};
#enableParallelBuilding = true; problems on hydra
# Workaround to make the python wrapper not drop this package:
# pythonFull.buildEnv.override { extraLibs = [ thrift ]; }
pythonPath = [];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
boost zlib libevent openssl python bison flex twisted
];
preConfigure = "export PY_PREFIX=$out";
# TODO: package boost-test, so we can run the test suite. (Currently it fails
# to find libboost_unit_test_framework.a.)
configureFlags = [ "--enable-tests=no" ];
doCheck = false;
meta = with stdenv.lib; {
description = "Library for scalable cross-language services";
homepage = "http://thrift.apache.org/";
license = licenses.asl20;
platforms = platforms.linux ++ platforms.darwin;
maintainers = [ maintainers.bjornfor ];
};
}

View File

@@ -1,11 +1,11 @@
{ stdenv, fetchurl, cmake, pkgconfig }:
stdenv.mkDerivation rec {
name = "uid_wrapper-1.2.4";
name = "uid_wrapper-1.2.7";
src = fetchurl {
url = "mirror://samba/cwrap/${name}.tar.gz";
sha256 = "1yjhrm3rcyiykkrgpifmig117mzjxrms75kp8gpp8022f59zcq1w";
sha256 = "0mpzr70n24b0khri89hipxiqqay370m93syhnywrdmdxr3dhw2d8";
};
nativeBuildInputs = [ cmake pkgconfig ];

View File

@@ -59,6 +59,16 @@ stdenv.mkDerivation rec {
name = "CVE-2018-19841.patch";
sha256 = "08gx5xx51bi86cqqy7cv1d25k669a7wnkksasjspphwkpwkcxymy";
})
(fetchpatch {
url = "https://github.com/dbry/WavPack/commit/f68a9555b548306c5b1ee45199ccdc4a16a6101b.patch";
name = "CVE-2019-1010317.patch";
sha256 = "0v748nd9408v6ah37cn8wr0k0m0ny1g884q8q92j1dhwad69kfid";
})
(fetchpatch {
url = "https://github.com/dbry/WavPack/commit/33a0025d1d63ccd05d9dbaa6923d52b1446a62fe.patch";
name = "CVE-2019-1010319.patch";
sha256 = "011sqdgpykilaj2c4ns298z7aad03yprpva0dqr39nx88ji6jnrb";
})
];
meta = with stdenv.lib; {

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "wolfssl-${version}";
version = "4.0.0";
version = "4.1.0";
src = fetchFromGitHub {
owner = "wolfSSL";
repo = "wolfssl";
rev = "v${version}-stable";
sha256 = "155lmgz81ky0x04c8m2yzlsm58i9jk6hiw1ajc3wizvbpczbca57";
sha256 = "16d1dzbdx6x7czbxf6i1rlb5mv59yzzpnha7qgwab3yq62rlsgw3";
};
configureFlags = [ "--enable-all" ];

View File

@@ -4,28 +4,19 @@
assert withSystemd -> systemd != null;
stdenv.mkDerivation rec {
pname = "yder";
version = "1.4.6";
version = "1.4.7";
src = fetchFromGitHub {
owner = "babelouest";
repo = pname;
rev = "v${version}";
sha256 = "0j46v93vn130gjcr704rkdiibbk3ampzsqb6xdcrn4x115gwyf5i";
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
# - ORCANIA_LIBRARIES must be set before target_link_libraries is called
# - librt is not available, nor needed on Darwin
# - The test binary is not linked against all necessary libraries
# - Test for journald logging is not systemd specific and fails on darwin
# - If the working directory is different from the build directory, the
# dynamic linker can't find libyder
# - Return correct error code from y_init_logs when journald is disabled
./fix-darwin.patch
];
nativeBuildInputs = [ cmake ];
@@ -42,6 +33,7 @@ stdenv.mkDerivation rec {
preCheck = ''
export LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH"
export DYLD_FALLBACK_LIBRARY_PATH="$(pwd):$DYLD_FALLBACK_LIBRARY_PATH"
'';
meta = with lib; {

View File

@@ -1,159 +0,0 @@
diff --git i/CMakeLists.txt w/CMakeLists.txt
index 036ab73..0bab8c7 100644
--- i/CMakeLists.txt
+++ w/CMakeLists.txt
@@ -87,33 +87,6 @@ else()
set(DISABLE_JOURNALD ON)
endif ()
-# shared library
-
-add_library(yder SHARED ${LIB_SRC})
-if (NOT MSVC)
- set_target_properties(yder PROPERTIES
- COMPILE_OPTIONS -Wextra
- PUBLIC_HEADER "${INC_DIR}/yder.h;${PROJECT_BINARY_DIR}/yder-cfg.h"
- VERSION "${LIBRARY_VERSION}"
- SOVERSION "${LIBRARY_SOVERSION}")
-endif()
-if (WIN32)
- set_target_properties(yder PROPERTIES SUFFIX "-${LIBRARY_VERSION_MAJOR}.dll")
-endif ()
-
-target_link_libraries(yder ${LIBS} ${ORCANIA_LIBRARIES} ${SYSTEMD_LIBRARIES})
-
-# static library
-
-option(BUILD_STATIC "Build static library." OFF)
-
-if (BUILD_STATIC)
- add_library(yder_static STATIC ${LIB_SRC})
- target_compile_definitions(yder_static PUBLIC -DO_STATIC_LIBRARY)
- set_target_properties(yder_static PROPERTIES
- OUTPUT_NAME yder)
-endif ()
-
option (SEARCH_ORCANIA "Search for Orcania library" ON)
if (SEARCH_ORCANIA)
set(Orcania_FIND_QUIETLY ON) # force to find Orcania quietly
@@ -145,6 +118,33 @@ else ()
set(PKGCONF_REQ_PRIVATE "liborcania")
endif ()
+# shared library
+
+add_library(yder SHARED ${LIB_SRC})
+if (NOT MSVC)
+ set_target_properties(yder PROPERTIES
+ COMPILE_OPTIONS -Wextra
+ PUBLIC_HEADER "${INC_DIR}/yder.h;${PROJECT_BINARY_DIR}/yder-cfg.h"
+ VERSION "${LIBRARY_VERSION}"
+ SOVERSION "${LIBRARY_SOVERSION}")
+endif()
+if (WIN32)
+ set_target_properties(yder PROPERTIES SUFFIX "-${LIBRARY_VERSION_MAJOR}.dll")
+endif ()
+
+target_link_libraries(yder ${LIBS} ${ORCANIA_LIBRARIES} ${SYSTEMD_LIBRARIES})
+
+# static library
+
+option(BUILD_STATIC "Build static library." OFF)
+
+if (BUILD_STATIC)
+ add_library(yder_static STATIC ${LIB_SRC})
+ target_compile_definitions(yder_static PUBLIC -DO_STATIC_LIBRARY)
+ set_target_properties(yder_static PROPERTIES
+ OUTPUT_NAME yder)
+endif ()
+
# build yder-cfg.h file
configure_file(${INC_DIR}/yder-cfg.h.in ${PROJECT_BINARY_DIR}/yder-cfg.h)
set (CMAKE_EXTRA_INCLUDE_FILES ${PROJECT_BINARY_DIR})
@@ -168,10 +168,9 @@ if (BUILD_YDER_TESTING)
set(CMAKE_CTEST_COMMAND ctest -V)
set(TST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/test)
- set(LIBS yder ${LIBS} ${CHECK_LIBRARIES})
if (NOT WIN32)
find_package(Threads REQUIRED)
- set(LIBS ${LIBS} ${SUBUNIT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} m rt)
+ set(LIBS yder ${LIBS} ${SUBUNIT_LIBRARIES} ${ORCANIA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CHECK_LIBRARIES} m)
endif ()
set(TESTS yder_test)
@@ -186,7 +185,6 @@ if (BUILD_YDER_TESTING)
target_include_directories(${t} PUBLIC ${TST_DIR})
target_link_libraries(${t} PUBLIC ${LIBS})
add_test(NAME ${t}
- WORKING_DIRECTORY ${TST_DIR}
COMMAND ${t})
endforeach ()
endif ()
diff --git i/src/yder.c w/src/yder.c
index 3122e3f..79e4e70 100644
--- i/src/yder.c
+++ w/src/yder.c
@@ -236,11 +236,12 @@ static int y_write_log(const char * app_name,
if (cur_mode & Y_LOG_MODE_SYSLOG) {
y_write_log_syslog(cur_app_name, level, message);
}
- #ifndef Y_DISABLE_JOURNALD
+#endif
+
+#if !defined(_WIN32) && !defined(Y_DISABLE_JOURNALD)
if (cur_mode & Y_LOG_MODE_JOURNALD) {
y_write_log_journald(cur_app_name, level, message);
}
- #endif
#endif
if (cur_mode & Y_LOG_MODE_FILE) {
y_write_log_file(cur_app_name, now, cur_log_file, level, message);
@@ -266,18 +267,20 @@ static int y_write_log(const char * app_name,
*/
int y_init_logs(const char * app, const unsigned long init_mode, const unsigned long init_level, const char * init_log_file, const char * message) {
#ifdef _WIN32
- if (init_mode & Y_LOG_MODE_SYSLOG) {
- perror("syslog mode not supported on your architecture");
- return 0;
- } else if (init_mode & Y_LOG_MODE_JOURNALD) {
- perror("journald mode not supported on your architecture");
- return 0;
- } else {
- return y_write_log(app, init_mode, init_level, init_log_file, NULL, NULL, Y_LOG_LEVEL_INFO, message);
- }
-#else
- return y_write_log(app, init_mode, init_level, init_log_file, NULL, NULL, Y_LOG_LEVEL_INFO, message);
+ if (init_mode & Y_LOG_MODE_SYSLOG) {
+ perror("syslog mode not supported on your architecture");
+ return 0;
+ }
#endif
+
+#if defined(_WIN32) || defined(Y_DISABLE_JOURNALD)
+ if (init_mode & Y_LOG_MODE_JOURNALD) {
+ perror("journald mode not supported on your architecture");
+ return 0;
+ }
+#endif
+
+ return y_write_log(app, init_mode, init_level, init_log_file, NULL, NULL, Y_LOG_LEVEL_INFO, message);
}
/**
diff --git i/test/yder_test.c w/test/yder_test.c
index a10fd9f..b73fb16 100644
--- i/test/yder_test.c
+++ w/test/yder_test.c
@@ -27,7 +27,11 @@ START_TEST(test_yder_init)
y_close_logs();
ck_assert_int_eq(y_init_logs("test_yder_syslog", Y_LOG_MODE_SYSLOG, Y_LOG_LEVEL_DEBUG, NULL, "third test"), 1);
y_close_logs();
+#ifndef Y_DISABLE_JOURNALD
ck_assert_int_eq(y_init_logs("test_yder_journald", Y_LOG_MODE_JOURNALD, Y_LOG_LEVEL_DEBUG, NULL, "fourth test"), 1);
+#else
+ ck_assert_int_eq(y_init_logs("test_yder_journald", Y_LOG_MODE_JOURNALD, Y_LOG_LEVEL_DEBUG, NULL, "fourth test"), 0);
+#endif
y_close_logs();
ck_assert_int_eq(y_init_logs("test_yder_file_fail", Y_LOG_MODE_FILE, Y_LOG_LEVEL_DEBUG, "/nope/nope", "second test"), 0);
}

View File

@@ -1,5 +1,20 @@
{ stdenv
, fetchurl
# Regarding static/shared libaries, the current behaviour is:
#
# - static=true, shared=true: builds both and moves .a to the .static output;
# in this case `pkg-config` auto detection will
# not work if the .static output is given as
# buildInputs to another package (#66461)
# - static=true, shared=false: builds .a only and leaves it in the main output
# - static=false, shared=true: builds shared only
#
# To get both `.a` and shared libraries in one output,
# you currently have to use
# static=false, shared=true
# and use
# .overrideAttrs (old: { dontDisableStatic = true; })
# This is because by default, upstream zlib ./configure builds both.
, static ? true
, shared ? true
}:
@@ -68,6 +83,8 @@ stdenv.mkDerivation (rec {
] ++ stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [
"-f" "win32/Makefile.gcc"
] ++ stdenv.lib.optionals shared [
# Note that as of writing (zlib 1.2.11), this flag only has an effect
# for Windows as it is specific to `win32/Makefile.gcc`.
"SHARED_MODE=1"
];