diff options
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/crypto++/GNUmakefile-darwin.patch | 15 | ||||
-rw-r--r-- | pkgs/development/libraries/crypto++/default.nix | 54 | ||||
-rw-r--r-- | pkgs/development/libraries/crypto++/dll.patch | 28 | ||||
-rw-r--r-- | pkgs/development/libraries/forge/default.nix | 51 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/common.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/default.nix | 16 | ||||
-rw-r--r-- | pkgs/development/libraries/gnutls-kdh/generic.nix | 1 | ||||
-rw-r--r-- | pkgs/development/libraries/libck/default.nix | 26 | ||||
-rw-r--r-- | pkgs/development/libraries/polkit/default.nix | 19 | ||||
-rw-r--r-- | pkgs/development/libraries/srt/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/wt/default.nix | 8 |
11 files changed, 144 insertions, 80 deletions
diff --git a/pkgs/development/libraries/crypto++/GNUmakefile-darwin.patch b/pkgs/development/libraries/crypto++/GNUmakefile-darwin.patch deleted file mode 100644 index 5a6cb3bcafb4..000000000000 --- a/pkgs/development/libraries/crypto++/GNUmakefile-darwin.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/GNUmakefile b/GNUmakefile -index 4de9d10..ff4789a 100755 ---- a/GNUmakefile -+++ b/GNUmakefile -@@ -271,8 +271,8 @@ endif # OpenMP - endif # IS_LINUX - - ifneq ($(IS_DARWIN),0) --AR = libtool --ARFLAGS = -static -o -+AR = ar -+ARFLAGS = cru - CXX ?= c++ - ifeq ($(IS_GCC_29),1) - CXXFLAGS += -fno-coalesce-templates -fno-coalesce-static-vtables diff --git a/pkgs/development/libraries/crypto++/default.nix b/pkgs/development/libraries/crypto++/default.nix index cb481fc7084e..b472733f8ee6 100644 --- a/pkgs/development/libraries/crypto++/default.nix +++ b/pkgs/development/libraries/crypto++/default.nix @@ -1,49 +1,47 @@ -{ fetchFromGitHub, stdenv }: +{ stdenv, fetchFromGitHub, nasm, which }: +with stdenv.lib; stdenv.mkDerivation rec { pname = "crypto++"; - majorVersion = "5.6"; - version = "${majorVersion}.5"; + version = "8.2.0"; + underscoredVersion = strings.replaceStrings ["."] ["_"] version; src = fetchFromGitHub { owner = "weidai11"; repo = "cryptopp"; - rev = "CRYPTOPP_5_6_5"; - sha256 = "1yk7jyf4va9425cg05llskpls2jm7n3jwy2hj5jm74zkr4mwpvl7"; + rev = "CRYPTOPP_${underscoredVersion}"; + sha256 = "01zrrzjn14yhkb9fzzl57vmh7ig9a6n6fka45f8za0gf7jpcq3mj"; }; - patches = stdenv.lib.concatLists [ - (stdenv.lib.optional (stdenv.hostPlatform.system != "i686-cygwin") ./dll.patch) - (stdenv.lib.optional stdenv.hostPlatform.isDarwin ./GNUmakefile-darwin.patch) - ]; - - - configurePhase = '' - sed -i GNUmakefile \ - -e 's|-march=native|-fPIC|g' \ - -e '/^CXXFLAGS =/s|-g ||' + postPatch = '' + substituteInPlace GNUmakefile \ + --replace "AR = libtool" "AR = ar" \ + --replace "ARFLAGS = -static -o" "ARFLAGS = -cru" ''; - enableParallelBuilding = true; + nativeBuildInputs = optionals stdenv.hostPlatform.isx86 [ nasm which ]; - makeFlags = [ "PREFIX=$(out)" ]; - buildFlags = [ "libcryptopp.so" ]; - installFlags = [ "LDCONF=true" ]; + preBuild = optionalString stdenv.hostPlatform.isx86 "${stdenv.shell} rdrand-nasm.sh"; + makeFlags = [ "PREFIX=${placeholder "out"}" ]; + buildFlags = [ "shared" "libcryptopp.pc" ]; + enableParallelBuilding = true; doCheck = true; - checkPhase = "LD_LIBRARY_PATH=`pwd` make test"; - # prefer -fPIC and .so to .a; cryptotest.exe seems superfluous - postInstall = '' - rm "$out"/lib/*.a -r "$out/bin" - ln -sf "$out"/lib/libcryptopp.so.${version} "$out"/lib/libcryptopp.so.${majorVersion} + preInstall = "rm libcryptopp.a"; # built for checks but we don't install static lib into the nix store + installTargets = "install-lib"; + installFlags = [ "LDCONF=true" ]; + postInstall = optionalString (!stdenv.hostPlatform.isDarwin) '' + ln -sr $out/lib/libcryptopp.so.${version} $out/lib/libcryptopp.so.${versions.majorMinor version} + ln -sr $out/lib/libcryptopp.so.${version} $out/lib/libcryptopp.so.${versions.major version} ''; - meta = with stdenv.lib; { + meta = { description = "Crypto++, a free C++ class library of cryptographic schemes"; - homepage = http://cryptopp.com/; - license = licenses.boost; + homepage = "https://cryptopp.com/"; + changelog = "https://raw.githubusercontent.com/weidai11/cryptopp/CRYPTOPP_${underscoredVersion}/History.txt"; + license = with licenses; [ boost publicDomain ]; platforms = platforms.all; - maintainers = [ ]; + maintainers = with maintainers; [ c0bw3b ]; }; } diff --git a/pkgs/development/libraries/crypto++/dll.patch b/pkgs/development/libraries/crypto++/dll.patch deleted file mode 100644 index 12df1fb9e9e9..000000000000 --- a/pkgs/development/libraries/crypto++/dll.patch +++ /dev/null @@ -1,28 +0,0 @@ -Get rid of Windows-specific stuff. - -diff --git a/GNUmakefile b/GNUmakefile -index 4de9d10..ff4789a 100755 ---- a/GNUmakefile -+++ b/GNUmakefile -@@ -656,7 +656,7 @@ nolib: $(OBJS) - dll: cryptest.import.exe dlltest.exe - - cryptopp.dll: $(DLLOBJS) -- $(CXX) -shared -o $@ $(CXXFLAGS) $(DLLOBJS) $(LDFLAGS) $(LDLIBS) -Wl,--out-implib=libcryptopp.dll.a -+ $(CXX) -shared -o $@ $(CXXFLAGS) $(DLLOBJS) $(LDFLAGS) $(LDLIBS) - - libcryptopp.import.a: $(LIBIMPORTOBJS) - $(AR) $(ARFLAGS) $@ $(LIBIMPORTOBJS) -diff --git a/dll.cpp b/dll.cpp -index 72dade9..b5097ab 100644 ---- a/dll.cpp -+++ b/dll.cpp -@@ -48,7 +48,7 @@ NAMESPACE_END - - #endif - --#ifdef CRYPTOPP_EXPORTS -+#if defined CRYPTOPP_EXPORTS && defined _MSC_VER - - USING_NAMESPACE(CryptoPP) - diff --git a/pkgs/development/libraries/forge/default.nix b/pkgs/development/libraries/forge/default.nix new file mode 100644 index 000000000000..e6e002f16c5a --- /dev/null +++ b/pkgs/development/libraries/forge/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchFromGitHub, cmake, pkgconfig +, arrayfire, expat, fontconfig, freeimage, freetype, boost +, mesa, libGLU_combined, glfw3, SDL2, cudatoolkit +}: + +stdenv.mkDerivation rec { + pname = "forge"; + version = "1.0.4"; + + src = fetchFromGitHub { + owner = "arrayfire"; + repo = "forge"; + rev = "v${version}"; + sha256 = "00pmky6kccd7pwi8sma79qpmzr2f9pbn6gym3gyqm64yckw6m484"; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + cmake + pkgconfig + ]; + + buildInputs = [ + expat + fontconfig + freetype + boost.out + boost.dev + freeimage + mesa + libGLU_combined + glfw3 + SDL2 + cudatoolkit + arrayfire + ]; + + meta = with stdenv.lib; { + description = "An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend"; + longDescription = '' + An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend. + The goal of Forge is to provide high performance OpenGL visualizations for C/C++ applications that use CUDA/OpenCL. + Forge uses OpenGL >=3.3 forward compatible contexts, so please make sure you have capable hardware before trying it out. + ''; + license = licenses.bsd3; + homepage = "https://arrayfire.com/"; + platforms = platforms.linux; + maintainers = with maintainers; [ chessai ]; + }; + +} diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 01563ffa656e..edf4d135aba7 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -103,7 +103,7 @@ stdenv.mkDerivation ({ ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch # Remove after upgrading to glibc 2.28+ - ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) (fetchpatch { + ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform || stdenv.hostPlatform.isMusl) (fetchpatch { url = "https://sourceware.org/git/?p=glibc.git;a=patch;h=780684eb04298977bc411ebca1eadeeba4877833"; name = "correct-pwent-parsing-issue-and-resulting-build.patch"; sha256 = "08fja894vzaj8phwfhsfik6jj2pbji7kypy3q8pgxvsd508zdv1q"; diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index eda71af59783..50b359da96ce 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -40,7 +40,21 @@ callPackage ./common.nix { inherit stdenv; } { # limit rebuilds by only disabling pie w/musl ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie"; - NIX_CFLAGS_COMPILE = if withGd then "-Wno-error=stringop-truncation" else null; + NIX_CFLAGS_COMPILE = + if !stdenv.hostPlatform.isMusl + # TODO: This (returning a string or `null`, instead of a list) is to + # not trigger a mass rebuild due to the introduction of the + # musl-specific flags below. + # At next change to non-musl glibc builds, remove this `then` + # and the above condition, instead keeping only the `else` below. + then (if withGd then "-Wno-error=stringop-truncation" else null) + else + builtins.concatLists [ + (stdenv.lib.optional withGd "-Wno-error=stringop-truncation") + # Fix -Werror build failure when building glibc with musl with GCC >= 8, see: + # https://github.com/NixOS/nixpkgs/pull/68244#issuecomment-544307798 + (stdenv.lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias") + ]; # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for # any program we run, because the gcc will have been placed at a new diff --git a/pkgs/development/libraries/gnutls-kdh/generic.nix b/pkgs/development/libraries/gnutls-kdh/generic.nix index cb81b52b7301..6079387fc720 100644 --- a/pkgs/development/libraries/gnutls-kdh/generic.nix +++ b/pkgs/development/libraries/gnutls-kdh/generic.nix @@ -90,5 +90,6 @@ stdenv.mkDerivation { license = licenses.lgpl21Plus; maintainers = with maintainers; [ leenaars ]; platforms = platforms.all; + broken = true; }; } diff --git a/pkgs/development/libraries/libck/default.nix b/pkgs/development/libraries/libck/default.nix new file mode 100644 index 000000000000..934a250ac7cb --- /dev/null +++ b/pkgs/development/libraries/libck/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "ck"; + version = "0.7.0"; + + src = fetchFromGitHub { + owner = "concurrencykit"; + repo = pname; + rev = version; + sha256 = "1w7g0y1n7jslca693fb8sanlfi1biq956dw6avdx6pf3c2s7l9jd"; + }; + + dontDisableStatic = true; + + meta = with stdenv.lib; { + description = "High-performance concurrency research library"; + longDescription = '' + Concurrency primitives, safe memory reclamation mechanisms and non-blocking data structures for the research, design and implementation of high performance concurrent systems. + ''; + license = with licenses; [ asl20 bsd2 ]; + homepage = "http://concurrencykit.org/"; + platforms = platforms.linux; + maintainers = with maintainers; [ chessai ]; + }; +} diff --git a/pkgs/development/libraries/polkit/default.nix b/pkgs/development/libraries/polkit/default.nix index 03dcffd046e7..9fdf53a13724 100644 --- a/pkgs/development/libraries/polkit/default.nix +++ b/pkgs/development/libraries/polkit/default.nix @@ -1,9 +1,13 @@ { stdenv, fetchurl, pkgconfig, glib, expat, pam, perl, fetchpatch , intltool, spidermonkey_60 , gobject-introspection, libxslt, docbook_xsl, dbus , docbook_xml_dtd_412, gtk-doc, coreutils -, useSystemd ? stdenv.isLinux, systemd +, useSystemd ? (stdenv.isLinux && !stdenv.hostPlatform.isMusl), systemd, elogind , withGnome ? true -, doCheck ? stdenv.isLinux +# A few tests currently fail on musl (polkitunixusertest, polkitunixgrouptest, polkitidentitytest segfault). +# Not yet investigated; it may be due to the "Make netgroup support optional" +# patch not updating the tests correctly yet, or doing something wrong, +# or being unrelated to that. +, doCheck ? (stdenv.isLinux && !stdenv.hostPlatform.isMusl) }: let @@ -28,6 +32,15 @@ stdenv.mkDerivation rec { url = "https://gitlab.freedesktop.org/polkit/polkit/merge_requests/11.patch"; sha256 = "17lv7xj5ksa27iv4zpm4zwd4iy8zbwjj4ximslfq3sasiz9kxhlp"; }) + ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ + # Make netgroup support optional (musl does not have it) + # Upstream MR: https://gitlab.freedesktop.org/polkit/polkit/merge_requests/10 + # We use the version of the patch that Alpine uses successfully. + (fetchpatch { + name = "make-innetgr-optional.patch"; + url = "https://git.alpinelinux.org/aports/plain/main/polkit/make-innetgr-optional.patch?id=391e7de6ced1a96c2dac812e0b12f1d7e0ea705e"; + sha256 = "1p9qqqhnrfyjvvd50qh6vpl256kyfblm1qnhz5pm09klrl1bh1n4"; + }) ]; postPatch = stdenv.lib.optionalString stdenv.isDarwin '' @@ -41,7 +54,7 @@ stdenv.mkDerivation rec { ++ [ libxslt docbook_xsl docbook_xml_dtd_412 ]; # man pages buildInputs = [ expat pam spidermonkey_60 ] - ++ stdenv.lib.optional useSystemd systemd + ++ (if useSystemd then [systemd] else [elogind]) ++ stdenv.lib.optional withGnome gobject-introspection; propagatedBuildInputs = [ diff --git a/pkgs/development/libraries/srt/default.nix b/pkgs/development/libraries/srt/default.nix index 74cdf90a156b..cf8bffe07362 100644 --- a/pkgs/development/libraries/srt/default.nix +++ b/pkgs/development/libraries/srt/default.nix @@ -18,6 +18,10 @@ stdenv.mkDerivation rec { buildInputs = [ openssl ]; cmakeFlags = [ + # the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly + # (setting it to an absolute path causes include files to go to $out/$out/include, + # because the absolute path is interpreted with root at $out). + "-DCMAKE_INSTALL_INCLUDEDIR=include" # TODO Remove this when https://github.com/Haivision/srt/issues/538 is fixed and available to nixpkgs # Workaround for the fact that srt incorrectly disables GNUInstallDirs when LIBDIR is specified, # see https://github.com/NixOS/nixpkgs/pull/54463#discussion_r249878330 diff --git a/pkgs/development/libraries/wt/default.nix b/pkgs/development/libraries/wt/default.nix index 0bffa8ba1a56..74792f8f34cd 100644 --- a/pkgs/development/libraries/wt/default.nix +++ b/pkgs/development/libraries/wt/default.nix @@ -49,12 +49,12 @@ let }; in { wt3 = generic { - version = "3.4.1"; - sha256 = "1bsx7hmy6g2x9p3vl5xw9lv1xk891pnvs93a87s15g257gznkjmj"; + version = "3.4.2"; + sha256 = "03mwr4yv3705y74pdh19lmh8szad6gk2x2m23f4pr0wrmqg73307"; }; wt4 = generic { - version = "4.1.1"; - sha256 = "1f1imx5kbpqlysrqx5h75hf2f8pkq972rz42x0pl6cxbnsyzngid"; + version = "4.1.2"; + sha256 = "06bnadpgflg8inikzynnz4l4r6w1bphjwlva4pzf51w648vpkknl"; }; } |