remove everything except whats needed for stdenv on x86_64-linux
This commit is contained in:
parent
4ea8b1c428
commit
045c54b843
|
@ -1,74 +0,0 @@
|
|||
diff -ur a/configure b/configure
|
||||
--- a/configure 2001-04-26 10:44:54.000000000 -0400
|
||||
+++ b/configure 2023-10-21 23:19:52.941161475 -0400
|
||||
@@ -1005,7 +1005,7 @@
|
||||
#line 1006 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
-main(){return(0);}
|
||||
+int main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:1011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
ac_cv_prog_cc_works=yes
|
||||
diff -ur a/src/aafire.c b/src/aafire.c
|
||||
--- a/src/aafire.c 2001-04-26 11:30:03.000000000 -0400
|
||||
+++ b/src/aafire.c 2023-10-21 23:46:54.478750904 -0400
|
||||
@@ -1,3 +1,4 @@
|
||||
+#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "aalib.h"
|
||||
|
||||
diff -ur a/src/aainfo.c b/src/aainfo.c
|
||||
--- a/src/aainfo.c 2001-04-26 10:37:31.000000000 -0400
|
||||
+++ b/src/aainfo.c 2023-10-21 23:31:54.141133353 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-
|
||||
+#include <stdlib.h>
|
||||
#include "aalib.h"
|
||||
#include "aaint.h"
|
||||
int main(int argc, char **argv)
|
||||
diff -ur a/src/aakbdreg.c b/src/aakbdreg.c
|
||||
--- a/src/aakbdreg.c 2023-10-21 23:19:00.787207960 -0400
|
||||
+++ b/src/aakbdreg.c 2023-10-21 23:23:49.667253541 -0400
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <malloc.h>
|
||||
+#include <string.h>
|
||||
#include "config.h"
|
||||
#include "aalib.h"
|
||||
#include "aaint.h"
|
||||
diff -ur a/src/aamoureg.c b/src/aamoureg.c
|
||||
--- a/src/aamoureg.c 2023-10-21 23:19:00.787725591 -0400
|
||||
+++ b/src/aamoureg.c 2023-10-21 23:26:51.821477807 -0400
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <malloc.h>
|
||||
+#include <string.h>
|
||||
#include "config.h"
|
||||
#include "aalib.h"
|
||||
#include "aaint.h"
|
||||
diff -ur a/src/aaregist.c b/src/aaregist.c
|
||||
--- a/src/aaregist.c 2023-10-21 23:19:00.788130179 -0400
|
||||
+++ b/src/aaregist.c 2023-10-21 23:19:38.929729034 -0400
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <malloc.h>
|
||||
+#include <string.h>
|
||||
#include "config.h"
|
||||
#include "aalib.h"
|
||||
#include "aaint.h"
|
||||
diff -ur a/src/aasavefont.c b/src/aasavefont.c
|
||||
--- a/src/aasavefont.c 2001-04-26 10:37:31.000000000 -0400
|
||||
+++ b/src/aasavefont.c 2023-10-21 23:51:09.216521714 -0400
|
||||
@@ -1,3 +1,5 @@
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
#include "aalib.h"
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
diff -ur a/src/aatest.c b/src/aatest.c
|
||||
--- a/src/aatest.c 2001-04-26 10:37:31.000000000 -0400
|
||||
+++ b/src/aatest.c 2023-10-21 23:43:16.758422704 -0400
|
||||
@@ -1,3 +1,5 @@
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include "aalib.h"
|
||||
int main(int argc, char **argv)
|
||||
{
|
|
@ -1,106 +0,0 @@
|
|||
diff --git a/src/aaedit.c b/src/aaedit.c
|
||||
index 09534d2..2ea52f9 100644
|
||||
--- a/src/aaedit.c
|
||||
+++ b/src/aaedit.c
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include "aalib.h"
|
||||
#include "aaint.h"
|
||||
static void aa_editdisplay(struct aa_edit *e)
|
||||
|
||||
diff --git a/src/aakbdreg.c b/src/aakbdreg.c
|
||||
index def65fe..f4f8efb 100644
|
||||
--- a/src/aakbdreg.c
|
||||
+++ b/src/aakbdreg.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "config.h"
|
||||
#include "aalib.h"
|
||||
diff --git a/src/aalib.c b/src/aalib.c
|
||||
index 11fecc8..e3063b4 100644
|
||||
--- a/src/aalib.c
|
||||
+++ b/src/aalib.c
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include "aalib.h"
|
||||
#include "aaint.h"
|
||||
|
||||
diff --git a/src/aamoureg.c b/src/aamoureg.c
|
||||
index 0380828..bb55fe3 100644
|
||||
--- a/src/aamoureg.c
|
||||
+++ b/src/aamoureg.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "config.h"
|
||||
#include "aalib.h"
|
||||
diff --git a/src/aarec.c b/src/aarec.c
|
||||
index 70f4ebc..ee43e8a 100644
|
||||
--- a/src/aarec.c
|
||||
+++ b/src/aarec.c
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <string.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include "aalib.h"
|
||||
#include "aaint.h"
|
||||
aa_linkedlist *aa_kbdrecommended = NULL, *aa_mouserecommended = NULL,
|
||||
diff --git a/src/aaregist.c b/src/aaregist.c
|
||||
index 54abec0..765155e 100644
|
||||
--- a/src/aaregist.c
|
||||
+++ b/src/aaregist.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "config.h"
|
||||
#include "aalib.h"
|
||||
diff --git a/src/aax.c b/src/aax.c
|
||||
index adcbd82..36e3294 100644
|
||||
--- a/src/aax.c
|
||||
+++ b/src/aax.c
|
||||
@@ -1,4 +1,3 @@
|
||||
-#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
diff --git a/src/aaxkbd.c b/src/aaxkbd.c
|
||||
index 30d5903..da2248d 100644
|
||||
--- a/src/aaxkbd.c
|
||||
+++ b/src/aaxkbd.c
|
||||
@@ -1,4 +1,3 @@
|
||||
-#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
diff --git a/src/aaxmouse.c b/src/aaxmouse.c
|
||||
index 9935b03..7e725ad 100644
|
||||
--- a/src/aaxmouse.c
|
||||
+++ b/src/aaxmouse.c
|
||||
@@ -1,4 +1,3 @@
|
||||
-#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
diff --git a/aalib.m4 b/aalib.m4
|
||||
index c40b8db..991fbda 100644
|
||||
--- a/aalib.m4
|
||||
+++ b/aalib.m4
|
||||
@@ -9,7 +9,7 @@
|
||||
dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS
|
||||
dnl
|
||||
-AC_DEFUN(AM_PATH_AALIB,
|
||||
+AC_DEFUN([AM_PATH_AALIB],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the aalib-config script
|
||||
dnl
|
|
@ -1,45 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, ncurses, automake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aalib";
|
||||
version = "1.4rc5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/aa-project/aalib-${version}.tar.gz";
|
||||
sha256 = "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv";
|
||||
};
|
||||
|
||||
outputs = [ "bin" "dev" "out" "man" "info" ];
|
||||
setOutputFlags = false; # Doesn't support all the flags
|
||||
|
||||
patches = [
|
||||
./clang.patch
|
||||
] # Fix implicit `int` on `main` error with newer versions of clang
|
||||
++ lib.optionals stdenv.isDarwin [ ./darwin.patch ];
|
||||
|
||||
# The fuloong2f is not supported by aalib still
|
||||
preConfigure = ''
|
||||
cp ${automake}/share/automake*/config.{sub,guess} .
|
||||
configureFlagsArray+=(
|
||||
"--bindir=$bin/bin"
|
||||
"--includedir=$dev/include"
|
||||
"--libdir=$out/lib"
|
||||
)
|
||||
'';
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
configureFlags = [ "--without-x" "--with-ncurses=${ncurses.dev}" ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $dev/bin
|
||||
mv $bin/bin/aalib-config $dev/bin/aalib-config
|
||||
substituteInPlace $out/lib/libaa.la --replace "${ncurses.dev}/lib" "${ncurses.out}/lib"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "ASCII art graphics library";
|
||||
platforms = lib.platforms.unix;
|
||||
license = lib.licenses.lgpl2;
|
||||
};
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake
|
||||
, static ? stdenv.hostPlatform.isStatic, cxxStandard ? null }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abseil-cpp";
|
||||
version = "20210324.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "abseil";
|
||||
repo = "abseil-cpp";
|
||||
rev = version;
|
||||
sha256 = "sha256-fcxPhuI2eL/fnd6nT11p8DpUNwGNaXZmd03yOiZcOT0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Use CMAKE_INSTALL_FULL_{LIBDIR,INCLUDEDIR}
|
||||
# https://github.com/abseil/abseil-cpp/pull/963
|
||||
(fetchpatch {
|
||||
url =
|
||||
"https://github.com/abseil/abseil-cpp/commit/5bfa70c75e621c5d5ec095c8c4c0c050dcb2957e.patch";
|
||||
sha256 = "0nhjxqfxpi2pkfinnqvd5m4npf9l1kg39mjx9l3087ajhadaywl5";
|
||||
})
|
||||
|
||||
# Bacport gcc-13 fix:
|
||||
# https://github.com/abseil/abseil-cpp/pull/1187
|
||||
(fetchpatch {
|
||||
name = "gcc-13.patch";
|
||||
url =
|
||||
"https://github.com/abseil/abseil-cpp/commit/36a4b073f1e7e02ed7d1ac140767e36f82f09b7c.patch";
|
||||
hash = "sha256-aA7mwGEtv/cQINcawjkukmCvfNuqwUeDFssSiNKPdgg=";
|
||||
})
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLoongArch64 [
|
||||
# https://github.com/abseil/abseil-cpp/pull/1110
|
||||
(fetchpatch {
|
||||
url =
|
||||
"https://github.com/abseil/abseil-cpp/commit/808bc202fc13e85a7948db0d7fb58f0f051200b1.patch";
|
||||
sha256 = "sha256-ayY/aV/xWOdEyFSDqV7B5WDGvZ0ASr/aeBeYwP5RZVc=";
|
||||
})
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
|
||||
# that require a different SDK other than the default one.
|
||||
./cmake-core-foundation.patch
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ]
|
||||
++ lib.optionals (cxxStandard != null)
|
||||
[ "-DCMAKE_CXX_STANDARD=${cxxStandard}" ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"An open-source collection of C++ code designed to augment the C++ standard library";
|
||||
homepage = "https://abseil.io/";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.andersk ];
|
||||
};
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake
|
||||
, static ? stdenv.hostPlatform.isStatic, cxxStandard ? null }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abseil-cpp";
|
||||
version = "20211102.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "abseil";
|
||||
repo = "abseil-cpp";
|
||||
rev = version;
|
||||
sha256 = "sha256-sSXT6D4JSrk3dA7kVaxfKkzOMBpqXQb0WbMYWG+nGwk=";
|
||||
};
|
||||
|
||||
patches = lib.optionals stdenv.isDarwin [
|
||||
# Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
|
||||
# that require a different SDK other than the default one.
|
||||
./cmake-core-foundation.patch
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ]
|
||||
++ lib.optionals (cxxStandard != null)
|
||||
[ "-DCMAKE_CXX_STANDARD=${cxxStandard}" ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"An open-source collection of C++ code designed to augment the C++ standard library";
|
||||
homepage = "https://abseil.io/";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.andersk ];
|
||||
};
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, static ? stdenv.hostPlatform.isStatic
|
||||
, cxxStandard ? null }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abseil-cpp";
|
||||
version = "20220623.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "abseil";
|
||||
repo = "abseil-cpp";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-ma8QJfSySsk2XVLA0rhwYJMQx+6HxMFgub6gi5mDrLI=";
|
||||
};
|
||||
|
||||
patches = lib.optionals stdenv.isDarwin [
|
||||
# Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
|
||||
# that require a different SDK other than the default one.
|
||||
./cmake-core-foundation.patch
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ]
|
||||
++ lib.optionals (cxxStandard != null)
|
||||
[ "-DCMAKE_CXX_STANDARD=${cxxStandard}" ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"An open-source collection of C++ code designed to augment the C++ standard library";
|
||||
homepage = "https://abseil.io/";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.andersk ];
|
||||
};
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, gtest
|
||||
, static ? stdenv.hostPlatform.isStatic, cxxStandard ? null }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "abseil-cpp";
|
||||
version = "20230125.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "abseil";
|
||||
repo = "abseil-cpp";
|
||||
rev = "refs/tags/${finalAttrs.version}";
|
||||
hash = "sha256-7C/QIXYRyUyNVVE0tqmv8b5g/uWc58iBI5jzdtddQ+U=";
|
||||
};
|
||||
|
||||
patches = lib.optionals stdenv.isDarwin [
|
||||
# Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
|
||||
# that require a different SDK other than the default one.
|
||||
./cmake-core-foundation.patch
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DABSL_BUILD_TEST_HELPERS=ON"
|
||||
"-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
|
||||
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
||||
] ++ lib.optionals (cxxStandard != null)
|
||||
[ "-DCMAKE_CXX_STANDARD=${cxxStandard}" ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ gtest ];
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"An open-source collection of C++ code designed to augment the C++ standard library";
|
||||
homepage = "https://abseil.io/";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.andersk ];
|
||||
};
|
||||
})
|
|
@ -1,36 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, gtest
|
||||
, static ? stdenv.hostPlatform.isStatic, cxxStandard ? null }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "abseil-cpp";
|
||||
version = "20230802.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "abseil";
|
||||
repo = "abseil-cpp";
|
||||
rev = "refs/tags/${finalAttrs.version}";
|
||||
hash = "sha256-wW7dCqiiHyBHiizyV0+M6p17itwTpzHv/T0/mcXyYWE=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DABSL_BUILD_TEST_HELPERS=ON"
|
||||
"-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
|
||||
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
||||
] ++ lib.optionals (cxxStandard != null)
|
||||
[ "-DCMAKE_CXX_STANDARD=${cxxStandard}" ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ gtest ];
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"An open-source collection of C++ code designed to augment the C++ standard library";
|
||||
homepage = "https://abseil.io/";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.andersk ];
|
||||
};
|
||||
})
|
|
@ -1,36 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, gtest
|
||||
, static ? stdenv.hostPlatform.isStatic, cxxStandard ? null }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "abseil-cpp";
|
||||
version = "20240116.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "abseil";
|
||||
repo = "abseil-cpp";
|
||||
rev = "refs/tags/${finalAttrs.version}";
|
||||
hash = "sha256-eA2/dZpNOlex1O5PNa3XSZhpMB3AmaIoHzVDI9TD/cg=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DABSL_BUILD_TEST_HELPERS=ON"
|
||||
"-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
|
||||
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
||||
] ++ lib.optionals (cxxStandard != null)
|
||||
[ "-DCMAKE_CXX_STANDARD=${cxxStandard}" ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ gtest ];
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"An open-source collection of C++ code designed to augment the C++ standard library";
|
||||
homepage = "https://abseil.io/";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.GaetanLepage ];
|
||||
};
|
||||
})
|
|
@ -1,12 +0,0 @@
|
|||
diff -ur a/absl/time/CMakeLists.txt b/absl/time/CMakeLists.txt
|
||||
--- a/absl/time/CMakeLists.txt 1969-12-31 19:00:01.000000000 -0500
|
||||
+++ b/absl/time/CMakeLists.txt 2023-10-30 21:50:32.639061785 -0400
|
||||
@@ -55,7 +55,7 @@
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
- find_library(CoreFoundation CoreFoundation)
|
||||
+ set(CoreFoundation "-framework CoreFoundation")
|
||||
endif()
|
||||
|
||||
absl_cc_library(
|
|
@ -1,41 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
abseil-cpp_202103 = callPackage ./202103.nix {
|
||||
# If abseil-cpp doesn’t have a deployment target of 10.13+, arrow-cpp crashes in libgrpc.dylib.
|
||||
stdenv = if stdenv.isDarwin && stdenv.isx86_64 then
|
||||
overrideSDK stdenv { darwinMinVersion = "10.13"; }
|
||||
else
|
||||
stdenv;
|
||||
};
|
||||
abseil-cpp_202206 = callPackage ./202206.nix {
|
||||
# If abseil-cpp doesn’t have a deployment target of 10.13+, arrow-cpp crashes in libgrpc.dylib.
|
||||
stdenv = if stdenv.isDarwin && stdenv.isx86_64 then
|
||||
overrideSDK stdenv { darwinMinVersion = "10.13"; }
|
||||
else
|
||||
stdenv;
|
||||
};
|
||||
abseil-cpp_202301 = callPackage ./202301.nix {
|
||||
# If abseil-cpp doesn’t have a deployment target of 10.13+, arrow-cpp crashes in libgrpc.dylib.
|
||||
stdenv = if stdenv.isDarwin && stdenv.isx86_64 then
|
||||
overrideSDK stdenv { darwinMinVersion = "10.13"; }
|
||||
else
|
||||
stdenv;
|
||||
};
|
||||
abseil-cpp_202308 = callPackage ./202308.nix {
|
||||
# If abseil-cpp doesn’t have a deployment target of 10.13+, arrow-cpp crashes in libgrpc.dylib.
|
||||
stdenv = if stdenv.isDarwin && stdenv.isx86_64 then
|
||||
overrideSDK stdenv { darwinMinVersion = "10.13"; }
|
||||
else
|
||||
stdenv;
|
||||
};
|
||||
abseil-cpp_202401 = callPackage ./202401.nix {
|
||||
# If abseil-cpp doesn’t have a deployment target of 10.13+, arrow-cpp crashes in libgrpc.dylib.
|
||||
stdenv = if stdenv.isDarwin && stdenv.isx86_64 then
|
||||
overrideSDK stdenv { darwinMinVersion = "10.13"; }
|
||||
else
|
||||
stdenv;
|
||||
};
|
||||
abseil-cpp = abseil-cpp_202401;
|
||||
}
|
|
@ -1,232 +0,0 @@
|
|||
diff --git a/src/control/control.c b/src/control/control.c
|
||||
index d66ed75..42cecad 100644
|
||||
--- a/src/control/control.c
|
||||
+++ b/src/control/control.c
|
||||
@@ -838,6 +838,10 @@ static int snd_ctl_open_conf(snd_ctl_t **ctlp, const char *name,
|
||||
#ifndef PIC
|
||||
extern void *snd_control_open_symbols(void);
|
||||
#endif
|
||||
+
|
||||
+ snd_config_t *libs = NULL;
|
||||
+ const char *libs_lib = NULL;
|
||||
+
|
||||
if (snd_config_get_type(ctl_conf) != SND_CONFIG_TYPE_COMPOUND) {
|
||||
if (name)
|
||||
SNDERR("Invalid type for CTL %s definition", name);
|
||||
@@ -879,6 +883,19 @@ static int snd_ctl_open_conf(snd_ctl_t **ctlp, const char *name,
|
||||
SNDERR("Invalid type for %s", id);
|
||||
goto _err;
|
||||
}
|
||||
+
|
||||
+ continue;
|
||||
+ }
|
||||
+ // Handle an array of extra libs.
|
||||
+ if (strcmp(id, "libs") == 0) {
|
||||
+ if (snd_config_get_type(n) != SND_CONFIG_TYPE_COMPOUND) {
|
||||
+ SNDERR("Invalid type for libs definition in CTL %s definition",
|
||||
+ str);
|
||||
+ goto _err;
|
||||
+ }
|
||||
+
|
||||
+ libs = n;
|
||||
+
|
||||
continue;
|
||||
}
|
||||
if (strcmp(id, "open") == 0) {
|
||||
@@ -903,7 +920,62 @@ static int snd_ctl_open_conf(snd_ctl_t **ctlp, const char *name,
|
||||
open_name = buf;
|
||||
sprintf(buf, "_snd_ctl_%s_open", str);
|
||||
}
|
||||
- if (!lib) {
|
||||
+
|
||||
+#ifndef PIC
|
||||
+ snd_control_open_symbols();
|
||||
+#endif
|
||||
+
|
||||
+ // Normal alsa behaviour when there is no libs array.
|
||||
+ if (!libs) {
|
||||
+ if (lib) {
|
||||
+ open_func = snd_dlobj_cache_get(lib, open_name,
|
||||
+ SND_DLSYM_VERSION(SND_CONTROL_DLSYM_VERSION), 1);
|
||||
+ }
|
||||
+ }
|
||||
+ // Handle libs array.
|
||||
+ // Suppresses error messages if any function is loaded successfully.
|
||||
+ else {
|
||||
+ if (lib) {
|
||||
+ open_func = snd_dlobj_cache_get(lib, open_name,
|
||||
+ SND_DLSYM_VERSION(SND_CONTROL_DLSYM_VERSION), 0);
|
||||
+ }
|
||||
+
|
||||
+ if (!open_func) {
|
||||
+ snd_config_for_each(i, next, libs) {
|
||||
+ snd_config_t *n = snd_config_iterator_entry(i);
|
||||
+
|
||||
+ err = snd_config_get_string(n, &libs_lib);
|
||||
+ if (err < 0) {
|
||||
+ SNDERR("Invalid entry in CTL %s libs definition", str);
|
||||
+ goto _err;
|
||||
+ }
|
||||
+
|
||||
+ if (!open_func) {
|
||||
+ open_func = snd_dlobj_cache_get(libs_lib, open_name,
|
||||
+ SND_DLSYM_VERSION(SND_CONTROL_DLSYM_VERSION), 0);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Print error messages.
|
||||
+ if (!open_func) {
|
||||
+ if (lib) {
|
||||
+ SNDERR("Either %s cannot be opened or %s was not defined inside",
|
||||
+ lib, open_name);
|
||||
+ }
|
||||
+
|
||||
+ snd_config_for_each(i, next, libs) {
|
||||
+ snd_config_t *n = snd_config_iterator_entry(i);
|
||||
+
|
||||
+ snd_config_get_string(n, &libs_lib);
|
||||
+ SNDERR("Either %s cannot be opened or %s was not defined inside",
|
||||
+ libs_lib, open_name);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Look in ALSA_PLUGIN_DIR iff we found nowhere else to look.
|
||||
+ if (!lib && (!libs || !libs_lib)) {
|
||||
const char *const *build_in = build_in_ctls;
|
||||
while (*build_in) {
|
||||
if (!strcmp(*build_in, str))
|
||||
@@ -919,12 +991,11 @@ static int snd_ctl_open_conf(snd_ctl_t **ctlp, const char *name,
|
||||
lib = buf1;
|
||||
sprintf(buf1, "%s/libasound_module_ctl_%s.so", ALSA_PLUGIN_DIR, str);
|
||||
}
|
||||
- }
|
||||
-#ifndef PIC
|
||||
- snd_control_open_symbols();
|
||||
-#endif
|
||||
- open_func = snd_dlobj_cache_get(lib, open_name,
|
||||
+
|
||||
+ open_func = snd_dlobj_cache_get(lib, open_name,
|
||||
SND_DLSYM_VERSION(SND_CONTROL_DLSYM_VERSION), 1);
|
||||
+ }
|
||||
+
|
||||
if (open_func) {
|
||||
err = open_func(ctlp, name, ctl_root, ctl_conf, mode);
|
||||
if (err >= 0) {
|
||||
diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
|
||||
index 2e24338..7f489f4 100644
|
||||
--- a/src/pcm/pcm.c
|
||||
+++ b/src/pcm/pcm.c
|
||||
@@ -2116,6 +2116,10 @@ static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name,
|
||||
#ifndef PIC
|
||||
extern void *snd_pcm_open_symbols(void);
|
||||
#endif
|
||||
+
|
||||
+ snd_config_t *libs = NULL;
|
||||
+ const char *libs_lib = NULL;
|
||||
+
|
||||
if (snd_config_get_type(pcm_conf) != SND_CONFIG_TYPE_COMPOUND) {
|
||||
char *val;
|
||||
id = NULL;
|
||||
@@ -2160,6 +2164,19 @@ static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name,
|
||||
SNDERR("Invalid type for %s", id);
|
||||
goto _err;
|
||||
}
|
||||
+
|
||||
+ continue;
|
||||
+ }
|
||||
+ // Handle an array of extra libs.
|
||||
+ if (strcmp(id, "libs") == 0) {
|
||||
+ if (snd_config_get_type(n) != SND_CONFIG_TYPE_COMPOUND) {
|
||||
+ SNDERR("Invalid type for libs definition in PCM %s definition",
|
||||
+ str);
|
||||
+ goto _err;
|
||||
+ }
|
||||
+
|
||||
+ libs = n;
|
||||
+
|
||||
continue;
|
||||
}
|
||||
if (strcmp(id, "open") == 0) {
|
||||
@@ -2184,7 +2201,62 @@ static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name,
|
||||
open_name = buf;
|
||||
sprintf(buf, "_snd_pcm_%s_open", str);
|
||||
}
|
||||
- if (!lib) {
|
||||
+
|
||||
+#ifndef PIC
|
||||
+ snd_pcm_open_symbols(); /* this call is for static linking only */
|
||||
+#endif
|
||||
+
|
||||
+ // Normal alsa behaviour when there is no libs array.
|
||||
+ if (!libs) {
|
||||
+ if (lib) {
|
||||
+ open_func = snd_dlobj_cache_get(lib, open_name,
|
||||
+ SND_DLSYM_VERSION(SND_PCM_DLSYM_VERSION), 1);
|
||||
+ }
|
||||
+ }
|
||||
+ // Handle libs array.
|
||||
+ // Suppresses error messages if any function is loaded successfully.
|
||||
+ else {
|
||||
+ if (lib) {
|
||||
+ open_func = snd_dlobj_cache_get(lib, open_name,
|
||||
+ SND_DLSYM_VERSION(SND_PCM_DLSYM_VERSION), 0);
|
||||
+ }
|
||||
+
|
||||
+ if (!open_func) {
|
||||
+ snd_config_for_each(i, next, libs) {
|
||||
+ snd_config_t *n = snd_config_iterator_entry(i);
|
||||
+
|
||||
+ err = snd_config_get_string(n, &libs_lib);
|
||||
+ if (err < 0) {
|
||||
+ SNDERR("Invalid entry in PCM %s libs definition", str);
|
||||
+ goto _err;
|
||||
+ }
|
||||
+
|
||||
+ if (!open_func) {
|
||||
+ open_func = snd_dlobj_cache_get(libs_lib, open_name,
|
||||
+ SND_DLSYM_VERSION(SND_PCM_DLSYM_VERSION), 0);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Print error messages.
|
||||
+ if (!open_func) {
|
||||
+ if (lib) {
|
||||
+ SNDERR("Either %s cannot be opened or %s was not defined inside",
|
||||
+ lib, open_name);
|
||||
+ }
|
||||
+
|
||||
+ snd_config_for_each(i, next, libs) {
|
||||
+ snd_config_t *n = snd_config_iterator_entry(i);
|
||||
+
|
||||
+ snd_config_get_string(n, &libs_lib);
|
||||
+ SNDERR("Either %s cannot be opened or %s was not defined inside",
|
||||
+ libs_lib, open_name);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Look in ALSA_PLUGIN_DIR iff we found nowhere else to look.
|
||||
+ if (!lib && (!libs || !libs_lib)) {
|
||||
const char *const *build_in = build_in_pcms;
|
||||
while (*build_in) {
|
||||
if (!strcmp(*build_in, str))
|
||||
@@ -2200,12 +2272,11 @@ static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name,
|
||||
lib = buf1;
|
||||
sprintf(buf1, "%s/libasound_module_pcm_%s.so", ALSA_PLUGIN_DIR, str);
|
||||
}
|
||||
- }
|
||||
-#ifndef PIC
|
||||
- snd_pcm_open_symbols(); /* this call is for static linking only */
|
||||
-#endif
|
||||
- open_func = snd_dlobj_cache_get(lib, open_name,
|
||||
+
|
||||
+ open_func = snd_dlobj_cache_get(lib, open_name,
|
||||
SND_DLSYM_VERSION(SND_PCM_DLSYM_VERSION), 1);
|
||||
+ }
|
||||
+
|
||||
if (open_func) {
|
||||
err = open_func(pcmp, name, pcm_root, pcm_conf, stream, mode);
|
||||
if (err >= 0) {
|
|
@ -1,46 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, alsa-topology-conf, alsa-ucm-conf, testers }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "alsa-lib";
|
||||
version = "1.2.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://alsa/lib/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
|
||||
hash = "sha256-nz8vabmV+a03NZBy+8aaOoi/uggfyD6b4w4UZieVu00=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Add a "libs" field to the syntax recognized in the /etc/asound.conf file.
|
||||
# The nixos modules for pulseaudio, jack, and pipewire are leveraging this
|
||||
# "libs" field to declare locations for both native and 32bit plugins, in
|
||||
# order to support apps with 32bit sound running on x86_64 architecture.
|
||||
./alsa-plugin-conf-multilib.patch
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
ln -s ${alsa-ucm-conf}/share/alsa/{ucm,ucm2} $out/share/alsa
|
||||
ln -s ${alsa-topology-conf}/share/alsa/topology $out/share/alsa
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.alsa-project.org/";
|
||||
description = "ALSA, the Advanced Linux Sound Architecture libraries";
|
||||
mainProgram = "aserver";
|
||||
|
||||
longDescription = ''
|
||||
The Advanced Linux Sound Architecture (ALSA) provides audio and
|
||||
MIDI functionality to the Linux-based operating system.
|
||||
'';
|
||||
|
||||
license = licenses.lgpl21Plus;
|
||||
pkgConfigModules = [ "alsa" "alsa-topology" ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ l-as ];
|
||||
};
|
||||
})
|
|
@ -1,97 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, perl, zlib, apr, aprutil, pcre2, libiconv, lynx, which
|
||||
, libxcrypt
|
||||
# for passthru.tests
|
||||
# , nixosTests
|
||||
, proxySupport ? true, sslSupport ? true, openssl, modTlsSupport ? false
|
||||
, rustls-ffi, Foundation, http2Support ? true, nghttp2, ldapSupport ? true
|
||||
, openldap, libxml2Support ? true, libxml2, brotliSupport ? true, brotli
|
||||
, luaSupport ? false, lua5 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "apache-httpd";
|
||||
version = "2.4.59";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://apache/httpd/httpd-${version}.tar.bz2";
|
||||
hash = "sha256-7FFQHsSAKE/1L2NyWBNdMzIwp9Ipw6+m9sL5BA4yEyM=";
|
||||
};
|
||||
|
||||
# FIXME: -dev depends on -doc
|
||||
outputs = [ "out" "dev" "man" "doc" ];
|
||||
setOutputFlags = false; # it would move $out/modules, etc.
|
||||
|
||||
nativeBuildInputs = [ which ];
|
||||
|
||||
buildInputs = [ perl libxcrypt ] ++ lib.optional brotliSupport brotli
|
||||
++ lib.optional sslSupport openssl ++ lib.optional modTlsSupport rustls-ffi
|
||||
++ lib.optional (modTlsSupport && stdenv.isDarwin) Foundation
|
||||
++ lib.optional ldapSupport openldap ++ # there is no --with-ldap flag
|
||||
lib.optional libxml2Support libxml2 ++ lib.optional http2Support nghttp2
|
||||
++ lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
postPatch = ''
|
||||
sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|"
|
||||
sed -i support/apachectl.in -e 's|@LYNX_PATH@|${lynx}/bin/lynx|'
|
||||
'';
|
||||
|
||||
# Required for ‘pthread_cancel’.
|
||||
NIX_LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
|
||||
|
||||
configureFlags = [
|
||||
"--with-apr=${apr.dev}"
|
||||
"--with-apr-util=${aprutil.dev}"
|
||||
"--with-z=${zlib.dev}"
|
||||
"--with-pcre=${pcre2.dev}/bin/pcre2-config"
|
||||
"--disable-maintainer-mode"
|
||||
"--disable-debugger-mode"
|
||||
"--enable-mods-shared=all"
|
||||
"--enable-mpms-shared=all"
|
||||
"--enable-cern-meta"
|
||||
"--enable-imagemap"
|
||||
"--enable-cgi"
|
||||
"--includedir=${placeholder "dev"}/include"
|
||||
(lib.enableFeature proxySupport "proxy")
|
||||
(lib.enableFeature sslSupport "ssl")
|
||||
(lib.enableFeature modTlsSupport "tls")
|
||||
(lib.withFeatureAs libxml2Support "libxml2"
|
||||
"${libxml2.dev}/include/libxml2")
|
||||
"--docdir=$(doc)/share/doc"
|
||||
|
||||
(lib.enableFeature brotliSupport "brotli")
|
||||
(lib.withFeatureAs brotliSupport "brotli" brotli)
|
||||
|
||||
(lib.enableFeature http2Support "http2")
|
||||
(lib.withFeature http2Support "nghttp2")
|
||||
|
||||
(lib.enableFeature luaSupport "lua")
|
||||
(lib.withFeatureAs luaSupport "lua" lua5)
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
stripDebugList = [ "lib" "modules" "bin" ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $doc/share/doc/httpd
|
||||
mv $out/manual $doc/share/doc/httpd
|
||||
mkdir -p $dev/bin
|
||||
mv $out/bin/apxs $dev/bin/apxs
|
||||
'';
|
||||
|
||||
# passthru = {
|
||||
# inherit apr aprutil sslSupport proxySupport ldapSupport luaSupport lua5;
|
||||
# tests = {
|
||||
# acme-integration = nixosTests.acme;
|
||||
# proxy = nixosTests.proxy;
|
||||
# php = nixosTests.php.httpd;
|
||||
# };
|
||||
# };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Apache HTTPD, the world's most popular web server";
|
||||
homepage = "https://httpd.apache.org/";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
apacheHttpd_2_4 =
|
||||
callPackage ./2.4.nix { inherit (darwin.apple_sdk.frameworks) Foundation; };
|
||||
apacheHttpd = apacheHttpd_2_4;
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
based onhttps://830833.bugs.gentoo.org/attachment.cgi?id=761676,
|
||||
adjusted for 1.7.2
|
||||
|
||||
--- a/configure.in 2022-01-09 00:31:05.552582255 -0800
|
||||
+++ b/configure.in 2022-01-09 00:31:19.824582533 -0800
|
||||
@@ -1329,7 +1329,7 @@
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])])
|
||||
+ }], [], [ac_cv_file__dev_zero=no], [:])])
|
||||
fi
|
||||
|
||||
# Now we determine which one is our anonymous shmem preference.
|
|
@ -1,71 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, buildPackages, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "apr";
|
||||
version = "1.7.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://apache/apr/${pname}-${version}.tar.bz2";
|
||||
sha256 = "sha256-/GSN6YPzoqbJ543qHxgGOb0vrWwG1VbUNnpwH+XDVXc=";
|
||||
};
|
||||
|
||||
patches = [ ./cross-assume-dev-zero-mmappable.patch ];
|
||||
|
||||
# This test needs the net
|
||||
postPatch = ''
|
||||
rm test/testsock.*
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
outputBin = "dev";
|
||||
|
||||
preConfigure = ''
|
||||
configureFlagsArray+=("--with-installbuilddir=$dev/share/build")
|
||||
'';
|
||||
|
||||
configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
# For cross builds, provide answers to the configure time tests.
|
||||
# These answers are valid on x86_64-linux and aarch64-linux.
|
||||
"ac_cv_file__dev_zero=yes"
|
||||
"ac_cv_func_setpgrp_void=yes"
|
||||
"apr_cv_tcp_nodelay_with_cork=yes"
|
||||
"ac_cv_define_PTHREAD_PROCESS_SHARED=yes"
|
||||
"apr_cv_process_shared_works=yes"
|
||||
"apr_cv_mutex_robust_shared=yes"
|
||||
"ap_cv_atomic_builtins=yes"
|
||||
"apr_cv_mutex_recursive=yes"
|
||||
"apr_cv_epoll=yes"
|
||||
"apr_cv_epoll_create1=yes"
|
||||
"apr_cv_dup3=yes"
|
||||
"apr_cv_accept4=yes"
|
||||
"apr_cv_sock_cloexec=yes"
|
||||
"ac_cv_struct_rlimit=yes"
|
||||
"ac_cv_func_sem_open=yes"
|
||||
"ac_cv_negative_eai=yes"
|
||||
"apr_cv_gai_addrconfig=yes"
|
||||
"ac_cv_o_nonblock_inherited=no"
|
||||
"apr_cv_pthreads_lib=-lpthread"
|
||||
"CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/cc"
|
||||
] ++ lib.optionals (stdenv.hostPlatform.system == "i686-cygwin") [
|
||||
# Including the Windows headers breaks unistd.h.
|
||||
# Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2
|
||||
"ac_cv_header_windows_h=no"
|
||||
];
|
||||
|
||||
# - Update libtool for macOS 11 support
|
||||
# - Regenerate for cross fix patch
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://apr.apache.org/";
|
||||
description = "The Apache Portable Runtime library";
|
||||
mainProgram = "apr-1-config";
|
||||
platforms = platforms.all;
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.eelco ];
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
diff -ur a/build/dbm.m4 b/build/dbm.m4
|
||||
--- a/build/dbm.m4 2013-11-23 13:00:53.000000000 -0500
|
||||
+++ b/build/dbm.m4 2023-10-22 20:16:37.764571446 -0400
|
||||
@@ -235,7 +235,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <$apu_try_berkeley_db_header>
|
||||
-main ()
|
||||
+int main ()
|
||||
{
|
||||
int major, minor, patch;
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, makeWrapper, apr, expat, gnused, sslSupport ? true
|
||||
, openssl, bdbSupport ? true, db, ldapSupport ? !stdenv.isCygwin, openldap
|
||||
, libiconv, libxcrypt, cyrus_sasl, autoreconfHook }:
|
||||
|
||||
assert sslSupport -> openssl != null;
|
||||
assert bdbSupport -> db != null;
|
||||
assert ldapSupport -> openldap != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "apr-util";
|
||||
version = "1.6.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://apache/apr/${pname}-${version}.tar.bz2";
|
||||
sha256 = "sha256-pBB243EHRjJsOUUEKZStmk/KwM4Cd92P6gdv7DyXcrU=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./fix-libxcrypt-build.patch
|
||||
# Fix incorrect Berkeley DB detection with newer versions of clang due to implicit `int` on main errors.
|
||||
./clang-bdb.patch
|
||||
] ++ lib.optional stdenv.isFreeBSD ./include-static-dependencies.patch;
|
||||
|
||||
NIX_CFLAGS_LINK = [ "-lcrypt" ];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
outputBin = "dev";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper autoreconfHook ];
|
||||
|
||||
configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ]
|
||||
++ lib.optional (!stdenv.isCygwin) "--with-crypto"
|
||||
++ lib.optional sslSupport "--with-openssl=${openssl.dev}"
|
||||
++ lib.optional bdbSupport "--with-berkeley-db=${db.dev}"
|
||||
++ lib.optional ldapSupport "--with-ldap=ldap"
|
||||
++ lib.optionals stdenv.isCygwin [
|
||||
"--without-pgsql"
|
||||
"--without-sqlite2"
|
||||
"--without-sqlite3"
|
||||
"--without-freetds"
|
||||
"--without-berkeley-db"
|
||||
"--without-crypto"
|
||||
];
|
||||
|
||||
postConfigure = ''
|
||||
echo '#define APR_HAVE_CRYPT_H 1' >> confdefs.h
|
||||
'' +
|
||||
# For some reason, db version 6.9 is selected when cross-compiling.
|
||||
# It's unclear as to why, it requires someone with more autotools / configure knowledge to go deeper into that.
|
||||
# Always replacing the link flag with a generic link flag seems to help though, so let's do that for now.
|
||||
lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "-ldb-6.9" "-ldb"
|
||||
substituteInPlace apu-1-config \
|
||||
--replace "-ldb-6.9" "-ldb"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ apr expat libiconv libxcrypt ]
|
||||
++ lib.optional sslSupport openssl ++ lib.optional bdbSupport db
|
||||
++ lib.optional ldapSupport openldap
|
||||
++ lib.optional stdenv.isFreeBSD cyrus_sasl;
|
||||
|
||||
postInstall = ''
|
||||
for f in $out/lib/*.la $out/lib/apr-util-1/*.la $dev/bin/apu-1-config; do
|
||||
substituteInPlace $f \
|
||||
--replace "${expat.dev}/lib" "${expat.out}/lib" \
|
||||
--replace "${db.dev}/lib" "${db.out}/lib" \
|
||||
--replace "${openssl.dev}/lib" "${lib.getLib openssl}/lib"
|
||||
done
|
||||
|
||||
# Give apr1 access to sed for runtime invocations.
|
||||
wrapProgram $dev/bin/apu-1-config --prefix PATH : "${gnused}/bin"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = { inherit sslSupport bdbSupport ldapSupport; };
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://apr.apache.org/";
|
||||
description = "A companion library to APR, the Apache Portable Runtime";
|
||||
mainProgram = "apu-1-config";
|
||||
maintainers = [ maintainers.eelco ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
diff --git a/crypto/apr_passwd.c b/crypto/apr_passwd.c
|
||||
index c961de2..a397f27 100644
|
||||
--- a/crypto/apr_passwd.c
|
||||
+++ b/crypto/apr_passwd.c
|
||||
@@ -24,9 +24,7 @@
|
||||
#if APR_HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
-#if APR_HAVE_CRYPT_H
|
||||
#include <crypt.h>
|
||||
-#endif
|
||||
#if APR_HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/build/apu-conf.m4 b/build/apu-conf.m4
|
||||
index 8943f10..aa44305 100644
|
||||
--- a/build/apu-conf.m4
|
||||
+++ b/build/apu-conf.m4
|
||||
@@ -279,6 +279,7 @@ AC_ARG_WITH(ldap,[ --with-ldap=library ldap library to use],
|
||||
APU_FIND_LDAPLIB("ldap", "-llber -lresolv -lsocket -lnsl")
|
||||
APU_FIND_LDAPLIB("ldap", "-ldl -lpthread")
|
||||
else
|
||||
+ APU_FIND_LDAPLIB($LIBLDAP, "-llber -lcrypto -lssl -lsasl2")
|
||||
APU_FIND_LDAPLIB($LIBLDAP)
|
||||
APU_FIND_LDAPLIB($LIBLDAP, "-lresolv")
|
||||
APU_FIND_LDAPLIB($LIBLDAP, "-lresolv -lsocket -lnsl")
|
|
@ -1,279 +0,0 @@
|
|||
{ fetchurl, lib, stdenv, python3, fetchFromGitHub, autoreconfHook
|
||||
, installShellFiles, enableStandardFeatures ? false, sourceHighlight, highlight
|
||||
, pygments, graphviz, texliveMinimal, dblatexFull, libxslt, w3m, lynx
|
||||
, imagemagick, lilypond, libxml2, docbook_xml_dtd_45, docbook_xsl_ns
|
||||
, docbook_xsl, fop, epubcheck, gnused, coreutils
|
||||
|
||||
# if true, enable all the below filters and backends
|
||||
, enableExtraPlugins ? false
|
||||
|
||||
# unzip is needed to extract filter and backend plugins
|
||||
, unzip
|
||||
# filters
|
||||
, enableDitaaFilter ? false, jre, enableMscgenFilter ? false, mscgen
|
||||
, enableDiagFilter ? false, blockdiag, seqdiag, actdiag, nwdiag
|
||||
, enableQrcodeFilter ? false, qrencode, enableMatplotlibFilter ? false
|
||||
, matplotlib, numpy, enableAafigureFilter ? false, aafigure
|
||||
, recursive-pth-loader
|
||||
# backends
|
||||
, enableDeckjsBackend ? false, enableOdfBackend ? false
|
||||
|
||||
# java is problematic on some platforms, where it is unfree
|
||||
, enableJava ? true
|
||||
|
||||
, buildPackages }:
|
||||
|
||||
let
|
||||
|
||||
_enableDitaaFilter = (enableExtraPlugins && enableJava) || enableDitaaFilter;
|
||||
_enableMscgenFilter = enableExtraPlugins || enableMscgenFilter;
|
||||
_enableDiagFilter = enableExtraPlugins || enableDiagFilter;
|
||||
_enableQrcodeFilter = enableExtraPlugins || enableQrcodeFilter;
|
||||
_enableMatplotlibFilter = enableExtraPlugins || enableMatplotlibFilter;
|
||||
_enableAafigureFilter = enableExtraPlugins || enableAafigureFilter;
|
||||
_enableDeckjsBackend = enableExtraPlugins || enableDeckjsBackend;
|
||||
_enableOdfBackend = enableExtraPlugins || enableOdfBackend;
|
||||
|
||||
#
|
||||
# texlive environment
|
||||
#
|
||||
texlive = texliveMinimal.withPackages (ps: [ ps.dvipng ]);
|
||||
|
||||
#
|
||||
# filters
|
||||
#
|
||||
|
||||
ditaaFilterSrc = fetchurl {
|
||||
url =
|
||||
"https://asciidoc-ditaa-filter.googlecode.com/files/ditaa-filter-1.1.zip";
|
||||
sha256 = "0p7hm2a1xywx982ia3vg4c0lam5sz0xknsc10i2a5vswy026naf6";
|
||||
};
|
||||
|
||||
mscgenFilterSrc = fetchurl {
|
||||
url =
|
||||
"https://asciidoc-mscgen-filter.googlecode.com/files/mscgen-filter-1.2.zip";
|
||||
sha256 = "1nfwmj375gpv5dn9i770pjv59aihzy2kja0fflsk96xwnlqsqq61";
|
||||
};
|
||||
|
||||
diagFilterSrc = fetchurl {
|
||||
# unfortunately no version number
|
||||
url = "https://asciidoc-diag-filter.googlecode.com/files/diag_filter.zip";
|
||||
sha256 = "1qlqrdbqkdqqgfdhjsgdws1al0sacsyq6jmwxdfy7r8k7bv7n7mm";
|
||||
};
|
||||
|
||||
qrcodeFilterSrc = fetchurl {
|
||||
url =
|
||||
"https://asciidoc-qrencode-filter.googlecode.com/files/qrcode-filter-1.0.zip";
|
||||
sha256 = "0h4bql1nb4y4fmg2yvlpfjhvy22ln8jsaxdr10f8bfcg5lr0zkxs";
|
||||
};
|
||||
|
||||
# there are no archives or tags, using latest commit in master branch as per 2013-09-22
|
||||
matplotlibFilterSrc = let commit = "75f0d009629f93f33fab04b83faca20cc35dd358";
|
||||
in fetchurl {
|
||||
name = "mplw-${commit}.tar.gz";
|
||||
url = "https://api.github.com/repos/lvv/mplw/tarball/${commit}";
|
||||
sha256 = "0yfhkm2dr8gnp0fcg25x89hwiymkri2m5cyqzmzragzwj0hbmcf1";
|
||||
};
|
||||
|
||||
aafigureFilterSrc = fetchurl {
|
||||
url =
|
||||
"https://asciidoc-aafigure-filter.googlecode.com/files/aafigure-filter-1.1.zip";
|
||||
sha256 = "1hq2s30dvmv5dqvj0xm1qwdwafhgm9w1iyr0lr0c40cyk8h00j8j";
|
||||
};
|
||||
|
||||
#
|
||||
# backends
|
||||
#
|
||||
|
||||
deckjsBackendSrc = fetchurl {
|
||||
url = "https://github.com/downloads/houqp/asciidoc-deckjs/deckjs-1.6.2.zip";
|
||||
sha256 = "1siy1j8naj5irrrrv5bfgl4d8nal6j9pyahy4f50wmrr9wv59s46";
|
||||
};
|
||||
|
||||
# the odf backend is actually two plugins: odt + odp
|
||||
odtBackendSrc = fetchurl {
|
||||
url =
|
||||
"https://github.com/downloads/dagwieers/asciidoc-odf/odt-backend-0.1.zip";
|
||||
sha256 = "1zaa97h9sx6ncxcdkl1x3ggydi7f8kjgvrnpjnkjiizi45k350kw";
|
||||
};
|
||||
|
||||
odpBackendSrc = fetchurl {
|
||||
url =
|
||||
"https://github.com/downloads/dagwieers/asciidoc-odf/odp-backend-0.1.zip";
|
||||
sha256 = "08ya4bskygzqkfqwjllpg31qc5k08xp2k78z9b2480g8y57bfy10";
|
||||
};
|
||||
|
||||
in python3.pkgs.buildPythonApplication rec {
|
||||
pname = "asciidoc" + lib.optionalString enableStandardFeatures "-full"
|
||||
+ lib.optionalString enableExtraPlugins "-with-plugins";
|
||||
version = "10.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "asciidoc-py";
|
||||
repo = "asciidoc-py";
|
||||
rev = version;
|
||||
hash = "sha256-TqC0x9xB6e2d6Wc9bgnlqgZVOmYHmUUKfE/CKAiEtag=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook installShellFiles unzip ];
|
||||
|
||||
# install filters early, so their shebangs are patched too
|
||||
postPatch = with lib;
|
||||
''
|
||||
mkdir -p "$out/etc/asciidoc/filters"
|
||||
mkdir -p "$out/etc/asciidoc/backends"
|
||||
'' + optionalString _enableDitaaFilter ''
|
||||
echo "Extracting ditaa filter"
|
||||
unzip -d "$out/etc/asciidoc/filters/ditaa" "${ditaaFilterSrc}"
|
||||
sed -i -e "s|java -jar|${jre}/bin/java -jar|" \
|
||||
"$out/etc/asciidoc/filters/ditaa/ditaa2img.py"
|
||||
'' + optionalString _enableMscgenFilter ''
|
||||
echo "Extracting mscgen filter"
|
||||
unzip -d "$out/etc/asciidoc/filters/mscgen" "${mscgenFilterSrc}"
|
||||
sed -i -e "s|filter-wrapper.py mscgen|filter-wrapper.py ${mscgen}/bin/mscgen|" \
|
||||
"$out/etc/asciidoc/filters/mscgen/mscgen-filter.conf"
|
||||
'' + optionalString _enableDiagFilter ''
|
||||
echo "Extracting diag filter"
|
||||
unzip -d "$out/etc/asciidoc/filters/diag" "${diagFilterSrc}"
|
||||
sed -i \
|
||||
-e "s|filter='blockdiag|filter=\'${blockdiag}/bin/blockdiag|" \
|
||||
-e "s|filter='seqdiag|filter=\'${seqdiag}/bin/seqdiag|" \
|
||||
-e "s|filter='actdiag|filter=\'${actdiag}/bin/actdiag|" \
|
||||
-e "s|filter='nwdiag|filter=\'${nwdiag}/bin/nwdiag|" \
|
||||
-e "s|filter='packetdiag|filter=\'${nwdiag}/bin/packetdiag|" \
|
||||
"$out/etc/asciidoc/filters/diag/diag-filter.conf"
|
||||
'' + optionalString _enableQrcodeFilter ''
|
||||
echo "Extracting qrcode filter"
|
||||
unzip -d "$out/etc/asciidoc/filters/qrcode" "${qrcodeFilterSrc}"
|
||||
sed -i -e "s|systemcmd('qrencode|systemcmd('${qrencode}/bin/qrencode|" \
|
||||
"$out/etc/asciidoc/filters/qrcode/qrcode2img.py"
|
||||
'' + optionalString _enableMatplotlibFilter ''
|
||||
echo "Extracting mpl (matplotlib) filter"
|
||||
mkdir -p "$out/etc/asciidoc/filters/mpl"
|
||||
tar xvf "${matplotlibFilterSrc}" -C "$out/etc/asciidoc/filters/mpl" --strip-components=1
|
||||
# Stop asciidoc from loading mpl/.old/chart-filter.conf
|
||||
rm -rf "$out/etc/asciidoc/filters/mpl/.old"
|
||||
# Add matplotlib and numpy to sys.path
|
||||
matplotlib_path="$(toPythonPath ${matplotlib})"
|
||||
numpy_path="$(toPythonPath ${numpy})"
|
||||
sed -i "/^import.*sys/asys.path.append(\"$matplotlib_path\"); sys.path.append(\"$numpy_path\");" \
|
||||
"$out/etc/asciidoc/filters/mpl/mplw.py"
|
||||
'' + optionalString _enableAafigureFilter ''
|
||||
echo "Extracting aafigure filter"
|
||||
unzip -d "$out/etc/asciidoc/filters/aafigure" "${aafigureFilterSrc}"
|
||||
# Add aafigure to sys.path (and it needs recursive-pth-loader)
|
||||
pth_loader_path="$(toPythonPath ${recursive-pth-loader})"
|
||||
aafigure_path="$(toPythonPath ${aafigure})"
|
||||
sed -i "/^import.*sys/asys.path.append(\"$pth_loader_path\"); sys.path.append(\"$aafigure_path\"); import sitecustomize" \
|
||||
"$out/etc/asciidoc/filters/aafigure/aafig2img.py"
|
||||
'' + optionalString _enableDeckjsBackend ''
|
||||
echo "Extracting deckjs backend"
|
||||
unzip -d "$out/etc/asciidoc/backends/deckjs" "${deckjsBackendSrc}"
|
||||
'' + optionalString _enableOdfBackend ''
|
||||
echo "Extracting odf backend (odt + odp)"
|
||||
unzip -d "$out/etc/asciidoc/backends/odt" "${odtBackendSrc}"
|
||||
unzip -d "$out/etc/asciidoc/backends/odp" "${odpBackendSrc}"
|
||||
# The odt backend has a TODO note about removing this hardcoded path, but
|
||||
# the odp backend already has that fix. Copy it here until fixed upstream.
|
||||
sed -i "s|'/etc/asciidoc/backends/odt/asciidoc.ott'|os.path.dirname(__file__),'asciidoc.ott'|" \
|
||||
"$out/etc/asciidoc/backends/odt/a2x-backend.py"
|
||||
'' + (if enableStandardFeatures then ''
|
||||
sed -e "s|dot|${graphviz}/bin/dot|g" \
|
||||
-e "s|neato|${graphviz}/bin/neato|g" \
|
||||
-e "s|twopi|${graphviz}/bin/twopi|g" \
|
||||
-e "s|circo|${graphviz}/bin/circo|g" \
|
||||
-e "s|fdp|${graphviz}/bin/fdp|g" \
|
||||
-i "asciidoc/resources/filters/graphviz/graphviz2png.py"
|
||||
|
||||
sed -e "s|run('latex|run('${texlive}/bin/latex|g" \
|
||||
-e "s|cmd = 'dvipng'|cmd = '${texlive}/bin/dvipng'|g" \
|
||||
-e "s|cmd = 'dvisvgm'|cmd = '${texlive}/bin/dvisvgm'|g" \
|
||||
-i "asciidoc/resources/filters/latex/latex2img.py"
|
||||
|
||||
sed -e "s|run('abc2ly|run('${lilypond}/bin/abc2ly|g" \
|
||||
-e "s|run('lilypond|run('${lilypond}/bin/lilypond|g" \
|
||||
-e "s|run('convert|run('${imagemagick.out}/bin/convert|g" \
|
||||
-i "asciidoc/resources/filters/music/music2png.py"
|
||||
|
||||
sed -e 's|filter="source-highlight|filter="${sourceHighlight}/bin/source-highlight|' \
|
||||
-e 's|filter="highlight|filter="${highlight}/bin/highlight|' \
|
||||
-e 's|filter="pygmentize|filter="${pygments}/bin/pygmentize|' \
|
||||
-i "asciidoc/resources/filters/source/source-highlight-filter.conf"
|
||||
|
||||
# ENV is custom environment passed to programs that a2x invokes. Here we
|
||||
# use it to work around an impurity in the tetex package; tetex tools
|
||||
# cannot find their neighbours (e.g. pdflatex doesn't find mktextfm).
|
||||
# We can remove PATH= when those impurities are fixed.
|
||||
# TODO: Is this still necessary when using texlive?
|
||||
sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook_xsl_ns}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml', PATH='${
|
||||
lib.makeBinPath [ texlive coreutils gnused ]
|
||||
}', **(dict(filter(lambda v: v[0] == 'SOURCE_DATE_EPOCH', os.environ.items()))))|" \
|
||||
-e "s|^ASCIIDOC =.*|ASCIIDOC = '$out/bin/asciidoc'|" \
|
||||
-e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt.bin}/bin/xsltproc'|" \
|
||||
-e "s|^DBLATEX =.*|DBLATEX = '${dblatexFull}/bin/dblatex'|" \
|
||||
${
|
||||
optionalString enableJava
|
||||
''-e "s|^FOP =.*|FOP = '${fop}/bin/fop'|"''
|
||||
} \
|
||||
-e "s|^W3M =.*|W3M = '${w3m}/bin/w3m'|" \
|
||||
-e "s|^LYNX =.*|LYNX = '${lynx}/bin/lynx'|" \
|
||||
-e "s|^XMLLINT =.*|XMLLINT = '${libxml2.bin}/bin/xmllint'|" \
|
||||
-e "s|^EPUBCHECK =.*|EPUBCHECK = '${epubcheck}/bin/epubcheck'|" \
|
||||
-i asciidoc/a2x.py
|
||||
'' else ''
|
||||
sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook_xsl_ns}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml', **(dict(filter(lambda v: v[0] == 'SOURCE_DATE_EPOCH', os.environ.items()))))|" \
|
||||
-e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt.bin}/bin/xsltproc'|" \
|
||||
-e "s|^XMLLINT =.*|XMLLINT = '${libxml2.bin}/bin/xmllint'|" \
|
||||
-i asciidoc/a2x.py
|
||||
'') + ''
|
||||
# Fix tests
|
||||
for f in $(grep -R --files-with-matches "2002-11-25") ; do
|
||||
substituteInPlace $f --replace "2002-11-25" "1980-01-02"
|
||||
substituteInPlace $f --replace "00:37:42" "00:00:00"
|
||||
done
|
||||
'' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
# We want to use asciidoc from the build platform to build the documentation.
|
||||
substituteInPlace Makefile.in \
|
||||
--replace "python3 -m asciidoc.a2x" "${buildPackages.asciidoc}/bin/a2x"
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
make manpages
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
installManPage doc/asciidoc.1 doc/a2x.1 doc/testasciidoc.1
|
||||
'';
|
||||
|
||||
nativeCheckInputs = with python3.pkgs; [ pytest pytest-mock ];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
make test
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Text-based document generation system";
|
||||
longDescription = ''
|
||||
AsciiDoc is a text document format for writing notes, documentation,
|
||||
articles, books, ebooks, slideshows, web pages, man pages and blogs.
|
||||
AsciiDoc files can be translated to many formats including HTML, PDF,
|
||||
EPUB, man page.
|
||||
|
||||
AsciiDoc is highly configurable: both the AsciiDoc source file syntax and
|
||||
the backend output markups (which can be almost any type of SGML/XML
|
||||
markup) can be customized and extended by the user.
|
||||
'';
|
||||
sourceProvenance = with sourceTypes;
|
||||
[ fromSource ] ++ lib.optional _enableDitaaFilter binaryBytecode;
|
||||
homepage = "https://asciidoc-py.github.io/";
|
||||
changelog =
|
||||
"https://github.com/asciidoc-py/asciidoc-py/blob/${version}/CHANGELOG.adoc";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ bjornfor dotlambda ];
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
asciidoc = callPackage ./. {
|
||||
inherit (python3.pkgs)
|
||||
pygments matplotlib numpy aafigure recursive-pth-loader;
|
||||
w3m = w3m-batch;
|
||||
enableStandardFeatures = false;
|
||||
};
|
||||
|
||||
asciidoc-full = asciidoc.override { enableStandardFeatures = true; };
|
||||
|
||||
asciidoc-full-with-plugins = asciidoc.override {
|
||||
enableStandardFeatures = true;
|
||||
enableExtraPlugins = true;
|
||||
};
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, bash, buildPackages
|
||||
, libtool, linuxHeaders, python3, swig
|
||||
|
||||
# Enabling python support while cross compiling would be possible, but the
|
||||
# configure script tries executing python to gather info instead of relying on
|
||||
# python3-config exclusively
|
||||
, enablePython ? stdenv.hostPlatform == stdenv.buildPlatform, }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "audit";
|
||||
version = "3.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://people.redhat.com/sgrubb/audit/audit-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-wLF5LR8KiMbxgocQUJy7mHBZ/GhxLJdmnKkOrhA9KH0=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace bindings/swig/src/auditswig.i \
|
||||
--replace "/usr/include/linux/audit.h" \
|
||||
"${linuxHeaders}/include/linux/audit.h"
|
||||
'';
|
||||
|
||||
outputs = [ "bin" "dev" "out" "man" ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ]
|
||||
++ lib.optionals enablePython [ python3 swig ];
|
||||
|
||||
buildInputs = [ bash ];
|
||||
|
||||
configureFlags = [
|
||||
# z/OS plugin is not useful on Linux, and pulls in an extra openldap
|
||||
# dependency otherwise
|
||||
"--disable-zos-remote"
|
||||
"--with-arm"
|
||||
"--with-aarch64"
|
||||
(if enablePython then "--with-python" else "--without-python")
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://people.redhat.com/sgrubb/audit/";
|
||||
description = "Audit Library";
|
||||
changelog =
|
||||
"https://github.com/linux-audit/audit-userspace/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
|
@ -1,34 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, aws-c-cal, aws-c-common, aws-c-compression
|
||||
, aws-c-http, aws-c-io, aws-c-sdkutils, cmake, nix, s2n-tls }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-c-auth";
|
||||
version = "0.7.16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = "aws-c-auth";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-76sBv4oChDrkv80HPktkULFNC37kfTNxjlwNg/FJiyA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs =
|
||||
[ aws-c-cal aws-c-common aws-c-compression aws-c-http aws-c-io s2n-tls ];
|
||||
|
||||
propagatedBuildInputs = [ aws-c-sdkutils ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
||||
passthru.tests = { inherit nix; };
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"C99 library implementation of AWS client-side authentication";
|
||||
homepage = "https://github.com/awslabs/aws-c-auth";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ r-burns ];
|
||||
};
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
From: Emil Lerch <emil@lerch.org>
|
||||
Date: Wed, 28 Apr 2021 17:46:24 -0700
|
||||
Subject: [PATCH] Allow dlopen to fail on musl systems
|
||||
|
||||
Now that references are forced when linking statically, the assertion is
|
||||
no longer necessary. See https://github.com/awslabs/aws-c-cal/pull/54
|
||||
---
|
||||
source/unix/openssl_platform_init.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/source/unix/openssl_platform_init.c b/source/unix/openssl_platform_init.c
|
||||
index 5266ecc1..99f210bd 100644
|
||||
--- a/source/unix/openssl_platform_init.c
|
||||
+++ b/source/unix/openssl_platform_init.c
|
||||
@@ -496,7 +502,6 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) {
|
||||
/* Try to auto-resolve against what's linked in/process space */
|
||||
FLOGF("searching process and loaded modules");
|
||||
void *process = dlopen(NULL, RTLD_NOW);
|
||||
- AWS_FATAL_ASSERT(process && "Unable to load symbols from process space");
|
||||
enum aws_libcrypto_version result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_LC, process);
|
||||
if (result == AWS_LIBCRYPTO_NONE) {
|
||||
result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_1_0_2, process);
|
||||
@@ -504,7 +509,9 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) {
|
||||
if (result == AWS_LIBCRYPTO_NONE) {
|
||||
result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_1_1_1, process);
|
||||
}
|
||||
- dlclose(process);
|
||||
+ if (process) {
|
||||
+ dlclose(process);
|
||||
+ }
|
||||
|
||||
if (result == AWS_LIBCRYPTO_NONE) {
|
||||
FLOGF("libcrypto symbols were not statically linked, searching for shared libraries");
|
|
@ -1,37 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, aws-c-common, nix, openssl, Security }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "aws-c-cal";
|
||||
version = "0.6.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = finalAttrs.pname;
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-rzJypIf0DrKI/2Wt5vFop34dL+KYTeCfWC0RflZpiMo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix openssl adaptor code for musl based static binaries.
|
||||
./aws-c-cal-musl-compat.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ aws-c-common openssl ];
|
||||
|
||||
propagatedBuildInputs =
|
||||
lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
||||
passthru.tests = { inherit nix; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "AWS Crypto Abstraction Layer ";
|
||||
homepage = "https://github.com/awslabs/aws-c-cal";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
};
|
||||
})
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
aws-c-cal =
|
||||
callPackage ./. { inherit (darwin.apple_sdk.frameworks) Security; };
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, nix }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-c-common";
|
||||
version = "0.9.14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-aeuIXqnO8divpguDpiPlYJHABYIqegpaDNGwqJ5TKZw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]
|
||||
++ lib.optionals stdenv.hostPlatform.isRiscV
|
||||
[ "-DCMAKE_C_FLAGS=-fasynchronous-unwind-tables" ];
|
||||
|
||||
# aws-c-common misuses cmake modules, so we need
|
||||
# to manually add a MODULE_PATH to its consumers
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
# Prevent the execution of tests known to be flaky.
|
||||
preCheck = let
|
||||
ignoreTests = [ "promise_test_multiple_waiters" ]
|
||||
++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
"sba_metrics" # https://github.com/awslabs/aws-c-common/issues/839
|
||||
];
|
||||
in ''
|
||||
cat <<EOW >CTestCustom.cmake
|
||||
SET(CTEST_CUSTOM_TESTS_IGNORE ${toString ignoreTests})
|
||||
EOW
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
passthru.tests = { inherit nix; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "AWS SDK for C common core";
|
||||
homepage = "https://github.com/awslabs/aws-c-common";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ orivej eelco r-burns ];
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
addAwsCCommonModuleDir() {
|
||||
cmakeFlags="-DCMAKE_MODULE_PATH=@out@/lib/cmake ${cmakeFlags:-}"
|
||||
}
|
||||
|
||||
postHooks+=(addAwsCCommonModuleDir)
|
|
@ -1,29 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, aws-c-common, cmake, nix }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-c-compression";
|
||||
version = "0.2.18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = "aws-c-compression";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Cf3MvoRWGAy+vlE59JSpTGOBl07dI4mbIaL1HIiLN/I=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ aws-c-common ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
||||
passthru.tests = { inherit nix; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "C99 implementation of huffman encoding/decoding";
|
||||
homepage = "https://github.com/awslabs/aws-c-compression";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ r-burns ];
|
||||
};
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, aws-c-cal, aws-c-common, aws-c-io
|
||||
, aws-checksums, s2n-tls, libexecinfo
|
||||
# for passthru.tests
|
||||
, nix }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-c-event-stream";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-wj3PZshUay3HJy+v7cidDL4mDAqSDiX+MmQtJDK4rTI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ aws-c-cal aws-c-common aws-c-io aws-checksums s2n-tls ]
|
||||
++ lib.optional stdenv.hostPlatform.isMusl libexecinfo;
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS:BOOL=ON" ];
|
||||
|
||||
# passthru.tests = {
|
||||
# inherit nix;
|
||||
# };
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"C99 implementation of the vnd.amazon.eventstream content-type";
|
||||
homepage = "https://github.com/awslabs/aws-c-event-stream";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ orivej eelco ];
|
||||
};
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, aws-c-cal, aws-c-common, aws-c-compression
|
||||
, aws-c-io, cmake, nix, s2n-tls }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-c-http";
|
||||
version = "0.8.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = "aws-c-http";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-S5ETVkdGTndt2GJBNL4DU5SycHAufsmN06xBDRMFVKo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ aws-c-cal aws-c-common aws-c-compression aws-c-io s2n-tls ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
||||
passthru.tests = { inherit nix; };
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"C99 implementation of the HTTP/1.1 and HTTP/2 specifications";
|
||||
homepage = "https://github.com/awslabs/aws-c-http";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ r-burns ];
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, aws-c-cal, aws-c-common, nix, s2n-tls
|
||||
, Security }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-c-io";
|
||||
version = "0.14.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-fekeGghqMKbUqKWIfpZg3a6dCpgxywhmXPoGz9y4Aos=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ aws-c-cal aws-c-common s2n-tls ];
|
||||
propagatedBuildInputs =
|
||||
lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
||||
passthru.tests = { inherit nix; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "AWS SDK for C module for IO and TLS";
|
||||
homepage = "https://github.com/awslabs/aws-c-io";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
aws-c-io =
|
||||
callPackage ./. { inherit (darwin.apple_sdk.frameworks) Security; };
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, aws-c-cal, aws-c-common, aws-c-compression
|
||||
, aws-c-http, aws-c-io, cmake, nix, s2n-tls }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-c-mqtt";
|
||||
version = "0.10.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = "aws-c-mqtt";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-MWcXTMwKtFnrNp+OnHxkiYCUXc3IUhM6iTQa+F9JwsQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs =
|
||||
[ aws-c-cal aws-c-common aws-c-compression aws-c-http aws-c-io s2n-tls ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
||||
passthru.tests = { inherit nix; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "C99 implementation of the MQTT 3.1.1 specification";
|
||||
homepage = "https://github.com/awslabs/aws-c-mqtt";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ r-burns ];
|
||||
};
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, aws-c-auth, aws-c-cal, aws-c-common
|
||||
, aws-c-compression, aws-c-http, aws-c-io, aws-checksums, cmake, nix, s2n-tls }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-c-s3";
|
||||
version = "0.5.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = "aws-c-s3";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-8eKQsP7AftNDccsZHPC9PcwpbpgZSvsioUuSsiggQDs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [
|
||||
aws-c-auth
|
||||
aws-c-cal
|
||||
aws-c-common
|
||||
aws-c-compression
|
||||
aws-c-http
|
||||
aws-c-io
|
||||
aws-checksums
|
||||
s2n-tls
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
||||
passthru.tests = { inherit nix; };
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"C99 library implementation for communicating with the S3 service";
|
||||
homepage = "https://github.com/awslabs/aws-c-s3";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ r-burns ];
|
||||
mainProgram = "s3";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, aws-c-common, cmake, nix }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-c-sdkutils";
|
||||
version = "0.1.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = "aws-c-sdkutils";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-RTRDbdv+QmRG0Sk/R9qhl45WYEVyl+M0EceLFsoONTI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ aws-c-common ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
passthru.tests = { inherit nix; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "AWS SDK utility library";
|
||||
homepage = "https://github.com/awslabs/aws-c-sdkutils";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ r-burns ];
|
||||
};
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, aws-c-common, nix }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-checksums";
|
||||
version = "0.1.18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-EhIVa8/IK4evGt4vYECunLpxrCMSOsr1RZ/8hFbRi9M=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ aws-c-common ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
||||
passthru.tests = { inherit nix; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "HW accelerated CRC32c and CRC32";
|
||||
homepage = "https://github.com/awslabs/aws-checksums";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ orivej eelco ];
|
||||
};
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
From fd3f3a28e7fce7fe4e10ed2d7edc4bfda8ab27df Mon Sep 17 00:00:00 2001
|
||||
From: Jan Tojnar <jtojnar@gmail.com>
|
||||
Date: Sun, 9 Jan 2022 01:57:18 +0100
|
||||
Subject: [PATCH] build: Make includedir properly overrideable
|
||||
|
||||
This is required by some package managers like Nix.
|
||||
---
|
||||
CMakeLists.txt | 22 +++++++++++++---------
|
||||
1 file changed, 13 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ec6d172..6514c23 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -49,6 +49,10 @@ if(${CMAKE_INSTALL_LIBDIR} STREQUAL "lib64")
|
||||
set(FIND_LIBRARY_USE_LIB64_PATHS true)
|
||||
endif()
|
||||
|
||||
+if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
|
||||
+ set(CMAKE_INSTALL_INCLUDEDIR "include")
|
||||
+endif()
|
||||
+
|
||||
if(NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
@@ -307,7 +311,7 @@ endif()
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<BUILD_INTERFACE:${GENERATED_INCLUDE_DIR}>
|
||||
- $<INSTALL_INTERFACE:include>)
|
||||
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
|
||||
aws_use_package(aws-c-http)
|
||||
aws_use_package(aws-c-mqtt)
|
||||
@@ -324,14 +328,14 @@ aws_add_sanitizers(${PROJECT_NAME})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS})
|
||||
|
||||
-install(FILES ${AWS_CRT_HEADERS} DESTINATION "include/aws/crt" COMPONENT Development)
|
||||
-install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "include/aws/crt/auth" COMPONENT Development)
|
||||
-install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "include/aws/crt/crypto" COMPONENT Development)
|
||||
-install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "include/aws/crt/io" COMPONENT Development)
|
||||
-install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "include/aws/iot" COMPONENT Development)
|
||||
-install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "include/aws/crt/mqtt" COMPONENT Development)
|
||||
-install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "include/aws/crt/http" COMPONENT Development)
|
||||
-install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "include/aws/crt/endpoints" COMPONENT Development)
|
||||
+install(FILES ${AWS_CRT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt" COMPONENT Development)
|
||||
+install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/auth" COMPONENT Development)
|
||||
+install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/crypto" COMPONENT Development)
|
||||
+install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/io" COMPONENT Development)
|
||||
+install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/iot" COMPONENT Development)
|
||||
+install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/mqtt" COMPONENT Development)
|
||||
+install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/http" COMPONENT Development)
|
||||
+install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/endpoints" COMPONENT Development)
|
||||
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
--
|
||||
2.42.0
|
|
@ -1,65 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, aws-c-auth, aws-c-cal, aws-c-common
|
||||
, aws-c-compression, aws-c-event-stream, aws-c-http, aws-c-io, aws-c-mqtt
|
||||
, aws-c-s3, aws-checksums, cmake, s2n-tls
|
||||
# for passthru.tests
|
||||
# , nix
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-crt-cpp";
|
||||
version = "0.26.4";
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "awslabs";
|
||||
repo = "aws-crt-cpp";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-H5ms6fhhlkARn9g8S5Ma8bnisZv8mfNizP0QpzsF1tA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Correct include path for split outputs.
|
||||
# https://github.com/awslabs/aws-crt-cpp/pull/325
|
||||
./0001-build-Make-includedir-properly-overrideable.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt --replace '-Werror' ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aws-c-auth
|
||||
aws-c-cal
|
||||
aws-c-common
|
||||
aws-c-compression
|
||||
aws-c-event-stream
|
||||
aws-c-http
|
||||
aws-c-io
|
||||
aws-c-mqtt
|
||||
aws-c-s3
|
||||
aws-checksums
|
||||
s2n-tls
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_DEPS=OFF" "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
||||
postInstall = ''
|
||||
# Prevent dependency cycle.
|
||||
moveToOutput lib/aws-crt-cpp/cmake "$dev"
|
||||
'';
|
||||
|
||||
# passthru.tests = {
|
||||
# inherit nix;
|
||||
# };
|
||||
|
||||
meta = with lib; {
|
||||
description = "C++ wrapper around the aws-c-* libraries";
|
||||
homepage = "https://github.com/awslabs/aws-crt-cpp";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ r-burns ];
|
||||
};
|
||||
}
|
|
@ -1,149 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, curl, openssl, zlib, aws-crt-cpp
|
||||
, CoreAudio, AudioToolbox
|
||||
, # Allow building a limited set of APIs, e.g. ["s3" "ec2"].
|
||||
apis ? [ "*" ], # Whether to enable AWS' custom memory management.
|
||||
customMemoryManagement ? true
|
||||
# for passthru.tests
|
||||
# , nix
|
||||
# , arrow-cpp
|
||||
# , aws-sdk-cpp
|
||||
}:
|
||||
|
||||
let
|
||||
host_os = if stdenv.hostPlatform.isDarwin then
|
||||
"APPLE"
|
||||
else if stdenv.hostPlatform.isAndroid then
|
||||
"ANDROID"
|
||||
else if stdenv.hostPlatform.isWindows then
|
||||
"WINDOWS"
|
||||
else if stdenv.hostPlatform.isLinux then
|
||||
"LINUX"
|
||||
else
|
||||
throw "Unknown host OS";
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "aws-sdk-cpp";
|
||||
version = "1.11.296";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aws";
|
||||
repo = "aws-sdk-cpp";
|
||||
rev = version;
|
||||
hash = "sha256-yg+OkeUaqwUQGQ5ThIVQUpF2rHm4FuFbcl5gE5WHHOQ=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# Append the dev output to path hints in finding Aws.h to avoid
|
||||
# having to pass `AWS_CORE_HEADER_FILE` explicitly to cmake configure
|
||||
# when using find_package(AWSSDK CONFIG)
|
||||
substituteInPlace cmake/AWSSDKConfig.cmake \
|
||||
--replace 'C:/AWSSDK/''${AWSSDK_INSTALL_INCLUDEDIR}/aws/core' \
|
||||
'C:/AWSSDK/''${AWSSDK_INSTALL_INCLUDEDIR}/aws/core"
|
||||
"${placeholder "dev"}/include/aws/core'
|
||||
|
||||
# Avoid blanket -Werror to evade build failures on less
|
||||
# tested compilers.
|
||||
substituteInPlace cmake/compiler_settings.cmake \
|
||||
--replace '"-Werror"' ' '
|
||||
|
||||
# Flaky on Hydra
|
||||
rm tests/aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp
|
||||
rm tests/aws-cpp-sdk-core-tests/aws/client/AWSClientTest.cpp
|
||||
rm tests/aws-cpp-sdk-core-tests/aws/client/AwsConfigTest.cpp
|
||||
# Includes aws-c-auth private headers, so only works with submodule build
|
||||
rm tests/aws-cpp-sdk-core-tests/aws/auth/AWSAuthSignerTest.cpp
|
||||
# TestRandomURLMultiThreaded fails
|
||||
rm tests/aws-cpp-sdk-core-tests/http/HttpClientTest.cpp
|
||||
'' + lib.optionalString stdenv.isi686 ''
|
||||
# EPSILON is exceeded
|
||||
rm tests/aws-cpp-sdk-core-tests/aws/client/AdaptiveRetryStrategyTest.cpp
|
||||
'';
|
||||
|
||||
# FIXME: might be nice to put different APIs in different outputs
|
||||
# (e.g. libaws-cpp-sdk-s3.so in output "s3").
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
nativeBuildInputs = [ cmake curl ];
|
||||
|
||||
buildInputs = [ curl openssl zlib ] ++ lib.optionals (stdenv.isDarwin
|
||||
&& ((builtins.elem "text-to-speech" apis) || (builtins.elem "*" apis))) [
|
||||
CoreAudio
|
||||
AudioToolbox
|
||||
];
|
||||
|
||||
# propagation is needed for Security.framework to be available when linking
|
||||
propagatedBuildInputs = [ aws-crt-cpp ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_DEPS=OFF" ]
|
||||
++ lib.optional (!customMemoryManagement) "-DCUSTOM_MEMORY_MANAGEMENT=0"
|
||||
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||
"-DENABLE_TESTING=OFF"
|
||||
"-DCURL_HAS_H2=1"
|
||||
"-DCURL_HAS_TLS_PROXY=1"
|
||||
"-DTARGET_ARCH=${host_os}"
|
||||
] ++ lib.optional (apis != [ "*" ])
|
||||
"-DBUILD_ONLY=${lib.concatStringsSep ";" apis}";
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString [
|
||||
# openssl 3 generates several deprecation warnings
|
||||
"-Wno-error=deprecated-declarations"
|
||||
];
|
||||
|
||||
postFixupHooks = [
|
||||
# This bodge is necessary so that the file that the generated -config.cmake file
|
||||
# points to an existing directory.
|
||||
"mkdir -p $out/include"
|
||||
];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
# Builds in 2+h with 2 cores, and ~10m with a big-parallel builder.
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
|
||||
# passthru = {
|
||||
# tests = {
|
||||
# inherit nix arrow-cpp;
|
||||
# cmake-find-package = stdenv.mkDerivation {
|
||||
# pname = "aws-sdk-cpp-cmake-find-package-test";
|
||||
# version = "0";
|
||||
# dontUnpack = true;
|
||||
# nativeBuildInputs = [ cmake ];
|
||||
# buildInputs = [ aws-sdk-cpp ];
|
||||
# buildCommand = ''
|
||||
# cat > CMakeLists.txt <<'EOF'
|
||||
# find_package(AWSSDK)
|
||||
# EOF
|
||||
|
||||
# # Intentionally not using 'cmakeConfigurePhase' to test that find_package works without it.
|
||||
# mkdir build && cd build
|
||||
# if output=$(cmake -Wno-dev .. 2>&1); then
|
||||
# if grep -Fw -- "Found AWS" - <<< "$output"; then
|
||||
# touch "$out"
|
||||
# else
|
||||
# echo "'Found AWS' not found in the cmake output!" >&2
|
||||
# echo "The output was:" >&2
|
||||
# echo "$output" >&2
|
||||
# exit 1
|
||||
# fi
|
||||
# else
|
||||
# echo -n "'cmake -Wno-dev ..'" >&2
|
||||
# echo " returned a non-zero exit code." >&2
|
||||
# echo "$output" >&2
|
||||
# exit 1
|
||||
# fi
|
||||
# '';
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
meta = with lib; {
|
||||
description = "A C++ interface for Amazon Web Services";
|
||||
homepage = "https://github.com/aws/aws-sdk-cpp";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ eelco orivej ];
|
||||
# building ec2 runs out of memory: cc1plus: out of memory allocating 33554372 bytes after a total of 74424320 bytes
|
||||
broken = stdenv.buildPlatform.is32bit
|
||||
&& ((builtins.elem "ec2" apis) || (builtins.elem "*" apis));
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
aws-sdk-cpp = callPackage ./. {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreAudio AudioToolbox;
|
||||
};
|
||||
}
|
|
@ -1,169 +0,0 @@
|
|||
commit fdda59736ddc048cf38a2c7103f4f5d9eeaf995e
|
||||
Author: Ben Gamari <ben@smart-cactus.org>
|
||||
Date: Tue Oct 17 10:51:34 2017 -0400
|
||||
|
||||
Try implementing cross-compilation
|
||||
|
||||
diff --git a/bc/Makefile.am b/bc/Makefile.am
|
||||
index d9d412e..fdef633 100644
|
||||
--- a/bc/Makefile.am
|
||||
+++ b/bc/Makefile.am
|
||||
@@ -17,6 +17,7 @@ MAINTAINERCLEANFILES = Makefile.in bc.c bc.h scan.c \
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/../h
|
||||
LIBBC = ../lib/libbc.a
|
||||
+LIBBC_HOST = ../lib/libbc_host.a
|
||||
LIBL = @LEXLIB@
|
||||
LDADD = $(LIBBC) $(LIBL) @READLINELIB@
|
||||
|
||||
@@ -29,12 +30,20 @@ $(PROGRAMS): libmath.h $(LIBBC)
|
||||
scan.o: bc.h
|
||||
global.o: libmath.h
|
||||
+
|
||||
+main_host.c : main.c
|
||||
+ cp $< $@
|
||||
|
||||
-fbcOBJ = main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o
|
||||
+fbcOBJ = $(addsuffix _host,main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o)
|
||||
+
|
||||
+%.o_host : CC:=$(CC_FOR_BUILD)
|
||||
+
|
||||
+%.o_host : %.c
|
||||
+ $(COMPILE) -c $(CFLAGS) $(INCLUDES) -o $@ $<
|
||||
|
||||
-libmath.h: libmath.b $(fbcOBJ) $(LIBBC)
|
||||
+libmath.h: libmath.b $(fbcOBJ) $(LIBBC_HOST)
|
||||
echo '{0}' > libmath.h
|
||||
- $(MAKE) global.o
|
||||
- $(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS)
|
||||
+ $(MAKE) global.o_host
|
||||
+ $(CC_FOR_BUILD) -o fbc $(fbcOBJ) global.o_host $(LIBBC_HOST) $(LIBL) ${READLINELIB} $(LIBS)
|
||||
./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h
|
||||
$(srcdir)/fix-libmath_h
|
||||
rm -f ./fbc ./global.o
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index fc74573..5cabb73 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -20,6 +20,7 @@ m4_define([dc_version], 1.4.1)
|
||||
|
||||
AC_INIT([bc],[bc_version])
|
||||
AC_CONFIG_SRCDIR(doc/bc.1)
|
||||
+AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
@@ -35,6 +36,7 @@ AC_DEFINE([DC_COPYRIGHT],
|
||||
[Define the dc copyright line.])
|
||||
|
||||
AC_PROG_CC
|
||||
+AX_CC_FOR_BUILD
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
AM_PROG_LEX
|
||||
diff --git a/lib/Makefile.am b/lib/Makefile.am
|
||||
index ec4bf59..c670f5b 100644
|
||||
--- a/lib/Makefile.am
|
||||
+++ b/lib/Makefile.am
|
||||
@@ -1,5 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
-noinst_LIBRARIES = libbc.a
|
||||
+noinst_LIBRARIES = libbc.a libbc_host.a
|
||||
|
||||
AM_CPPFLAGS = -I. -I.. -I$(srcdir)/../h
|
||||
|
||||
@@ -24,3 +24,11 @@ testmul: testmul.o number.o
|
||||
|
||||
specialnumber: newnumber.o
|
||||
cp newnumber.o number.o
|
||||
+
|
||||
+%.o_host : CC:=$(CC_FOR_BUILD)
|
||||
+%.o_host : %.c
|
||||
+ $(COMPILE) -c $(CFLAGS) $(INCLUDES) -o $@ $<
|
||||
+
|
||||
+libbc_host.a : $(addsuffix _host,$(libbc_a_OBJECTS))
|
||||
+ ar cru $@ $+
|
||||
+ ranlib $@
|
||||
diff --git a/m4/cc_for_build.m4 b/m4/cc_for_build.m4
|
||||
new file mode 100644
|
||||
index 0000000..c62ffad
|
||||
--- /dev/null
|
||||
+++ b/m4/cc_for_build.m4
|
||||
@@ -0,0 +1,77 @@
|
||||
+# ===========================================================================
|
||||
+# https://www.gnu.org/software/autoconf-archive/ax_cc_for_build.html
|
||||
+# ===========================================================================
|
||||
+#
|
||||
+# SYNOPSIS
|
||||
+#
|
||||
+# AX_CC_FOR_BUILD
|
||||
+#
|
||||
+# DESCRIPTION
|
||||
+#
|
||||
+# Find a build-time compiler. Sets CC_FOR_BUILD and EXEEXT_FOR_BUILD.
|
||||
+#
|
||||
+# LICENSE
|
||||
+#
|
||||
+# Copyright (c) 2010 Reuben Thomas <rrt@sc3d.org>
|
||||
+# Copyright (c) 1999 Richard Henderson <rth@redhat.com>
|
||||
+#
|
||||
+# This program is free software: you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU General Public License as published by the
|
||||
+# Free Software Foundation, either version 3 of the License, or (at your
|
||||
+# option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful, but
|
||||
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
+# Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License along
|
||||
+# with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
+#
|
||||
+# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
+# gives unlimited permission to copy, distribute and modify the configure
|
||||
+# scripts that are the output of Autoconf when processing the Macro. You
|
||||
+# need not follow the terms of the GNU General Public License when using
|
||||
+# or distributing such scripts, even though portions of the text of the
|
||||
+# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
+# all other use of the material that constitutes the Autoconf Macro.
|
||||
+#
|
||||
+# This special exception to the GPL applies to versions of the Autoconf
|
||||
+# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
+# modified version of the Autoconf Macro, you may extend this special
|
||||
+# exception to the GPL to apply to your modified version as well.
|
||||
+
|
||||
+#serial 3
|
||||
+
|
||||
+dnl Get a default for CC_FOR_BUILD to put into Makefile.
|
||||
+AC_DEFUN([AX_CC_FOR_BUILD],
|
||||
+[# Put a plausible default for CC_FOR_BUILD in Makefile.
|
||||
+if test -z "$CC_FOR_BUILD"; then
|
||||
+ if test "x$cross_compiling" = "xno"; then
|
||||
+ CC_FOR_BUILD='$(CC)'
|
||||
+ else
|
||||
+ CC_FOR_BUILD=gcc
|
||||
+ fi
|
||||
+fi
|
||||
+AC_SUBST(CC_FOR_BUILD)
|
||||
+# Also set EXEEXT_FOR_BUILD.
|
||||
+if test "x$cross_compiling" = "xno"; then
|
||||
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
|
||||
+else
|
||||
+ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
|
||||
+ [rm -f conftest*
|
||||
+ echo 'int main () { return 0; }' > conftest.c
|
||||
+ bfd_cv_build_exeext=
|
||||
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
|
||||
+ for file in conftest.*; do
|
||||
+ case $file in
|
||||
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
|
||||
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
|
||||
+ esac
|
||||
+ done
|
||||
+ rm -f conftest*
|
||||
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
|
||||
+ EXEEXT_FOR_BUILD=""
|
||||
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
|
||||
+fi
|
||||
+AC_SUBST(EXEEXT_FOR_BUILD)])dnl
|
|
@ -1,43 +0,0 @@
|
|||
{ lib, stdenv, autoreconfHook, buildPackages, fetchurl, flex, readline, ed
|
||||
, texinfo }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bc";
|
||||
version = "1.07.1";
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/bc/${pname}-${version}.tar.gz";
|
||||
sha256 = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a";
|
||||
};
|
||||
|
||||
configureFlags = [ "--with-readline" ];
|
||||
|
||||
# As of 1.07 cross-compilation is quite complicated as the build system wants
|
||||
# to build a code generator, bc/fbc, on the build machine.
|
||||
patches = [ ./cross-bc.patch ];
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [
|
||||
# Tools
|
||||
autoreconfHook
|
||||
ed
|
||||
flex
|
||||
texinfo
|
||||
# Libraries for build
|
||||
buildPackages.readline
|
||||
buildPackages.ncurses
|
||||
];
|
||||
buildInputs = [ readline flex ];
|
||||
|
||||
doCheck = true; # not cross
|
||||
|
||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
||||
# compatibility. This will be replaced with something clearer in a future
|
||||
# masss-rebuild.
|
||||
strictDeps = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "GNU software calculator";
|
||||
homepage = "https://www.gnu.org/software/bc/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
{ stdenv, lib, fetchurl, perl, pkg-config, libcap, libidn2, libtool, libxml2
|
||||
, openssl, libuv, nghttp2, jemalloc, enablePython ? false, python3
|
||||
, enableGSSAPI ? true, libkrb5, buildPackages, cmocka, tzdata
|
||||
# for passthru.tests
|
||||
# , nixosTests
|
||||
# , gitUpdater
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bind";
|
||||
version = "9.18.26";
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://downloads.isc.org/isc/bind9/${version}/${pname}-${version}.tar.xz";
|
||||
hash = "sha256-df/uUnMelgTISbZY3ynpJ/HE8B1aceo+vL62NwLLZlE=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ];
|
||||
|
||||
patches = [ ./dont-keep-configure-flags.patch ];
|
||||
|
||||
nativeBuildInputs = [ perl pkg-config ];
|
||||
buildInputs = [ libidn2 libtool libxml2 openssl libuv nghttp2 jemalloc ]
|
||||
++ lib.optional stdenv.isLinux libcap ++ lib.optional enableGSSAPI libkrb5
|
||||
++ lib.optional enablePython (python3.withPackages (ps: with ps; [ ply ]));
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
configureFlags = [ "--localstatedir=/var" "--without-lmdb" "--with-libidn2" ]
|
||||
++ lib.optional enableGSSAPI "--with-gssapi=${libkrb5.dev}/bin/krb5-config"
|
||||
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
"BUILD_CC=$(CC_FOR_BUILD)";
|
||||
|
||||
postInstall = ''
|
||||
moveToOutput bin/bind9-config $dev
|
||||
|
||||
moveToOutput bin/host $host
|
||||
|
||||
moveToOutput bin/dig $dnsutils
|
||||
moveToOutput bin/delv $dnsutils
|
||||
moveToOutput bin/nslookup $dnsutils
|
||||
moveToOutput bin/nsupdate $dnsutils
|
||||
|
||||
for f in "$lib/lib/"*.la "$dev/bin/"bind*-config; do
|
||||
sed -i "$f" -e 's|-L${openssl.dev}|-L${lib.getLib openssl}|g'
|
||||
done
|
||||
|
||||
cat <<EOF >$out/etc/rndc.conf
|
||||
include "/etc/bind/rndc.key";
|
||||
options {
|
||||
default-key "rndc-key";
|
||||
default-server 127.0.0.1;
|
||||
default-port 953;
|
||||
};
|
||||
EOF
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = false;
|
||||
# TODO: investigate failures; see this and linked discussions:
|
||||
# https://github.com/NixOS/nixpkgs/pull/192962
|
||||
/* doCheck = with stdenv.hostPlatform; !isStatic && !(isAarch64 && isLinux)
|
||||
# https://gitlab.isc.org/isc-projects/bind9/-/issues/4269
|
||||
&& !is32bit;
|
||||
*/
|
||||
checkTarget = "unit";
|
||||
checkInputs = [ cmocka ]
|
||||
++ lib.optionals (!stdenv.hostPlatform.isMusl) [ tzdata ];
|
||||
preCheck = lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
# musl doesn't respect TZDIR, skip timezone-related tests
|
||||
sed -i '/^ISC_TEST_ENTRY(isc_time_formatISO8601L/d' tests/isc/time_test.c
|
||||
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# Test timeouts on Darwin
|
||||
sed -i '/^ISC_TEST_ENTRY(tcpdns_recv_one/d' tests/isc/netmgr_test.c
|
||||
'';
|
||||
|
||||
# passthru = {
|
||||
# tests = {
|
||||
# inherit (nixosTests) bind;
|
||||
# prometheus-exporter = nixosTests.prometheus-exporters.bind;
|
||||
# kubernetes-dns-single-node = nixosTests.kubernetes.dns-single-node;
|
||||
# kubernetes-dns-multi-node = nixosTests.kubernetes.dns-multi-node;
|
||||
# };
|
||||
|
||||
# updateScript = gitUpdater {
|
||||
# # No nicer place to find latest stable release.
|
||||
# url = "https://gitlab.isc.org/isc-projects/bind9.git";
|
||||
# rev-prefix = "v";
|
||||
# # Avoid unstable 9.19 releases.
|
||||
# odd-unstable = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.isc.org/bind/";
|
||||
description = "Domain name server";
|
||||
license = licenses.mpl20;
|
||||
changelog = "https://downloads.isc.org/isc/bind9/cur/${
|
||||
lib.versions.majorMinor version
|
||||
}/CHANGES";
|
||||
maintainers = with maintainers; [ globin ];
|
||||
platforms = platforms.unix;
|
||||
|
||||
outputsToInstall = [ "out" "dnsutils" "host" ];
|
||||
};
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h
|
||||
index 82b632ef04..dedfd4d33b 100644
|
||||
--- a/bin/named/include/named/globals.h
|
||||
+++ b/bin/named/include/named/globals.h
|
||||
@@ -69,7 +69,9 @@ EXTERN const char *named_g_version INIT(PACKAGE_VERSION);
|
||||
EXTERN const char *named_g_product INIT(PACKAGE_NAME);
|
||||
EXTERN const char *named_g_description INIT(PACKAGE_DESCRIPTION);
|
||||
EXTERN const char *named_g_srcid INIT(PACKAGE_SRCID);
|
||||
+#if 0
|
||||
EXTERN const char *named_g_configargs INIT(PACKAGE_CONFIGARGS);
|
||||
+#endif
|
||||
EXTERN const char *named_g_builder INIT(PACKAGE_BUILDER);
|
||||
EXTERN in_port_t named_g_port INIT(0);
|
||||
EXTERN in_port_t named_g_tlsport INIT(0);
|
||||
diff --git a/bin/named/main.c b/bin/named/main.c
|
||||
index 9ad2d0e277..9729a2b3fc 100644
|
||||
--- a/bin/named/main.c
|
||||
+++ b/bin/named/main.c
|
||||
@@ -481,7 +481,9 @@ printversion(bool verbose) {
|
||||
}
|
||||
|
||||
printf("running on %s\n", named_os_uname());
|
||||
+#if 0
|
||||
printf("built by %s with %s\n", PACKAGE_BUILDER, PACKAGE_CONFIGARGS);
|
||||
+#endif
|
||||
#ifdef __clang__
|
||||
printf("compiled by CLANG %s\n", __VERSION__);
|
||||
#else /* ifdef __clang__ */
|
||||
@@ -1027,9 +1029,11 @@ setup(void) {
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, "running on %s",
|
||||
named_os_uname());
|
||||
|
||||
+#if 0
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, "built with %s",
|
||||
PACKAGE_CONFIGARGS);
|
||||
+#endif
|
||||
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
bind = callPackage ./. { };
|
||||
dnsutils = bind.dnsutils;
|
||||
dig = lib.addMetaAttrs { mainProgram = "dig"; } bind.dnsutils;
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
{ lib, stdenv, aacSupport ? true, alsa-lib, autoreconfHook, bluez, dbus, fdk_aac
|
||||
, fetchFromGitHub, gitUpdater, glib, libbsd, ncurses, pkg-config, readline, sbc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "bluez-alsa";
|
||||
version = "4.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Arkq";
|
||||
repo = "bluez-alsa";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-oGaYiSkOhqfjUl+mHTs3gqFcxli3cgkRtT6tbjy3ht0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
|
||||
buildInputs = [ alsa-lib bluez glib sbc dbus readline libbsd ncurses ]
|
||||
++ lib.optionals aacSupport [ fdk_aac ];
|
||||
|
||||
configureFlags = [
|
||||
(lib.enableFeature aacSupport "aac")
|
||||
(lib.enableFeature true "hcitop")
|
||||
(lib.enableFeature true "rfcomm")
|
||||
(lib.withFeatureAs true "alsaplugindir" "${placeholder "out"}/lib/alsa-lib")
|
||||
(lib.withFeatureAs true "dbusconfdir"
|
||||
"${placeholder "out"}/share/dbus-1/system.d")
|
||||
];
|
||||
|
||||
passthru.updateScript = gitUpdater { };
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/Arkq/bluez-alsa";
|
||||
description = "Bluez 5 Bluetooth Audio ALSA Backend";
|
||||
longDescription = ''
|
||||
Bluez-ALSA (BlueALSA) is an ALSA backend for Bluez 5 audio interface.
|
||||
Bluez-ALSA registers all Bluetooth devices with audio profiles in Bluez
|
||||
under a virtual ALSA PCM device called `bluealsa` that supports both
|
||||
playback and capture.
|
||||
|
||||
Some backstory: Bluez 5 removed built-in support for ALSA in favor of a
|
||||
generic interface for 3rd party appliations. Thereafter, PulseAudio
|
||||
implemented a backend for that interface and became the only way to get
|
||||
Bluetooth audio with Bluez 5. Users prefering ALSA stayed on Bluez 4.
|
||||
However, Bluez 4 eventually became deprecated.
|
||||
|
||||
This package is a rebirth of a direct interface between ALSA and Bluez 5,
|
||||
that, unlike PulseAudio, provides KISS near-metal-like experience. It is
|
||||
not possible to run BluezALSA and PulseAudio Bluetooth at the same time
|
||||
due to limitations in Bluez, but it is possible to run PulseAudio over
|
||||
BluezALSA if you disable `bluetooth-discover` and `bluez5-discover`
|
||||
modules in PA and configure it to play/capture sound over `bluealsa` PCM.
|
||||
'';
|
||||
license = with lib.licenses; [ mit ];
|
||||
mainProgram = "bluealsa";
|
||||
maintainers = with lib.maintainers; [ AndersonTorres oxij ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
# TODO: aptxSupport
|
|
@ -1,31 +0,0 @@
|
|||
{ lib, stdenv, autoreconfHook, fetchFromGitHub, glib, pkg-config, readline
|
||||
, unstableGitUpdater }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "bluez-tools";
|
||||
version = "unstable-2020-10-25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "khvzak";
|
||||
repo = "bluez-tools";
|
||||
rev = "f65321736475429316f07ee94ec0deac8e46ec4a";
|
||||
hash = "sha256-GNtuMqMv/87bp3GX9Lh+CK/VKPluNVeWZRRVOD5NY3Y=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
|
||||
buildInputs = [ glib readline ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
passthru.updateScript = unstableGitUpdater { };
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/khvzak/bluez-tools";
|
||||
description = "A set of tools to manage bluetooth devices for linux";
|
||||
license = with lib.licenses; [ gpl2Plus ];
|
||||
mainProgram = "bt-agent";
|
||||
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
|
@ -1,135 +0,0 @@
|
|||
{ lib, stdenv, alsa-lib, dbus, docutils, ell, enableExperimental ? false
|
||||
, fetchurl, glib, json_c, libical, pkg-config, python3, readline, systemdMinimal
|
||||
, udev }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "bluez";
|
||||
version = "5.72";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/bluetooth/bluez-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-SZ1/o0WplsG7ZQ9cZ0nh2SkRH6bs4L4OmGh/7mEkU24=";
|
||||
};
|
||||
|
||||
patches =
|
||||
# Disable one failing test with musl libc, also seen by alpine
|
||||
# https://github.com/bluez/bluez/issues/726
|
||||
lib.optional (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_64)
|
||||
(fetchurl {
|
||||
url =
|
||||
"https://git.alpinelinux.org/aports/plain/main/bluez/disable_aics_unit_testcases.patch?id=8e96f7faf01a45f0ad8449c1cd825db63a8dfd48";
|
||||
hash = "sha256-1PJkipqBO3qxxOqRFQKfpWlne1kzTCgtnTFYI1cFQt4=";
|
||||
});
|
||||
|
||||
buildInputs = [ alsa-lib dbus ell glib json_c libical python3 readline udev ];
|
||||
|
||||
nativeBuildInputs =
|
||||
[ docutils pkg-config python3.pkgs.pygments python3.pkgs.wrapPython ];
|
||||
|
||||
outputs = [ "out" "dev" "test" ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace tools/hid2hci.rules \
|
||||
--replace /sbin/udevadm ${systemdMinimal}/bin/udevadm \
|
||||
--replace "hid2hci " "$out/lib/udev/hid2hci "
|
||||
'' +
|
||||
# Disable some tests:
|
||||
# - test-mesh-crypto depends on the following kernel settings:
|
||||
# CONFIG_CRYPTO_[USER|USER_API|USER_API_AEAD|USER_API_HASH|AES|CCM|AEAD|CMAC]
|
||||
''
|
||||
if [[ ! -f unit/test-mesh-crypto.c ]]; then
|
||||
echo "unit/test-mesh-crypto.c no longer exists"
|
||||
false
|
||||
fi
|
||||
echo 'int main() { return 77; }' > unit/test-mesh-crypto.c
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--localstatedir=/var"
|
||||
(lib.enableFeature enableExperimental "experimental")
|
||||
(lib.enableFeature true "btpclient")
|
||||
(lib.enableFeature true "cups")
|
||||
(lib.enableFeature true "external-ell")
|
||||
(lib.enableFeature true "health")
|
||||
(lib.enableFeature true "hid2hci")
|
||||
(lib.enableFeature true "library")
|
||||
(lib.enableFeature true "logger")
|
||||
(lib.enableFeature true "mesh")
|
||||
(lib.enableFeature true "midi")
|
||||
(lib.enableFeature true "nfc")
|
||||
(lib.enableFeature true "pie")
|
||||
(lib.enableFeature true "sixaxis")
|
||||
# Set "deprecated" to provide ciptool, sdptool, and rfcomm (unmaintained);
|
||||
# superseded by new D-Bus APIs
|
||||
(lib.enableFeature true "deprecated")
|
||||
(lib.withFeatureAs true "dbusconfdir" "${placeholder "out"}/share")
|
||||
(lib.withFeatureAs true "dbussessionbusdir"
|
||||
"${placeholder "out"}/share/dbus-1/services")
|
||||
(lib.withFeatureAs true "dbussystembusdir"
|
||||
"${placeholder "out"}/share/dbus-1/system-services")
|
||||
(lib.withFeatureAs true "systemdsystemunitdir"
|
||||
"${placeholder "out"}/etc/systemd/system")
|
||||
(lib.withFeatureAs true "systemduserunitdir"
|
||||
"${placeholder "out"}/etc/systemd/user")
|
||||
(lib.withFeatureAs true "udevdir" "${placeholder "out"}/lib/udev")
|
||||
];
|
||||
|
||||
makeFlags = [ "rulesdir=${placeholder "out"}/lib/udev/rules.d" ];
|
||||
|
||||
# Work around `make install' trying to create /var/lib/bluetooth.
|
||||
installFlags = [ "statedir=$(TMPDIR)/var/lib/bluetooth" ];
|
||||
|
||||
doCheck = stdenv.hostPlatform.isx86_64;
|
||||
|
||||
postInstall = let pythonPath = with python3.pkgs; [ dbus-python pygobject3 ];
|
||||
in ''
|
||||
mkdir -p $test/{bin,test}
|
||||
cp -a test $test
|
||||
pushd $test/test
|
||||
for t in \
|
||||
list-devices \
|
||||
monitor-bluetooth \
|
||||
simple-agent \
|
||||
test-adapter \
|
||||
test-device \
|
||||
test-thermometer \
|
||||
; do
|
||||
ln -s ../test/$t $test/bin/bluez-$t
|
||||
done
|
||||
popd
|
||||
wrapPythonProgramsIn $test/test "$test/test ${toString pythonPath}"
|
||||
|
||||
# for bluez4 compatibility for NixOS
|
||||
mkdir $out/sbin
|
||||
ln -s ../libexec/bluetooth/bluetoothd $out/sbin/bluetoothd
|
||||
ln -s ../libexec/bluetooth/obexd $out/sbin/obexd
|
||||
|
||||
# Add extra configuration
|
||||
mkdir $out/etc/bluetooth
|
||||
ln -s /etc/bluetooth/main.conf $out/etc/bluetooth/main.conf
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/204418
|
||||
ln -s /etc/bluetooth/input.conf $out/etc/bluetooth/input.conf
|
||||
ln -s /etc/bluetooth/network.conf $out/etc/bluetooth/network.conf
|
||||
|
||||
# Add missing tools, ref https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/bluez
|
||||
for files in $(find tools/ -type f -perm -755); do
|
||||
filename=$(basename $files)
|
||||
install -Dm755 tools/$filename $out/bin/$filename
|
||||
done
|
||||
install -Dm755 attrib/gatttool $out/bin/gatttool
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.bluez.org/";
|
||||
description = "Official Linux Bluetooth protocol stack";
|
||||
changelog =
|
||||
"https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/ChangeLog?h=${finalAttrs.version}";
|
||||
license = with lib.licenses; [ bsd2 gpl2Plus lgpl21Plus mit ];
|
||||
mainProgram = "btinfo";
|
||||
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
|
@ -1,9 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
bluez = callPackage ./. { };
|
||||
bluez5 = bluez;
|
||||
bluez5-experimental = bluez-experimental;
|
||||
bluez-experimental = bluez.override { enableExperimental = true; };
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook
|
||||
# doc: https://github.com/ivmai/bdwgc/blob/v8.2.6/doc/README.macros (LARGE_CONFIG)
|
||||
, enableLargeConfig ? false, enableMmap ? true, enableStatic ? false
|
||||
, nixVersions }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "boehm-gc";
|
||||
version = "8.2.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ivmai";
|
||||
repo = "bdwgc";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-y6hU5qU4qO9VvQvKNH9dvReCrf3+Ih2HHbF6IS1V3WQ=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "doc" ];
|
||||
separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl";
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
configureFlags = [ "--enable-cplusplus" "--with-libatomic-ops=none" ]
|
||||
++ lib.optional enableStatic "--enable-static"
|
||||
++ lib.optional enableMmap "--enable-mmap"
|
||||
++ lib.optional enableLargeConfig "--enable-large-config";
|
||||
|
||||
# This stanza can be dropped when a release fixes this issue:
|
||||
# https://github.com/ivmai/bdwgc/issues/376
|
||||
# The version is checked with == instead of versionAtLeast so we
|
||||
# don't forget to disable the fix (and if the next release does
|
||||
# not fix the problem the test failure will be a reminder to
|
||||
# extend the set of versions requiring the workaround).
|
||||
makeFlags = lib.optionals
|
||||
(stdenv.hostPlatform.isPower64 && finalAttrs.version == "8.2.6") [
|
||||
# do not use /proc primitives to track dirty bits; see:
|
||||
# https://github.com/ivmai/bdwgc/issues/479#issuecomment-1279687537
|
||||
# https://github.com/ivmai/bdwgc/blob/54522af853de28f45195044dadfd795c4e5942aa/include/private/gcconfig.h#L741
|
||||
"CFLAGS_EXTRA=-DNO_SOFT_VDB"
|
||||
];
|
||||
|
||||
# `gctest` fails under emulation on aarch64-darwin
|
||||
doCheck = !(stdenv.isDarwin && stdenv.isx86_64);
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.tests = nixVersions;
|
||||
|
||||
meta = {
|
||||
homepage = "https://hboehm.info/gc/";
|
||||
description =
|
||||
"The Boehm-Demers-Weiser conservative garbage collector for C and C++";
|
||||
longDescription = ''
|
||||
The Boehm-Demers-Weiser conservative garbage collector can be used as a
|
||||
garbage collecting replacement for C malloc or C++ new. It allows you
|
||||
to allocate memory basically as you normally would, without explicitly
|
||||
deallocating memory that is no longer useful. The collector
|
||||
automatically recycles memory when it determines that it can no longer
|
||||
be otherwise accessed.
|
||||
|
||||
The collector is also used by a number of programming language
|
||||
implementations that either use C as intermediate code, want to
|
||||
facilitate easier interoperation with C libraries, or just prefer the
|
||||
simple collector interface.
|
||||
|
||||
Alternatively, the garbage collector may be used as a leak detector for
|
||||
C or C++ programs, though that is not its primary goal.
|
||||
'';
|
||||
changelog =
|
||||
"https://github.com/ivmai/bdwgc/blob/v${finalAttrs.version}/ChangeLog";
|
||||
license =
|
||||
"https://hboehm.info/gc/license.txt"; # non-copyleft, X11-style license
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
|
@ -1,65 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, bison
|
||||
# boost derivation to use for the src and version.
|
||||
# This is used by the boost derivation to build
|
||||
# a b2 matching their version (by overriding this
|
||||
# argument). Infinite recursion is not an issue
|
||||
# since we only look at src and version of boost.
|
||||
, useBoost ? { } }:
|
||||
|
||||
let defaultVersion = "4.4.1";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "boost-build";
|
||||
version =
|
||||
if useBoost ? version then "boost-${useBoost.version}" else defaultVersion;
|
||||
|
||||
src = useBoost.src or (fetchFromGitHub {
|
||||
owner = "boostorg";
|
||||
repo = "build";
|
||||
rev = defaultVersion;
|
||||
sha256 = "1r4rwlq87ydmsdqrik4ly5iai796qalvw7603mridg2nwcbbnf54";
|
||||
});
|
||||
|
||||
# b2 is in a subdirectory of boost source tarballs
|
||||
postUnpack = lib.optionalString (useBoost ? src) ''
|
||||
sourceRoot="$sourceRoot/tools/build"
|
||||
'';
|
||||
|
||||
patches = useBoost.boostBuildPatches or [ ];
|
||||
|
||||
# Upstream defaults to gcc on darwin, but we use clang.
|
||||
postPatch = ''
|
||||
substituteInPlace src/build-system.jam \
|
||||
--replace "default-toolset = darwin" "default-toolset = clang-darwin"
|
||||
'' + lib.optionalString
|
||||
(useBoost ? version && lib.versionAtLeast useBoost.version "1.82") ''
|
||||
patchShebangs --build src/engine/build.sh
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ bison ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
./bootstrap.sh
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
./b2 install --prefix="$out"
|
||||
|
||||
# older versions of b2 created this symlink,
|
||||
# which we want to support building via useBoost.
|
||||
test -e "$out/bin/bjam" || ln -s b2 "$out/bin/bjam"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.boost.org/build/";
|
||||
license = lib.licenses.boost;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ ivan-tkatchev ];
|
||||
};
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{ callPackage, fetchurl, fetchpatch, ... }@args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.75.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://sourceforge/boost/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
];
|
||||
# SHA256 from http://www.boost.org/users/history/version_1_75_0.html
|
||||
sha256 = "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb";
|
||||
};
|
||||
})
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{ callPackage, fetchurl, fetchpatch, ... }@args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.77.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://sourceforge/boost/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
];
|
||||
# SHA256 from http://www.boost.org/users/history/version_1_77_0.html
|
||||
sha256 = "sha256-/J+F/AMOIzFCkIJBr3qEbmBjCqc4jeml+vsfOiaECFQ=";
|
||||
};
|
||||
})
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{ callPackage, fetchurl, fetchpatch, ... }@args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.78.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://sourceforge/boost/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
];
|
||||
# SHA256 from http://www.boost.org/users/history/version_1_78_0.html
|
||||
sha256 = "8681f175d4bdb26c52222665793eef08490d7758529330f98d3b29dd0735bccc";
|
||||
};
|
||||
})
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{ callPackage, fetchurl, fetchpatch, ... }@args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.79.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://sourceforge/boost/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
];
|
||||
# SHA256 from http://www.boost.org/users/history/version_1_79_0.html
|
||||
sha256 = "475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39";
|
||||
};
|
||||
})
|
|
@ -1,18 +0,0 @@
|
|||
{ callPackage, fetchurl, fetchpatch, ... }@args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.80.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://sourceforge/boost/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
];
|
||||
# SHA256 from http://www.boost.org/users/history/version_1_80_0.html
|
||||
sha256 = "1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0";
|
||||
};
|
||||
})
|
|
@ -1,18 +0,0 @@
|
|||
{ callPackage, fetchurl, fetchpatch, ... }@args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.81.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://sourceforge/boost/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
];
|
||||
# SHA256 from http://www.boost.org/users/history/version_1_81_0.html
|
||||
sha256 = "71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa";
|
||||
};
|
||||
})
|
|
@ -1,18 +0,0 @@
|
|||
{ callPackage, fetchurl, fetchpatch, ... }@args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.82.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://sourceforge/boost/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
];
|
||||
# SHA256 from http://www.boost.org/users/history/version_1_82_0.html
|
||||
sha256 = "a6e1ab9b0860e6a2881dd7b21fe9f737a095e5f33a3a874afc6a345228597ee6";
|
||||
};
|
||||
})
|
|
@ -1,18 +0,0 @@
|
|||
{ callPackage, fetchurl, fetchpatch, ... }@args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.83.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://sourceforge/boost/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
];
|
||||
# SHA256 from http://www.boost.org/users/history/version_1_83_0.html
|
||||
sha256 = "6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e";
|
||||
};
|
||||
})
|
|
@ -1,18 +0,0 @@
|
|||
{ callPackage, fetchurl, fetchpatch, ... }@args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.84.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://sourceforge/boost/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
];
|
||||
# SHA256 from http://www.boost.org/users/history/version_1_84_0.html
|
||||
sha256 = "cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454";
|
||||
};
|
||||
})
|
|
@ -1,18 +0,0 @@
|
|||
{ callPackage, fetchurl, fetchpatch, ... }@args:
|
||||
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.85.0";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"mirror://sourceforge/boost/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${
|
||||
builtins.replaceStrings [ "." ] [ "_" ] version
|
||||
}.tar.bz2"
|
||||
];
|
||||
# SHA256 from http://www.boost.org/users/history/version_1_85_0.html
|
||||
sha256 = "7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617";
|
||||
};
|
||||
})
|
|
@ -1,22 +0,0 @@
|
|||
diff --git a/tools/boost_install/boost-install.jam b/tools/boost_install/boost-install.jam
|
||||
index 4238f921e..8fc1ea269 100644
|
||||
--- a/tools/boost_install/boost-install.jam
|
||||
+++ b/tools/boost_install/boost-install.jam
|
||||
@@ -649,7 +649,7 @@ rule generate-cmake-config- ( target : sources * : properties * )
|
||||
""
|
||||
"# Compute the include and library directories relative to this file."
|
||||
""
|
||||
- "get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
|
||||
+ "get_filename_component(_BOOST_REAL_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
|
||||
: true ;
|
||||
|
||||
if [ path.is-rooted $(cmakedir) ]
|
||||
@@ -668,6 +668,8 @@ rule generate-cmake-config- ( target : sources * : properties * )
|
||||
" unset(_BOOST_CMAKEDIR_ORIGINAL)"
|
||||
"endif()"
|
||||
""
|
||||
+ "# Assume that the installer actually did know where the libs were to be installed"
|
||||
+ "get_filename_component(_BOOST_CMAKEDIR \"$(cmakedir-native)\" REALPATH)"
|
||||
: true ;
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
diff --git a/tools/build/src/tools/python.jam b/tools/build/src/tools/python.jam
|
||||
index 273b28a..2d2031e 100644
|
||||
--- a/tools/build/src/tools/python.jam
|
||||
+++ b/tools/build/src/tools/python.jam
|
||||
@@ -428,13 +428,7 @@ local rule windows-installed-pythons ( version ? )
|
||||
|
||||
local rule darwin-installed-pythons ( version ? )
|
||||
{
|
||||
- version ?= $(.version-countdown) ;
|
||||
-
|
||||
- local prefix
|
||||
- = [ GLOB /System/Library/Frameworks /Library/Frameworks
|
||||
- : Python.framework ] ;
|
||||
-
|
||||
- return $(prefix)/Versions/$(version)/bin/python ;
|
||||
+ return ;
|
||||
}
|
||||
|
||||
|
||||
@@ -890,25 +884,6 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
|
||||
|
||||
# See if we can find a framework directory on darwin.
|
||||
local framework-directory ;
|
||||
- if $(target-os) = darwin
|
||||
- {
|
||||
- # Search upward for the framework directory.
|
||||
- local framework-directory = $(libraries[-1]) ;
|
||||
- while $(framework-directory:D=) && $(framework-directory:D=) != Python.framework
|
||||
- {
|
||||
- framework-directory = $(framework-directory:D) ;
|
||||
- }
|
||||
-
|
||||
- if $(framework-directory:D=) = Python.framework
|
||||
- {
|
||||
- debug-message framework directory is \"$(framework-directory)\" ;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- debug-message "no framework directory found; using library path" ;
|
||||
- framework-directory = ;
|
||||
- }
|
||||
- }
|
||||
|
||||
local dll-path = $(libraries) ;
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{ lib, callPackage, boost-build, fetchurl }:
|
||||
|
||||
let
|
||||
makeBoost = file:
|
||||
lib.fix (self:
|
||||
callPackage file {
|
||||
boost-build = boost-build.override {
|
||||
# useBoost allows us passing in src and version from
|
||||
# the derivation we are building to get a matching b2 version.
|
||||
useBoost = self;
|
||||
};
|
||||
});
|
||||
in {
|
||||
boost175 = makeBoost ./1.75.nix;
|
||||
boost177 = makeBoost ./1.77.nix;
|
||||
boost178 = makeBoost ./1.78.nix;
|
||||
boost179 = makeBoost ./1.79.nix;
|
||||
boost180 = makeBoost ./1.80.nix;
|
||||
boost181 = makeBoost ./1.81.nix;
|
||||
boost182 = makeBoost ./1.82.nix;
|
||||
boost183 = makeBoost ./1.83.nix;
|
||||
boost184 = makeBoost ./1.84.nix;
|
||||
boost185 = makeBoost ./1.85.nix;
|
||||
}
|
|
@ -1,270 +0,0 @@
|
|||
{ lib, stdenv, icu, expat, zlib, bzip2, zstd, xz, python ? null
|
||||
, fixDarwinDylibNames, libiconv, libxcrypt, boost-build, fetchpatch, which
|
||||
, toolset ?
|
||||
if stdenv.cc.isClang then "clang" else if stdenv.cc.isGNU then "gcc" else null
|
||||
, enableRelease ? true, enableDebug ? false, enableSingleThreaded ? false
|
||||
, enableMultiThreaded ? true, enableShared ?
|
||||
!(with stdenv.hostPlatform; isStatic || isMinGW) # problems for now
|
||||
, enableStatic ? !enableShared, enablePython ? false, enableNumpy ? false
|
||||
, enableIcu ? stdenv.hostPlatform == stdenv.buildPlatform, taggedLayout ?
|
||||
((enableRelease && enableDebug)
|
||||
|| (enableSingleThreaded && enableMultiThreaded)
|
||||
|| (enableShared && enableStatic)), patches ? [ ], boostBuildPatches ? [ ]
|
||||
, useMpi ? false, mpi, extraB2Args ? [ ]
|
||||
|
||||
# Attributes inherit from specific versions
|
||||
, version, src, ... }:
|
||||
|
||||
# We must build at least one type of libraries
|
||||
assert enableShared || enableStatic;
|
||||
|
||||
assert enableNumpy -> enablePython;
|
||||
|
||||
let
|
||||
|
||||
variant = lib.concatStringsSep ","
|
||||
(lib.optional enableRelease "release" ++ lib.optional enableDebug "debug");
|
||||
|
||||
threading = lib.concatStringsSep ","
|
||||
(lib.optional enableSingleThreaded "single"
|
||||
++ lib.optional enableMultiThreaded "multi");
|
||||
|
||||
link = lib.concatStringsSep ","
|
||||
(lib.optional enableShared "shared" ++ lib.optional enableStatic "static");
|
||||
|
||||
runtime-link = if enableShared then "shared" else "static";
|
||||
|
||||
# To avoid library name collisions
|
||||
layout = if taggedLayout then "tagged" else "system";
|
||||
|
||||
needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi
|
||||
|| (stdenv.isDarwin && enableShared);
|
||||
|
||||
b2Args = lib.concatStringsSep " " ([
|
||||
"--includedir=$dev/include"
|
||||
"--libdir=$out/lib"
|
||||
"-j$NIX_BUILD_CORES"
|
||||
"--layout=${layout}"
|
||||
"variant=${variant}"
|
||||
"threading=${threading}"
|
||||
"link=${link}"
|
||||
"-sEXPAT_INCLUDE=${expat.dev}/include"
|
||||
"-sEXPAT_LIBPATH=${expat.out}/lib"
|
||||
|
||||
# TODO: make this unconditional
|
||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform ||
|
||||
# required on mips; see 61d9f201baeef4c4bb91ad8a8f5f89b747e0dfe4
|
||||
(stdenv.hostPlatform.isMips && lib.versionAtLeast version "1.79")) [
|
||||
"address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}"
|
||||
"architecture=${
|
||||
if stdenv.hostPlatform.isMips64 then
|
||||
if lib.versionOlder version "1.78" then "mips1" else "mips"
|
||||
else if stdenv.hostPlatform.parsed.cpu.name == "s390x" then
|
||||
"s390x"
|
||||
else
|
||||
toString stdenv.hostPlatform.parsed.cpu.family
|
||||
}"
|
||||
# env in host triplet for Mach-O is "macho", but boost binary format for Mach-O is "mach-o"
|
||||
"binary-format=${
|
||||
if stdenv.hostPlatform.isMacho then
|
||||
"mach-o"
|
||||
else
|
||||
toString stdenv.hostPlatform.parsed.kernel.execFormat.name
|
||||
}"
|
||||
"target-os=${toString stdenv.hostPlatform.parsed.kernel.name}"
|
||||
|
||||
# adapted from table in boost manual
|
||||
# https://www.boost.org/doc/libs/1_66_0/libs/context/doc/html/context/architectures.html
|
||||
"abi=${
|
||||
if stdenv.hostPlatform.parsed.cpu.family == "arm" then
|
||||
"aapcs"
|
||||
else if stdenv.hostPlatform.isWindows then
|
||||
"ms"
|
||||
else if stdenv.hostPlatform.isMips32 then
|
||||
"o32"
|
||||
else if stdenv.hostPlatform.isMips64n64 then
|
||||
"n64"
|
||||
else
|
||||
"sysv"
|
||||
}"
|
||||
] ++ lib.optional (link != "static") "runtime-link=${runtime-link}"
|
||||
++ lib.optional (variant == "release") "debug-symbols=off"
|
||||
++ lib.optional (toolset != null) "toolset=${toolset}"
|
||||
++ lib.optional (!enablePython) "--without-python"
|
||||
++ lib.optional needUserConfig "--user-config=user-config.jam"
|
||||
++ lib.optional
|
||||
(stdenv.buildPlatform.isDarwin && stdenv.hostPlatform.isLinux) "pch=off"
|
||||
++ lib.optionals stdenv.hostPlatform.isMinGW [ "threadapi=win32" ]
|
||||
++ extraB2Args);
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "boost";
|
||||
|
||||
inherit src version;
|
||||
|
||||
patchFlags = [ ];
|
||||
|
||||
patches = patches
|
||||
++ lib.optional stdenv.isDarwin ./darwin-no-system-python.patch
|
||||
++ [ ./cmake-paths-173.patch ] ++ lib.optional (version == "1.77.0")
|
||||
(fetchpatch {
|
||||
url =
|
||||
"https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch";
|
||||
relative = "include";
|
||||
sha256 = "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4=";
|
||||
})
|
||||
# Fixes ABI detection
|
||||
++ lib.optional (version == "1.83.0") (fetchpatch {
|
||||
url =
|
||||
"https://github.com/boostorg/context/commit/6fa6d5c50d120e69b2d8a1c0d2256ee933e94b3b.patch";
|
||||
stripLen = 1;
|
||||
extraPrefix = "libs/context/";
|
||||
sha256 = "sha256-bCfLL7bD1Rn4Ie/P3X+nIcgTkbXdCX6FW7B9lHsmVW8=";
|
||||
})
|
||||
# This fixes another issue regarding ill-formed constant expressions, which is a default error
|
||||
# in clang 16 and will be a hard error in clang 17.
|
||||
++ lib.optional (lib.versionOlder version "1.80") (fetchpatch {
|
||||
url =
|
||||
"https://github.com/boostorg/log/commit/77f1e20bd69c2e7a9e25e6a9818ae6105f7d070c.patch";
|
||||
relative = "include";
|
||||
hash = "sha256-6qOiGJASm33XzwoxVZfKJd7sTlQ5yd+MMFQzegXm5RI=";
|
||||
}) ++ lib.optionals (lib.versionOlder version "1.81") [
|
||||
# libc++ 15 dropped support for `std::unary_function` and `std::binary_function` in C++17+.
|
||||
# C++17 is the default for clang 16, but clang 15 is also affected in that language mode.
|
||||
# This patch is for Boost 1.80, but it also applies to earlier versions.
|
||||
(fetchpatch {
|
||||
url = "https://www.boost.org/patches/1_80_0/0005-config-libcpp15.patch";
|
||||
hash = "sha256-ULFMzKphv70unvPZ3o4vSP/01/xbSM9a2TlIV67eXDQ=";
|
||||
})
|
||||
# This fixes another ill-formed contant expressions issue flagged by clang 16.
|
||||
(fetchpatch {
|
||||
url =
|
||||
"https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a.patch";
|
||||
relative = "include";
|
||||
hash = "sha256-dq4SVgxkPJSC7Fvr59VGnXkM4Lb09kYDaBksCHo9C0s=";
|
||||
})
|
||||
# This fixes an issue in Python 3.11 about Py_TPFLAGS_HAVE_GC
|
||||
(fetchpatch {
|
||||
name = "python311-compatibility.patch";
|
||||
url =
|
||||
"https://github.com/boostorg/python/commit/a218babc8daee904a83f550fb66e5cb3f1cb3013.patch";
|
||||
hash = "sha256-IHxLtJBx0xSy7QEr8FbCPofsjcPuSYzgtPwDlx1JM+4=";
|
||||
stripLen = 1;
|
||||
extraPrefix = "libs/python/";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://boost.org/";
|
||||
description = "Collection of C++ libraries";
|
||||
license = licenses.boost;
|
||||
platforms = platforms.unix ++ platforms.windows;
|
||||
# boost-context lacks support for the N32 ABI on mips64. The build
|
||||
# will succeed, but packages depending on boost-context will fail with
|
||||
# a very cryptic error message.
|
||||
badPlatforms = [ lib.systems.inspect.patterns.isMips64n32 ];
|
||||
maintainers = with maintainers; [ hjones2199 ];
|
||||
};
|
||||
|
||||
# passthru = {
|
||||
# inherit boostBuildPatches;
|
||||
# };
|
||||
|
||||
preConfigure = lib.optionalString useMpi ''
|
||||
cat << EOF >> user-config.jam
|
||||
using mpi : ${lib.getDev mpi}/bin/mpiCC ;
|
||||
EOF
|
||||
''
|
||||
# On darwin we need to add the `$out/lib` to the libraries' rpath explicitly,
|
||||
# otherwise the dynamic linker is unable to resolve the reference to @rpath
|
||||
# when the boost libraries want to load each other at runtime.
|
||||
+ lib.optionalString (stdenv.isDarwin && enableShared) ''
|
||||
cat << EOF >> user-config.jam
|
||||
using clang-darwin : : ${stdenv.cc.targetPrefix}c++
|
||||
: <linkflags>"-rpath $out/lib/"
|
||||
;
|
||||
EOF
|
||||
''
|
||||
# b2 has trouble finding the correct compiler and tools for cross compilation
|
||||
# since it apparently ignores $CC, $AR etc. Thus we need to set everything
|
||||
# in user-config.jam. To keep things simple we just set everything in an
|
||||
# uniform way for clang and gcc (which works thanks to our cc-wrapper).
|
||||
# We pass toolset later which will make b2 invoke everything in the right
|
||||
# way -- the other toolset in user-config.jam will be ignored.
|
||||
+ lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
cat << EOF >> user-config.jam
|
||||
using gcc : cross : ${stdenv.cc.targetPrefix}c++
|
||||
: <archiver>$AR
|
||||
<ranlib>$RANLIB
|
||||
;
|
||||
|
||||
using clang : cross : ${stdenv.cc.targetPrefix}c++
|
||||
: <archiver>$AR
|
||||
<ranlib>$RANLIB
|
||||
;
|
||||
EOF
|
||||
''
|
||||
# b2 needs to be explicitly told how to find Python when cross-compiling
|
||||
+ lib.optionalString enablePython ''
|
||||
cat << EOF >> user-config.jam
|
||||
using python : : ${python.interpreter}
|
||||
: ${python}/include/python${python.pythonVersion}
|
||||
: ${python}/lib
|
||||
;
|
||||
EOF
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_LINK =
|
||||
lib.optionalString stdenv.isDarwin "-headerpad_max_install_names";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ which boost-build ]
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||
buildInputs = [ expat zlib bzip2 libiconv ]
|
||||
++ lib.optional (lib.versionAtLeast version "1.69") zstd ++ [ xz ]
|
||||
++ lib.optional enableIcu icu
|
||||
++ lib.optionals enablePython [ libxcrypt python ]
|
||||
++ lib.optional enableNumpy python.pkgs.numpy;
|
||||
|
||||
configureScript = "./bootstrap.sh";
|
||||
configurePlatforms = [ ];
|
||||
dontDisableStatic = true;
|
||||
dontAddStaticConfigureFlags = true;
|
||||
configureFlags = [
|
||||
"--includedir=$(dev)/include"
|
||||
"--libdir=$(out)/lib"
|
||||
"--with-bjam=b2" # prevent bootstrapping b2 in configurePhase
|
||||
] ++ lib.optional (toolset != null) "--with-toolset=${toolset}"
|
||||
++ [ (if enableIcu then "--with-icu=${icu.dev}" else "--without-icu") ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
b2 ${b2Args}
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
# boostbook is needed by some applications
|
||||
mkdir -p $dev/share/boostbook
|
||||
cp -a tools/boostbook/{xsl,dtd} $dev/share/boostbook/
|
||||
|
||||
# Let boost install everything else
|
||||
b2 ${b2Args} install
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Make boost header paths relative so that they are not runtime dependencies
|
||||
cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \
|
||||
-exec sed '1s/^\xef\xbb\xbf//;1i#line 1 "{}"' -i '{}' \;
|
||||
'' + lib.optionalString stdenv.hostPlatform.isMinGW ''
|
||||
$RANLIB "$out/lib/"*.a
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
setOutputFlags = false;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
inherit (callPackage ./. { inherit (buildPackages) boost-build; })
|
||||
boost175 boost177 boost178 boost179 boost180 boost181 boost182 boost183
|
||||
boost184 boost185;
|
||||
|
||||
boost = boost181;
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
{ lib, stdenv, linuxHeaders, libopcodes, libopcodes_2_38, libbfd, libbfd_2_38
|
||||
, elfutils, readline, zlib, python3, bison, flex }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bpftools";
|
||||
|
||||
inherit (linuxHeaders) version src;
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
patches = [
|
||||
# fix unknown type name '__vector128' on ppc64le
|
||||
./include-asm-types-for-ppc64le.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ python3 bison flex ];
|
||||
buildInputs = (if (lib.versionAtLeast version "5.20") then [
|
||||
libopcodes
|
||||
libbfd
|
||||
] else [
|
||||
libopcodes_2_38
|
||||
libbfd_2_38
|
||||
]) ++ [ elfutils zlib readline ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs scripts/bpf_doc.py
|
||||
|
||||
cd tools/bpf
|
||||
substituteInPlace ./bpftool/Makefile \
|
||||
--replace '/usr/local' "$out" \
|
||||
--replace '/usr' "$out" \
|
||||
--replace '/sbin' '/bin'
|
||||
'';
|
||||
|
||||
buildFlags = [ "bpftool" "bpf_asm" "bpf_dbg" ];
|
||||
|
||||
installPhase = ''
|
||||
make -C bpftool install
|
||||
install -Dm755 -t $out/bin bpf_asm
|
||||
install -Dm755 -t $out/bin bpf_dbg
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/libbpf/bpftool";
|
||||
description = "Debugging/program analysis tools for the eBPF subsystem";
|
||||
license = [ licenses.gpl2 licenses.bsd2 ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/tools/include/uapi/linux/types.h b/tools/include/uapi/linux/types.h
|
||||
index 91fa51a9c31d..bfbd9b47277f 100644
|
||||
--- a/tools/include/uapi/linux/types.h
|
||||
+++ b/tools/include/uapi/linux/types.h
|
||||
@@ -2,7 +2,7 @@
|
||||
#ifndef _UAPI_LINUX_TYPES_H
|
||||
#define _UAPI_LINUX_TYPES_H
|
||||
|
||||
-#include <asm-generic/int-ll64.h>
|
||||
+#include <asm/types.h>
|
||||
|
||||
/* copied from linux:include/uapi/linux/types.h */
|
||||
#define __bitwise
|
|
@ -1,70 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake
|
||||
, staticOnly ? stdenv.hostPlatform.isStatic, testers }:
|
||||
|
||||
# ?TODO: there's also python lib in there
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "brotli";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "brotli";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-MvceRcle2dSkkucC2PlsCizsIf8iv95d8Xjqew266wc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# revert runpath change, breaks curl on darwin:
|
||||
# https://github.com/NixOS/nixpkgs/pull/254532#issuecomment-1722337476
|
||||
(fetchpatch {
|
||||
name = "revert-runpath.patch";
|
||||
url =
|
||||
"https://github.com/google/brotli/commit/f842c1bcf9264431cd3b15429a72b7dafbe80509.patch";
|
||||
hash = "sha256-W3LY3EjoHP74YsKOOcYQrzo+f0HbooOvEbnOibtN6TM=";
|
||||
revert = true;
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
|
||||
|
||||
outputs = [ "out" "dev" "lib" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
# Don't bother with "man" output for now,
|
||||
# it currently only makes the manpages hard to use.
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/man/man{1,3}
|
||||
cp ../docs/*.1 $out/share/man/man1/
|
||||
cp ../docs/*.3 $out/share/man/man3/
|
||||
'';
|
||||
|
||||
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/google/brotli";
|
||||
description = "A generic-purpose lossless compression algorithm and tool";
|
||||
longDescription = ''
|
||||
Brotli is a generic-purpose lossless compression algorithm that
|
||||
compresses data using a combination of a modern variant of the LZ77
|
||||
algorithm, Huffman coding and 2nd order context modeling, with a
|
||||
compression ratio comparable to the best currently available
|
||||
general-purpose compression methods. It is similar in speed with
|
||||
deflate but offers more dense compression.
|
||||
|
||||
The specification of the Brotli Compressed Data Format is defined
|
||||
in the following internet draft:
|
||||
http://www.ietf.org/id/draft-alakuijala-brotli
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ freezeboy ];
|
||||
pkgConfigModules = [ "libbrotlidec" "libbrotlienc" ];
|
||||
platforms = platforms.all;
|
||||
mainProgram = "brotli";
|
||||
};
|
||||
})
|
|
@ -1,48 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, writeTextDir, withCMake ? true, cmake
|
||||
|
||||
# sensitive downstream packages
|
||||
# for passthru.tests
|
||||
# , curl
|
||||
# , grpc # consumes cmake config
|
||||
}:
|
||||
|
||||
# Note: this package is used for bootstrapping fetchurl, and thus
|
||||
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
||||
# cgit) that are needed here should be included directly in Nixpkgs as
|
||||
# files.
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "c-ares";
|
||||
version = "1.27.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://c-ares.org/download/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-CnK+ZpWZVcQ+KvL70DQY6Cor1UZGBOyaYhR+N6zrQgs=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "man" ];
|
||||
|
||||
nativeBuildInputs = lib.optionals withCMake [ cmake ];
|
||||
|
||||
cmakeFlags = [ ] ++ lib.optionals stdenv.hostPlatform.isStatic [
|
||||
"-DCARES_SHARED=OFF"
|
||||
"-DCARES_STATIC=ON"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# passthru.tests = {
|
||||
# inherit grpc;
|
||||
# curl = (curl.override { c-aresSupport = true; }).tests.withCheck;
|
||||
# };
|
||||
|
||||
meta = with lib; {
|
||||
description = "A C library for asynchronous DNS requests";
|
||||
homepage = "https://c-ares.haxx.se";
|
||||
changelog = "https://c-ares.org/changelog.html#${
|
||||
lib.replaceStrings [ "." ] [ "_" ] version
|
||||
}";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
c-ares = callPackage ./. { };
|
||||
c-aresMinimal = callPackage ./. { withCMake = false; };
|
||||
}
|
|
@ -1,219 +0,0 @@
|
|||
{ lib, stdenv, writeText, fetchFromGitHub, buildcatrust, blacklist ? [ ]
|
||||
, extraCertificateFiles ? [ ], extraCertificateStrings ? [ ]
|
||||
|
||||
# Used by update.sh
|
||||
, nssOverride ? null
|
||||
|
||||
# Used for tests only
|
||||
, runCommand, cacert, openssl }:
|
||||
|
||||
let
|
||||
blocklist =
|
||||
writeText "cacert-blocklist.txt" (lib.concatStringsSep "\n" blacklist);
|
||||
extraCertificatesBundle = writeText "cacert-extra-certificates-bundle.crt"
|
||||
(lib.concatStringsSep "\n\n" extraCertificateStrings);
|
||||
|
||||
srcVersion = "3.98";
|
||||
version = if nssOverride != null then nssOverride.version else srcVersion;
|
||||
meta = with lib; {
|
||||
homepage = "https://curl.haxx.se/docs/caextract.html";
|
||||
description =
|
||||
"A bundle of X.509 certificates of public Certificate Authorities (CA)";
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ fpletz lukegb ];
|
||||
license = licenses.mpl20;
|
||||
};
|
||||
certdata = stdenv.mkDerivation {
|
||||
pname = "nss-cacert-certdata";
|
||||
inherit version;
|
||||
|
||||
src = if nssOverride != null then
|
||||
nssOverride.src
|
||||
else
|
||||
fetchFromGitHub {
|
||||
owner = "nss-dev";
|
||||
repo = "nss";
|
||||
rev = "NSS_${lib.replaceStrings [ "." ] [ "_" ] version}_RTM";
|
||||
hash = "sha256-0p1HzspxyzhzX46O7ax8tmYiaFEBeqEqEvman4NIiQc=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir $out
|
||||
cp lib/ckfw/builtins/certdata.txt $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
inherit meta;
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "nss-cacert";
|
||||
inherit version;
|
||||
|
||||
src = certdata;
|
||||
|
||||
outputs = [ "out" "unbundled" "p11kit" ];
|
||||
|
||||
nativeBuildInputs = [ buildcatrust ];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir unbundled
|
||||
buildcatrust \
|
||||
--certdata_input certdata.txt \
|
||||
--ca_bundle_input "${extraCertificatesBundle}" ${
|
||||
lib.escapeShellArgs (map (arg: "${arg}") extraCertificateFiles)
|
||||
} \
|
||||
--blocklist "${blocklist}" \
|
||||
--ca_bundle_output ca-bundle.crt \
|
||||
--ca_standard_bundle_output ca-no-trust-rules-bundle.crt \
|
||||
--ca_unpacked_output unbundled \
|
||||
--p11kit_output ca-bundle.trust.p11-kit
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -D -t "$out/etc/ssl/certs" ca-bundle.crt
|
||||
|
||||
# install standard PEM compatible bundle
|
||||
install -D -t "$out/etc/ssl/certs" ca-no-trust-rules-bundle.crt
|
||||
|
||||
# install p11-kit specific output to p11kit output
|
||||
install -D -t "$p11kit/etc/ssl/trust-source" ca-bundle.trust.p11-kit
|
||||
|
||||
# install individual certs in unbundled output
|
||||
install -D -t "$unbundled/etc/ssl/certs" unbundled/*.crt
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update.sh;
|
||||
tests = let
|
||||
isTrusted = ''
|
||||
isTrusted() {
|
||||
# isTrusted <unbundled-dir> <ca name> <ca sha256 fingerprint>
|
||||
for f in $1/etc/ssl/certs/*.crt; do
|
||||
if ! [[ -s "$f" ]]; then continue; fi
|
||||
fingerprint="$(openssl x509 -in "$f" -noout -fingerprint -sha256 | cut -f2 -d=)"
|
||||
if [[ "x$fingerprint" == "x$3" ]]; then
|
||||
# If the certificate is treated as rejected for TLS Web Server, then we consider it untrusted.
|
||||
if openssl x509 -in "$f" -noout -text | grep -q '^Rejected Uses:'; then
|
||||
if openssl x509 -in "$f" -noout -text | grep -A1 '^Rejected Uses:' | grep -q 'TLS Web Server'; then
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
'';
|
||||
in {
|
||||
# Test that building this derivation with a blacklist works, and that UTF-8 is supported.
|
||||
blacklist-utf8 = let
|
||||
blacklistCAToFingerprint = {
|
||||
# "blacklist" uses the CA name from the NSS bundle, but we check for presence using the SHA256 fingerprint.
|
||||
"CFCA EV ROOT" =
|
||||
"5C:C3:D7:8E:4E:1D:5E:45:54:7A:04:E6:87:3E:64:F9:0C:F9:53:6D:1C:CC:2E:F8:00:F3:55:C4:C5:FD:70:FD";
|
||||
"NetLock Arany (Class Gold) Főtanúsítvány" =
|
||||
"6C:61:DA:C3:A2:DE:F0:31:50:6B:E0:36:D2:A6:FE:40:19:94:FB:D1:3D:F9:C8:D4:66:59:92:74:C4:46:EC:98";
|
||||
};
|
||||
mapBlacklist = f:
|
||||
lib.concatStringsSep "\n"
|
||||
(lib.mapAttrsToList f blacklistCAToFingerprint);
|
||||
in runCommand "verify-the-cacert-filter-output" {
|
||||
cacert = cacert.unbundled;
|
||||
cacertWithExcludes = (cacert.override {
|
||||
blacklist = builtins.attrNames blacklistCAToFingerprint;
|
||||
}).unbundled;
|
||||
|
||||
nativeBuildInputs = [ openssl ];
|
||||
} ''
|
||||
${isTrusted}
|
||||
|
||||
# Ensure that each certificate is in the main "cacert".
|
||||
${mapBlacklist (caName: caFingerprint: ''
|
||||
isTrusted "$cacert" "${caName}" "${caFingerprint}" || ({
|
||||
echo "CA fingerprint ${caFingerprint} (${caName}) is missing from the CA bundle. Consider picking a different CA for the blacklist test." >&2
|
||||
exit 1
|
||||
})
|
||||
'')}
|
||||
|
||||
# Ensure that each certificate is NOT in the "cacertWithExcludes".
|
||||
${mapBlacklist (caName: caFingerprint: ''
|
||||
isTrusted "$cacertWithExcludes" "${caName}" "${caFingerprint}" && ({
|
||||
echo "CA fingerprint ${caFingerprint} (${caName}) is present in the cacertWithExcludes bundle." >&2
|
||||
exit 1
|
||||
})
|
||||
'')}
|
||||
|
||||
touch "$out"
|
||||
'';
|
||||
|
||||
# Test that we can add additional certificates to the store, and have them be trusted.
|
||||
extra-certificates = let
|
||||
extraCertificateStr = ''
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB5DCCAWqgAwIBAgIUItvsAYEIdYDkOIo5sdDYMcUaNuIwCgYIKoZIzj0EAwIw
|
||||
KTEnMCUGA1UEAwweTml4T1MgY2FjZXJ0IGV4dHJhIGNlcnRpZmljYXRlMB4XDTIx
|
||||
MDYxMjE5MDQzMFoXDTIyMDYxMjE5MDQzMFowKTEnMCUGA1UEAwweTml4T1MgY2Fj
|
||||
ZXJ0IGV4dHJhIGNlcnRpZmljYXRlMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEuP8y
|
||||
lAm6ZyQt9v/P6gTlV/a9R+D61WjucW04kaegOhg8csiluimYodiSv0Pbgymu+Zxm
|
||||
A3Bz9QGmytaYTiJ16083rJkwwIhqoYl7kWsLzreSTaLz87KH+rdeol59+H0Oo1Mw
|
||||
UTAdBgNVHQ4EFgQUCxuHfvqI4YVU5M+A0+aKvd1LrdswHwYDVR0jBBgwFoAUCxuH
|
||||
fvqI4YVU5M+A0+aKvd1LrdswDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAgNo
|
||||
ADBlAjEArgxgjdNmRlSEuai0dzlktmBEDZKy2Iiul+ttSoce9ohfEVYESwO602HW
|
||||
keVvI56vAjBCro3dc3m2TuktiKO6lQV56PUEyxko4H/sR5pnHlduCGRDlFzQKXf/
|
||||
pMMmtj7cVb8=
|
||||
-----END CERTIFICATE-----
|
||||
'';
|
||||
extraCertificateFile = ./test-cert-file.crt;
|
||||
extraCertificatesToFingerprint = {
|
||||
# String above
|
||||
"NixOS cacert extra certificate string" =
|
||||
"A3:20:D0:84:96:97:25:FF:98:B8:A9:6D:A3:7C:89:95:6E:7A:77:21:92:F3:33:E9:31:AF:5E:03:CE:A9:E5:EE";
|
||||
|
||||
# File
|
||||
"NixOS cacert extra certificate file" =
|
||||
"88:B8:BE:A7:57:AC:F1:FE:D6:98:8B:50:E0:BD:0A:AE:88:C7:DF:70:26:E1:67:5E:F5:F6:91:27:FF:02:D4:A5";
|
||||
};
|
||||
mapExtra = f:
|
||||
lib.concatStringsSep "\n"
|
||||
(lib.mapAttrsToList f extraCertificatesToFingerprint);
|
||||
in runCommand "verify-the-cacert-extra-output" {
|
||||
cacert = cacert.unbundled;
|
||||
cacertWithExtras = (cacert.override {
|
||||
extraCertificateStrings = [ extraCertificateStr ];
|
||||
extraCertificateFiles = [ extraCertificateFile ];
|
||||
}).unbundled;
|
||||
|
||||
nativeBuildInputs = [ openssl ];
|
||||
} ''
|
||||
${isTrusted}
|
||||
|
||||
# Ensure that the extra certificate is not in the main "cacert".
|
||||
${mapExtra (extraName: extraFingerprint: ''
|
||||
isTrusted "$cacert" "${extraName}" "${extraFingerprint}" && ({
|
||||
echo "'extra' CA fingerprint ${extraFingerprint} (${extraName}) is present in the main CA bundle." >&2
|
||||
exit 1
|
||||
})
|
||||
'')}
|
||||
|
||||
# Ensure that the extra certificates ARE in the "cacertWithExtras".
|
||||
${mapExtra (extraName: extraFingerprint: ''
|
||||
isTrusted "$cacertWithExtras" "${extraName}" "${extraFingerprint}" || ({
|
||||
echo "CA fingerprint ${extraFingerprint} (${extraName}) is not present in the cacertWithExtras bundle." >&2
|
||||
exit 1
|
||||
})
|
||||
'')}
|
||||
|
||||
touch "$out"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
inherit meta;
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
export NIX_SSL_CERT_FILE=@out@/etc/ssl/certs/ca-bundle.crt
|
||||
|
||||
# compatibility
|
||||
# - openssl
|
||||
export SSL_CERT_FILE=@out@/etc/ssl/certs/ca-bundle.crt
|
||||
# - Haskell x509-system
|
||||
export SYSTEM_CERTIFICATE_PATH=@out@/etc/ssl/certs/ca-bundle.crt
|
|
@ -1,13 +0,0 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIB7TCCAXSgAwIBAgIUFJB0STXn22fIEDjpncEt++IdFeMwCgYIKoZIzj0EAwIw
|
||||
LjEsMCoGA1UEAwwjTml4T1MgY2FjZXJ0IGV4dHJhIGNlcnRpZmljYXRlIGZpbGUw
|
||||
HhcNMjEwNjEyMTkxODA4WhcNMjIwNjEyMTkxODA4WjAuMSwwKgYDVQQDDCNOaXhP
|
||||
UyBjYWNlcnQgZXh0cmEgY2VydGlmaWNhdGUgZmlsZTB2MBAGByqGSM49AgEGBSuB
|
||||
BAAiA2IABMifTLM5K5xd+guGdKE1+NR7wnEJbxw5INzuMrkg/7jgEIQil4+L2YOF
|
||||
kU1gxcM80Ot8tQAG5OcSvX1DF6CxunpoCT+hnHqyfqoWFvl89i1BUKjyWCQ5WXEe
|
||||
nSkuJUmYC6NTMFEwHQYDVR0OBBYEFBE2kNis1ri4fweyNVRmvje83gFQMB8GA1Ud
|
||||
IwQYMBaAFBE2kNis1ri4fweyNVRmvje83gFQMA8GA1UdEwEB/wQFMAMBAf8wCgYI
|
||||
KoZIzj0EAwIDZwAwZAIwUZf1qaSb4cezulV+4B4FoJHY2B/nRVIi/rFD8634YEDT
|
||||
vcg6dmCi/AqLEzJn7uFMAjBVTu4EVC/mtQCGESFChMeb04fsuhXgttWSwWliVPEG
|
||||
jkG7u0UNNGaU8dvrjpqRRmA=
|
||||
-----END CERTIFICATE-----
|
|
@ -1,39 +0,0 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p nix common-updater-scripts jq
|
||||
|
||||
# Build both the cacert package and an overridden version where we use the source attribute of NSS.
|
||||
# Cacert and NSS are both from the same upstream sources. They are decoupled as
|
||||
# the cacert output only cares about a few infrequently changing files in the
|
||||
# sources while the NSS source code changes frequently.
|
||||
#
|
||||
# By having cacert on a older source revision that produces the same
|
||||
# certificate output as a newer version we can avoid large amounts of
|
||||
# unnecessary rebuilds.
|
||||
#
|
||||
# As of this writing there are a few magnitudes more packages depending on
|
||||
# cacert than on nss.
|
||||
#
|
||||
# We use `nss_latest` instead of `nss_esr`, because that is the newer version
|
||||
# and we want up-to-date certificates.
|
||||
# `nss_esr` is used for the ecosystem at large through the `nss` attribute,
|
||||
# because it is updated less frequently and maintained for longer, whereas `nss_latest`
|
||||
# is used for software that actually needs a new nss, e.g. Firefox.
|
||||
|
||||
set -ex
|
||||
|
||||
BASEDIR="$(dirname "$0")/../../../.."
|
||||
|
||||
|
||||
CURRENT_PATH=$(nix-build --no-out-link -A cacert.out)
|
||||
PATCHED_PATH=$(nix-build --no-out-link -E "with import $BASEDIR {}; (cacert.override { nssOverride = nss_latest; }).out")
|
||||
|
||||
# Check the hash of the etc subfolder
|
||||
# We can't check the entire output as that contains the nix-support folder
|
||||
# which contains the output path itself.
|
||||
CURRENT_HASH=$(nix-hash "$CURRENT_PATH/etc")
|
||||
PATCHED_HASH=$(nix-hash "$PATCHED_PATH/etc")
|
||||
|
||||
if [[ "$CURRENT_HASH" != "$PATCHED_HASH" ]]; then
|
||||
NSS_VERSION=$(nix-instantiate --json --eval -E "with import $BASEDIR {}; nss_latest.version" | jq -r .)
|
||||
update-source-version --version-key=srcVersion cacert.src "$NSS_VERSION"
|
||||
fi
|
|
@ -1,111 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, gtk-doc, meson, ninja, pkg-config, python3
|
||||
, docbook_xsl, fontconfig, freetype, libpng, pixman, zlib
|
||||
, x11Support ? !stdenv.isDarwin || true, libXext, libXrender
|
||||
, gobjectSupport ? true, glib, xcbSupport ? x11Support, libxcb, darwin, testers
|
||||
}:
|
||||
|
||||
let inherit (lib) optional optionals;
|
||||
in stdenv.mkDerivation (finalAttrs:
|
||||
let inherit (finalAttrs) pname version;
|
||||
in {
|
||||
pname = "cairo";
|
||||
version = "1.18.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cairographics.org/${
|
||||
if lib.mod (builtins.fromJSON (lib.versions.minor version)) 2
|
||||
== 0 then
|
||||
"releases"
|
||||
else
|
||||
"snapshots"
|
||||
}/${pname}-${version}.tar.xz";
|
||||
hash = "sha256-JDoHNrl4oz3uKfnMp1IXM7eKZbVBggb+970cPUzxC2Q=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "devdoc" ];
|
||||
outputBin = "dev"; # very small
|
||||
separateDebugInfo = true;
|
||||
|
||||
nativeBuildInputs = [ gtk-doc meson ninja pkg-config python3 ];
|
||||
|
||||
buildInputs = [ docbook_xsl ] ++ optionals stdenv.isDarwin
|
||||
(with darwin.apple_sdk.frameworks; [
|
||||
CoreGraphics
|
||||
CoreText
|
||||
ApplicationServices
|
||||
Carbon
|
||||
]);
|
||||
|
||||
propagatedBuildInputs = [ fontconfig freetype pixman libpng zlib ]
|
||||
++ optionals x11Support [ libXext libXrender ]
|
||||
++ optionals xcbSupport [ libxcb ] ++ optional gobjectSupport
|
||||
glib; # TODO: maybe liblzo but what would it be for here?
|
||||
|
||||
mesonFlags = [
|
||||
"-Dgtk_doc=true"
|
||||
|
||||
# error: #error config.h must be included before this header
|
||||
"-Dsymbol-lookup=disabled"
|
||||
|
||||
# Only used in tests, causes a dependency cycle
|
||||
"-Dspectre=disabled"
|
||||
|
||||
(lib.mesonEnable "glib" gobjectSupport)
|
||||
(lib.mesonEnable "tests" finalAttrs.finalPackage.doCheck)
|
||||
(lib.mesonEnable "xlib" x11Support)
|
||||
(lib.mesonEnable "xcb" xcbSupport)
|
||||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||
"--cross-file=${
|
||||
builtins.toFile "cross-file.conf" ''
|
||||
[properties]
|
||||
ipc_rmid_deferred_release = ${
|
||||
{
|
||||
linux = "true";
|
||||
freebsd = "true";
|
||||
netbsd = "false";
|
||||
}.${stdenv.hostPlatform.parsed.kernel.name} or (throw
|
||||
"Unknown value for ipc_rmid_deferred_release")
|
||||
}
|
||||
''
|
||||
}"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs version.py
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = false; # fails
|
||||
|
||||
postInstall = ''
|
||||
# Work around broken `Requires.private' that prevents Freetype
|
||||
# `-I' flags to be propagated.
|
||||
sed -i "$out/lib/pkgconfig/cairo.pc" \
|
||||
-es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype.dev}/include/freetype2 -I${freetype.dev}/include|g'
|
||||
'' + lib.optionalString stdenv.isDarwin glib.flattenInclude;
|
||||
|
||||
passthru.tests.pkg-config =
|
||||
testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"A 2D graphics library with support for multiple output devices";
|
||||
mainProgram = "cairo-trace";
|
||||
longDescription = ''
|
||||
Cairo is a 2D graphics library with support for multiple output
|
||||
devices. Currently supported output targets include the X
|
||||
Window System, XCB, Quartz, Win32, image buffers, PostScript,
|
||||
PDF, and SVG file output.
|
||||
|
||||
Cairo is designed to produce consistent output on all output
|
||||
media while taking advantage of display hardware acceleration
|
||||
when available (e.g., through the X Render Extension).
|
||||
'';
|
||||
homepage = "http://cairographics.org/";
|
||||
license = with licenses; [ lgpl2Plus mpl10 ];
|
||||
pkgConfigModules = [ "cairo-pdf" "cairo-ps" "cairo-svg" ]
|
||||
++ lib.optional gobjectSupport "cairo-gobject";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
})
|
|
@ -1,37 +0,0 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub, stdenv, darwin }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-nextest";
|
||||
version = "0.9.70";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nextest-rs";
|
||||
repo = "nextest";
|
||||
rev = "cargo-nextest-${version}";
|
||||
hash = "sha256-YTeKcdUszI/0RCAq6Gcakl3hfUSUo3CfVCMod/IPYhw=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-FH9ODkK84bPPYyHP4kKcHKWpJ3FV1NC8S/NQFvV63Gw=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin
|
||||
[ darwin.apple_sdk.frameworks.SystemConfiguration ];
|
||||
|
||||
cargoBuildFlags = [ "-p" "cargo-nextest" ];
|
||||
cargoTestFlags = [ "-p" "cargo-nextest" ];
|
||||
|
||||
# TODO: investigate some more why these tests fail in nix
|
||||
checkFlags = [
|
||||
"--skip=tests_integration::test_list"
|
||||
"--skip=tests_integration::test_relocated_run"
|
||||
"--skip=tests_integration::test_run"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Next-generation test runner for Rust projects";
|
||||
mainProgram = "cargo-nextest";
|
||||
homepage = "https://github.com/nextest-rs/nextest";
|
||||
changelog = "https://nexte.st/CHANGELOG.html";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
maintainers = with maintainers; [ ekleog figsoda matthiasbeyer ];
|
||||
};
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, python3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "catch2";
|
||||
version = "3.5.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "catchorg";
|
||||
repo = "Catch2";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-xGPfXjk+oOnR7JqTrZd2pKJxalrlS8CMs7HWDClXaS8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
hardeningDisable = [ "trivialautovarinit" ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCATCH_DEVELOPMENT_BUILD=ON"
|
||||
"-DCATCH_BUILD_TESTING=${if doCheck then "ON" else "OFF"}"
|
||||
] ++ lib.optionals (stdenv.isDarwin && doCheck) [
|
||||
# test has a faulty path normalization technique that won't work in
|
||||
# our darwin build environment https://github.com/catchorg/Catch2/issues/1691
|
||||
"-DCMAKE_CTEST_ARGUMENTS=-E;ApprovalTests"
|
||||
];
|
||||
|
||||
# Tests fail on x86_32 if compiled with x87 floats: https://github.com/catchorg/Catch2/issues/2796
|
||||
env = lib.optionalAttrs stdenv.isx86_32 {
|
||||
NIX_CFLAGS_COMPILE = "-msse2 -mfpmath=sse";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
|
||||
nativeCheckInputs = [ python3 ];
|
||||
|
||||
meta = {
|
||||
description = "Modern, C++-native, test framework for unit-tests";
|
||||
homepage = "https://github.com/catchorg/Catch2";
|
||||
changelog =
|
||||
"https://github.com/catchorg/Catch2/blob/${src.rev}/docs/release-notes.md";
|
||||
license = lib.licenses.boost;
|
||||
maintainers = with lib.maintainers; [ dotlambda ];
|
||||
platforms = with lib.platforms; unix ++ windows;
|
||||
};
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "catch2";
|
||||
version = "2.13.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "catchorg";
|
||||
repo = "Catch2";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-XnT2ziES94Y4uzWmaxSw7nWegJFQjAqFUG8PkwK5nLU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [ "-H.." ];
|
||||
|
||||
meta = with lib; {
|
||||
description =
|
||||
"A multi-paradigm automated test framework for C++ and Objective-C (and, maybe, C)";
|
||||
homepage = "http://catch-lib.net";
|
||||
license = licenses.boost;
|
||||
maintainers = with maintainers; [ edwtjo knedlsepp ];
|
||||
platforms = with platforms; unix ++ windows;
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
catch2 = callPackage ./. { };
|
||||
catch2_3 = callPackage ./3.nix { };
|
||||
}
|
|
@ -1,95 +0,0 @@
|
|||
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
|
||||
index b9381c3d7d..5e944640b5 100644
|
||||
--- a/Modules/Platform/UnixPaths.cmake
|
||||
+++ b/Modules/Platform/UnixPaths.cmake
|
||||
@@ -26,9 +26,6 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
|
||||
# please make sure to keep Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst
|
||||
# synchronized
|
||||
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
||||
- # Standard
|
||||
- /usr/local /usr /
|
||||
-
|
||||
# CMake install location
|
||||
"${_CMAKE_INSTALL_DIR}"
|
||||
)
|
||||
@@ -47,48 +44,49 @@ endif()
|
||||
|
||||
# Non "standard" but common install prefixes
|
||||
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
||||
- /usr/X11R6
|
||||
- /usr/pkg
|
||||
- /opt
|
||||
)
|
||||
|
||||
# List common include file locations not under the common prefixes.
|
||||
+if(DEFINED ENV{NIX_CC}
|
||||
+ AND IS_DIRECTORY "$ENV{NIX_CC}"
|
||||
+ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc"
|
||||
+ AND EXISTS "$ENV{NIX_CC}/nix-support/orig-libc-dev")
|
||||
+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc" _nix_cmake_libc)
|
||||
+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc-dev" _nix_cmake_libc_dev)
|
||||
+else()
|
||||
+ set(_nix_cmake_libc @libc_lib@)
|
||||
+ set(_nix_cmake_libc_dev @libc_dev@)
|
||||
+endif()
|
||||
+
|
||||
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
|
||||
- # X11
|
||||
- /usr/include/X11
|
||||
+ "${_nix_cmake_libc_dev}/include"
|
||||
)
|
||||
|
||||
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
|
||||
- # X11
|
||||
- /usr/lib/X11
|
||||
+ "${_nix_cmake_libc}/lib"
|
||||
)
|
||||
|
||||
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
|
||||
- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
|
||||
+ "${_nix_cmake_libc}/lib"
|
||||
)
|
||||
|
||||
-if(CMAKE_SYSROOT_COMPILE)
|
||||
- set(_cmake_sysroot_compile "${CMAKE_SYSROOT_COMPILE}")
|
||||
-else()
|
||||
- set(_cmake_sysroot_compile "${CMAKE_SYSROOT}")
|
||||
-endif()
|
||||
-
|
||||
# Default per-language values. These may be later replaced after
|
||||
# parsing the implicit directory information from compiler output.
|
||||
set(_CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES_INIT
|
||||
${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}
|
||||
- "${_cmake_sysroot_compile}/usr/include"
|
||||
+ "${_nix_cmake_libc_dev}/include"
|
||||
)
|
||||
set(_CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES_INIT
|
||||
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}
|
||||
- "${_cmake_sysroot_compile}/usr/include"
|
||||
+ "${_nix_cmake_libc_dev}/include"
|
||||
)
|
||||
set(_CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES_INIT
|
||||
${CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES}
|
||||
- "${_cmake_sysroot_compile}/usr/include"
|
||||
+ "${_nix_cmake_libc_dev}/include"
|
||||
)
|
||||
|
||||
-unset(_cmake_sysroot_compile)
|
||||
+unset(_nix_cmake_libc)
|
||||
+unset(_nix_cmake_libc_dev)
|
||||
|
||||
# Reminder when adding new locations computed from environment variables
|
||||
# please make sure to keep Help/variable/CMAKE_SYSTEM_PREFIX_PATH.rst
|
||||
diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake
|
||||
index b9e2f17979..ab517cd4a7 100644
|
||||
--- a/Modules/Platform/WindowsPaths.cmake
|
||||
+++ b/Modules/Platform/WindowsPaths.cmake
|
||||
@@ -70,7 +70,7 @@ endif()
|
||||
|
||||
if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
|
||||
# MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set)
|
||||
- list(APPEND CMAKE_SYSTEM_PREFIX_PATH /)
|
||||
+ # list(APPEND CMAKE_SYSTEM_PREFIX_PATH /)
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
|
|
@ -1,39 +0,0 @@
|
|||
diff -Naur cmake-3.25.1-old/Source/CMakeLists.txt cmake-3.25.1-new/Source/CMakeLists.txt
|
||||
--- cmake-3.25.1-old/Source/CMakeLists.txt 2022-11-30 10:57:03.000000000 -0300
|
||||
+++ cmake-3.25.1-new/Source/CMakeLists.txt 2022-12-19 01:00:08.412064304 -0300
|
||||
@@ -916,7 +916,6 @@
|
||||
# On Apple we need CoreFoundation and CoreServices
|
||||
if(APPLE)
|
||||
target_link_libraries(CMakeLib PUBLIC "-framework CoreFoundation")
|
||||
- target_link_libraries(CMakeLib PUBLIC "-framework CoreServices")
|
||||
endif()
|
||||
|
||||
if(WIN32 AND NOT UNIX)
|
||||
diff -Naur cmake-3.25.1-old/Source/cmGlobalXCodeGenerator.cxx cmake-3.25.1-new/Source/cmGlobalXCodeGenerator.cxx
|
||||
--- cmake-3.25.1-old/Source/cmGlobalXCodeGenerator.cxx 2022-11-30 10:57:03.000000000 -0300
|
||||
+++ cmake-3.25.1-new/Source/cmGlobalXCodeGenerator.cxx 2022-12-19 01:00:56.065135169 -0300
|
||||
@@ -56,10 +56,6 @@
|
||||
|
||||
#if !defined(CMAKE_BOOTSTRAP) && defined(__APPLE__)
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
-# if !TARGET_OS_IPHONE
|
||||
-# define HAVE_APPLICATION_SERVICES
|
||||
-# include <ApplicationServices/ApplicationServices.h>
|
||||
-# endif
|
||||
#endif
|
||||
|
||||
#if !defined(CMAKE_BOOTSTRAP)
|
||||
diff -Naur cmake-3.25.1-old/Utilities/cmlibarchive/CMakeLists.txt cmake-3.25.1-new/Utilities/cmlibarchive/CMakeLists.txt
|
||||
--- cmake-3.25.1-old/Utilities/cmlibarchive/CMakeLists.txt 2022-11-30 10:57:03.000000000 -0300
|
||||
+++ cmake-3.25.1-new/Utilities/cmlibarchive/CMakeLists.txt 2022-12-19 01:01:43.392205981 -0300
|
||||
@@ -2041,10 +2041,6 @@
|
||||
ADD_CUSTOM_TARGET(run_all_tests)
|
||||
ENDIF(ENABLE_TEST)
|
||||
|
||||
-# We need CoreServices on Mac OS.
|
||||
-IF(APPLE)
|
||||
- LIST(APPEND ADDITIONAL_LIBS "-framework CoreServices")
|
||||
-ENDIF(APPLE)
|
||||
|
||||
add_subdirectory(libarchive)
|
||||
IF(0) # CMake does not build libarchive's command-line tools.
|
|
@ -1,55 +0,0 @@
|
|||
diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt
|
||||
index 7625cf65d9..167903e309 100644
|
||||
--- a/Utilities/cmlibuv/CMakeLists.txt
|
||||
+++ b/Utilities/cmlibuv/CMakeLists.txt
|
||||
@@ -193,6 +193,22 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
src/unix/kqueue.c
|
||||
src/unix/proctitle.c
|
||||
)
|
||||
+
|
||||
+ include(CheckIncludeFile)
|
||||
+
|
||||
+ check_include_file("ApplicationServices/ApplicationServices.h" HAVE_ApplicationServices)
|
||||
+ if (HAVE_ApplicationServices)
|
||||
+ list(APPEND uv_defines
|
||||
+ HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H=1
|
||||
+ )
|
||||
+ endif()
|
||||
+
|
||||
+ check_include_file("CoreServices/CoreServices.h" HAVE_CoreServices)
|
||||
+ if (HAVE_CoreServices)
|
||||
+ list(APPEND uv_defines
|
||||
+ HAVE_CORESERVICES_CORESERVICES_H=1
|
||||
+ )
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
diff --git a/Utilities/cmlibuv/src/unix/fsevents.c b/Utilities/cmlibuv/src/unix/fsevents.c
|
||||
index a51f29b3f6..3f6bf01968 100644
|
||||
--- a/Utilities/cmlibuv/src/unix/fsevents.c
|
||||
+++ b/Utilities/cmlibuv/src/unix/fsevents.c
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "uv.h"
|
||||
#include "internal.h"
|
||||
|
||||
-#if TARGET_OS_IPHONE || MAC_OS_X_VERSION_MAX_ALLOWED < 1070
|
||||
+#if !HAVE_CORESERVICES_CORESERVICES_H || MAC_OS_X_VERSION_MAX_ALLOWED < 1070
|
||||
|
||||
/* iOS (currently) doesn't provide the FSEvents-API (nor CoreServices) */
|
||||
/* macOS prior to 10.7 doesn't provide the full FSEvents API so use kqueue */
|
||||
@@ -39,7 +39,7 @@ int uv__fsevents_close(uv_fs_event_t* handle) {
|
||||
void uv__fsevents_loop_delete(uv_loop_t* loop) {
|
||||
}
|
||||
|
||||
-#else /* TARGET_OS_IPHONE */
|
||||
+#else /* !HAVE_CORESERVICES_CORESERVICES_H */
|
||||
|
||||
#include "darwin-stub.h"
|
||||
|
||||
@@ -920,4 +920,4 @@ int uv__fsevents_close(uv_fs_event_t* handle) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#endif /* TARGET_OS_IPHONE */
|
||||
+#endif /* !HAVE_CORESERVICES_CORESERVICES_H */
|
|
@ -1,274 +0,0 @@
|
|||
--- cmake-3.2.2/Source/cmFileCommand.cxx 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/ccmFileCommand.cxx 2015-06-10 11:02:27.345598700 +0200
|
||||
@@ -1179,7 +1179,7 @@
|
||||
MatchProperties CollectMatchProperties(const char* file)
|
||||
{
|
||||
// Match rules are case-insensitive on some platforms.
|
||||
-#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
+#if defined(_WIN32) || defined(__APPLE__)
|
||||
std::string lower = cmSystemTools::LowerCase(file);
|
||||
const char* file_to_match = lower.c_str();
|
||||
#else
|
||||
--- cmake-3.2.2/Source/cmInstallCommand.cxx 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/cmInstallCommand.cxx 2015-06-10 11:04:19.257935200 +0200
|
||||
@@ -1138,7 +1138,7 @@
|
||||
{
|
||||
literal_args += " REGEX \"";
|
||||
// Match rules are case-insensitive on some platforms.
|
||||
-#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
+#if defined(_WIN32) || defined(__APPLE__)
|
||||
std::string regex = cmSystemTools::LowerCase(args[i]);
|
||||
#else
|
||||
std::string regex = args[i];
|
||||
--- cmake-3.2.2/Source/kwsys/Glob.cxx 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/kwsys/Glob.cxx 2015-06-10 11:05:51.602674000 +0200
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <string.h>
|
||||
namespace KWSYS_NAMESPACE
|
||||
{
|
||||
-#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
+#if defined(_WIN32) || defined(__APPLE__)
|
||||
// On Windows and apple, no difference between lower and upper case
|
||||
# define KWSYS_GLOB_CASE_INDEPENDENT
|
||||
#endif
|
||||
--- cmake-3.2.2/Source/kwsys/SystemInformation.cxx 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/kwsys/SystemInformation.cxx 2015-06-10 11:13:00.308303500 +0200
|
||||
@@ -911,7 +911,7 @@
|
||||
// Hide implementation details in an anonymous namespace.
|
||||
namespace {
|
||||
// *****************************************************************************
|
||||
-#if defined(__linux) || defined(__APPLE__)
|
||||
+#if defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
int LoadLines(
|
||||
FILE *file,
|
||||
kwsys_stl::vector<kwsys_stl::string> &lines)
|
||||
@@ -947,7 +947,7 @@
|
||||
return nRead;
|
||||
}
|
||||
|
||||
-# if defined(__linux)
|
||||
+# if defined(__linux) || defined(__CYGWIN__)
|
||||
// *****************************************************************************
|
||||
int LoadLines(
|
||||
const char *fileName,
|
||||
@@ -986,7 +986,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(__linux)
|
||||
+#if defined(__linux) || defined(__CYGWIN__)
|
||||
// ****************************************************************************
|
||||
template<typename T>
|
||||
int GetFieldsFromFile(
|
||||
@@ -3132,7 +3132,6 @@
|
||||
pos = buffer.find("processor\t",pos+1);
|
||||
}
|
||||
|
||||
-#ifdef __linux
|
||||
// Find the largest physical id.
|
||||
int maxId = -1;
|
||||
kwsys_stl::string idc =
|
||||
@@ -3165,14 +3164,6 @@
|
||||
atoi(this->ExtractValueFromCpuInfoFile(buffer,"ncpus active").c_str());
|
||||
}
|
||||
|
||||
-#else // __CYGWIN__
|
||||
- // does not have "physical id" entries, neither "cpu cores"
|
||||
- // this has to be fixed for hyper-threading.
|
||||
- kwsys_stl::string cpucount =
|
||||
- this->ExtractValueFromCpuInfoFile(buffer,"cpu count");
|
||||
- this->NumberOfPhysicalCPU=
|
||||
- this->NumberOfLogicalCPU = atoi(cpucount.c_str());
|
||||
-#endif
|
||||
// gotta have one, and if this is 0 then we get a / by 0n
|
||||
// better to have a bad answer than a crash
|
||||
if(this->NumberOfPhysicalCPU <= 0)
|
||||
@@ -3370,7 +3361,7 @@
|
||||
GlobalMemoryStatusEx(&statex);
|
||||
return statex.ullTotalPhys/1024;
|
||||
# endif
|
||||
-#elif defined(__linux)
|
||||
+#elif defined(__linux) || defined(__CYGWIN__)
|
||||
SystemInformation::LongLong memTotal=0;
|
||||
int ierr=GetFieldFromFile("/proc/meminfo","MemTotal:",memTotal);
|
||||
if (ierr)
|
||||
@@ -3501,7 +3492,7 @@
|
||||
GlobalMemoryStatusEx(&statex);
|
||||
return (statex.ullTotalPhys - statex.ullAvailPhys)/1024;
|
||||
# endif
|
||||
-#elif defined(__linux)
|
||||
+#elif defined(__linux) || defined(__CYGWIN__)
|
||||
const char *names[3]={"MemTotal:","MemFree:",NULL};
|
||||
SystemInformation::LongLong values[2]={SystemInformation::LongLong(0)};
|
||||
int ierr=GetFieldsFromFile("/proc/meminfo",names,values);
|
||||
@@ -3560,7 +3551,7 @@
|
||||
return -2;
|
||||
}
|
||||
return pmc.WorkingSetSize/1024;
|
||||
-#elif defined(__linux)
|
||||
+#elif defined(__linux) || defined(__CYGWIN__)
|
||||
SystemInformation::LongLong memUsed=0;
|
||||
int ierr=GetFieldFromFile("/proc/self/status","VmRSS:",memUsed);
|
||||
if (ierr)
|
||||
@@ -3612,7 +3603,7 @@
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
return GetCurrentProcessId();
|
||||
-#elif defined(__linux) || defined(__APPLE__)
|
||||
+#elif defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__)
|
||||
return getpid();
|
||||
#else
|
||||
return -1;
|
||||
--- cmake-3.2.2/Source/kwsys/SystemTools.cxx 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/kwsys/SystemTools.cxx 2015-06-10 11:21:58.980443200 +0200
|
||||
@@ -93,19 +93,12 @@
|
||||
# if defined(_MSC_VER) && _MSC_VER >= 1800
|
||||
# define KWSYS_WINDOWS_DEPRECATED_GetVersionEx
|
||||
# endif
|
||||
-#elif defined (__CYGWIN__)
|
||||
-# include <windows.h>
|
||||
-# undef _WIN32
|
||||
#endif
|
||||
|
||||
#if !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
-#ifdef __CYGWIN__
|
||||
-# include <sys/cygwin.h>
|
||||
-#endif
|
||||
-
|
||||
// getpwnam doesn't exist on Windows and Cray Xt3/Catamount
|
||||
// same for TIOCGWINSZ
|
||||
#if defined(_WIN32) || defined (__LIBCATAMOUNT__)
|
||||
@@ -1148,15 +1141,7 @@
|
||||
{
|
||||
return false;
|
||||
}
|
||||
-#if defined(__CYGWIN__)
|
||||
- // Convert filename to native windows path if possible.
|
||||
- char winpath[MAX_PATH];
|
||||
- if(SystemTools::PathCygwinToWin32(filename.c_str(), winpath))
|
||||
- {
|
||||
- return (GetFileAttributesA(winpath) != INVALID_FILE_ATTRIBUTES);
|
||||
- }
|
||||
- return access(filename.c_str(), R_OK) == 0;
|
||||
-#elif defined(_WIN32)
|
||||
+#if defined(_WIN32)
|
||||
return (GetFileAttributesW(
|
||||
SystemTools::ConvertToWindowsExtendedPath(filename).c_str())
|
||||
!= INVALID_FILE_ATTRIBUTES);
|
||||
@@ -1190,28 +1175,6 @@
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
-#ifdef __CYGWIN__
|
||||
-bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path)
|
||||
-{
|
||||
- SystemToolsTranslationMap::iterator i =
|
||||
- SystemTools::Cyg2Win32Map->find(path);
|
||||
-
|
||||
- if (i != SystemTools::Cyg2Win32Map->end())
|
||||
- {
|
||||
- strncpy(win32_path, i->second.c_str(), MAX_PATH);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- if(cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, win32_path, MAX_PATH) != 0)
|
||||
- {
|
||||
- win32_path[0] = 0;
|
||||
- }
|
||||
- SystemToolsTranslationMap::value_type entry(path, win32_path);
|
||||
- SystemTools::Cyg2Win32Map->insert(entry);
|
||||
- }
|
||||
- return win32_path[0] != 0;
|
||||
-}
|
||||
-#endif
|
||||
|
||||
bool SystemTools::Touch(const kwsys_stl::string& filename, bool create)
|
||||
{
|
||||
@@ -4307,7 +4270,7 @@
|
||||
|
||||
bool SystemTools::FileIsFullPath(const char* in_name, size_t len)
|
||||
{
|
||||
-#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
+#if defined(_WIN32)
|
||||
// On Windows, the name must be at least two characters long.
|
||||
if(len < 2)
|
||||
{
|
||||
@@ -5078,9 +5041,6 @@
|
||||
static unsigned int SystemToolsManagerCount;
|
||||
SystemToolsTranslationMap *SystemTools::TranslationMap;
|
||||
SystemToolsTranslationMap *SystemTools::LongPathMap;
|
||||
-#ifdef __CYGWIN__
|
||||
-SystemToolsTranslationMap *SystemTools::Cyg2Win32Map;
|
||||
-#endif
|
||||
|
||||
// SystemToolsManager manages the SystemTools singleton.
|
||||
// SystemToolsManager should be included in any translation unit
|
||||
@@ -5126,9 +5086,6 @@
|
||||
// Allocate the translation map first.
|
||||
SystemTools::TranslationMap = new SystemToolsTranslationMap;
|
||||
SystemTools::LongPathMap = new SystemToolsTranslationMap;
|
||||
-#ifdef __CYGWIN__
|
||||
- SystemTools::Cyg2Win32Map = new SystemToolsTranslationMap;
|
||||
-#endif
|
||||
|
||||
// Add some special translation paths for unix. These are not added
|
||||
// for windows because drive letters need to be maintained. Also,
|
||||
@@ -5183,9 +5140,6 @@
|
||||
{
|
||||
delete SystemTools::TranslationMap;
|
||||
delete SystemTools::LongPathMap;
|
||||
-#ifdef __CYGWIN__
|
||||
- delete SystemTools::Cyg2Win32Map;
|
||||
-#endif
|
||||
}
|
||||
|
||||
|
||||
--- cmake-3.2.2/Source/kwsys/SystemTools.hxx.in 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Source/kwsys/SystemTools.hxx.in 2015-06-10 11:24:24.271286600 +0200
|
||||
@@ -298,15 +298,6 @@
|
||||
static bool FileExists(const kwsys_stl::string& filename);
|
||||
|
||||
/**
|
||||
- * Converts Cygwin path to Win32 path. Uses dictionary container for
|
||||
- * caching and calls to cygwin_conv_to_win32_path from Cygwin dll
|
||||
- * for actual translation. Returns true on success, else false.
|
||||
- */
|
||||
-#ifdef __CYGWIN__
|
||||
- static bool PathCygwinToWin32(const char *path, char *win32_path);
|
||||
-#endif
|
||||
-
|
||||
- /**
|
||||
* Return file length
|
||||
*/
|
||||
static unsigned long FileLength(const kwsys_stl::string& filename);
|
||||
@@ -942,9 +933,6 @@
|
||||
*/
|
||||
static SystemToolsTranslationMap *TranslationMap;
|
||||
static SystemToolsTranslationMap *LongPathMap;
|
||||
-#ifdef __CYGWIN__
|
||||
- static SystemToolsTranslationMap *Cyg2Win32Map;
|
||||
-#endif
|
||||
friend class SystemToolsManager;
|
||||
};
|
||||
|
||||
--- cmake-3.2.2/Modules/FindCurses.cmake 2015-04-13 19:09:00.000000000 +0200
|
||||
+++ cmake-3.2.2/Modules/FindCurses.cmake 2015-06-10 12:10:19.682030300 +0200
|
||||
@@ -60,15 +60,6 @@
|
||||
if(CURSES_NCURSES_LIBRARY AND ((NOT CURSES_CURSES_LIBRARY) OR CURSES_NEED_NCURSES))
|
||||
set(CURSES_USE_NCURSES TRUE)
|
||||
endif()
|
||||
-# http://cygwin.com/ml/cygwin-announce/2010-01/msg00002.html
|
||||
-# cygwin ncurses stopped providing curses.h symlinks see above
|
||||
-# message. Cygwin is an ncurses package, so force ncurses on
|
||||
-# cygwin if the curses.h is missing
|
||||
-if(CYGWIN)
|
||||
- if(NOT EXISTS /usr/include/curses.h)
|
||||
- set(CURSES_USE_NCURSES TRUE)
|
||||
- endif()
|
||||
-endif()
|
||||
|
||||
|
||||
# Not sure the logic is correct here.
|
|
@ -1,33 +0,0 @@
|
|||
diff -Naur cmake-3.28.2/Utilities/cmcurl/CMakeLists.txt cmake-3.28.2-new/Utilities/cmcurl/CMakeLists.txt
|
||||
--- cmake-3.28.2/Utilities/cmcurl/CMakeLists.txt 2024-01-29 23:01:32.000000000 +0300
|
||||
+++ cmake-3.28.2-new/Utilities/cmcurl/CMakeLists.txt 2024-02-16 13:09:40.805479195 +0300
|
||||
@@ -470,13 +470,6 @@
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT ENABLE_ARES)
|
||||
set(use_core_foundation_and_core_services ON)
|
||||
-
|
||||
- find_library(SYSTEMCONFIGURATION_FRAMEWORK "SystemConfiguration")
|
||||
- if(NOT SYSTEMCONFIGURATION_FRAMEWORK)
|
||||
- message(FATAL_ERROR "SystemConfiguration framework not found")
|
||||
- endif()
|
||||
-
|
||||
- list(APPEND CURL_LIBS "-framework SystemConfiguration")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
diff -Naur cmake-3.28.2/Utilities/cmcurl/lib/curl_setup.h cmake-3.28.2-new/Utilities/cmcurl/lib/curl_setup.h
|
||||
--- cmake-3.28.2/Utilities/cmcurl/lib/curl_setup.h 2024-01-29 23:01:32.000000000 +0300
|
||||
+++ cmake-3.28.2-new/Utilities/cmcurl/lib/curl_setup.h 2024-02-16 13:10:38.822445566 +0300
|
||||
@@ -255,12 +255,6 @@
|
||||
* performing this task will result in a synthesized IPv6 address.
|
||||
*/
|
||||
#if defined(__APPLE__) && !defined(USE_ARES)
|
||||
-#include <TargetConditionals.h>
|
||||
-#define USE_RESOLVE_ON_IPS 1
|
||||
-# if TARGET_OS_MAC && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) && \
|
||||
- defined(ENABLE_IPV6)
|
||||
-# define CURL_MACOS_CALL_COPYPROXIES 1
|
||||
-# endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_LWIPSOCK
|
|
@ -1,14 +0,0 @@
|
|||
Revert of commit 1af23c4de2c7d58c06171d70b37794b5c860d5f4.
|
||||
--- b/Modules/Platform/Darwin.cmake
|
||||
+++ a/Modules/Platform/Darwin.cmake
|
||||
@@ -47,9 +47,7 @@
|
||||
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
|
||||
set(CMAKE_MODULE_EXISTS 1)
|
||||
set(CMAKE_DL_LIBS "")
|
||||
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
|
||||
-if(NOT "${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5")
|
||||
- set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
|
||||
-endif()
|
||||
|
||||
foreach(lang C CXX OBJC OBJCXX)
|
||||
set(CMAKE_${lang}_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
|
|
@ -1,18 +0,0 @@
|
|||
cmakePcfileCheckPhase() {
|
||||
while IFS= read -rd $'\0' file; do
|
||||
grepout=$(grep --line-number '}//nix/store' "$file" || true)
|
||||
if [ -n "$grepout" ]; then
|
||||
{
|
||||
echo "Broken paths found in a .pc file! $file"
|
||||
echo "The following lines have issues (specifically '//' in paths)."
|
||||
echo "$grepout"
|
||||
echo "It is very likely that paths are being joined improperly."
|
||||
echo 'ex: "${prefix}/@CMAKE_INSTALL_LIBDIR@" should be "@CMAKE_INSTALL_FULL_LIBDIR@"'
|
||||
echo "Please see https://github.com/NixOS/nixpkgs/issues/144170 for more details."
|
||||
exit 1
|
||||
} 1>&2
|
||||
fi
|
||||
done < <(find "${!outputDev}" -iname "*.pc" -print0)
|
||||
}
|
||||
|
||||
postFixupHooks+=(cmakePcfileCheckPhase)
|
|
@ -1,174 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, buildPackages, bzip2, curlMinimal, expat, libarchive
|
||||
, libuv, ncurses, openssl, pkg-config, ps, rhash, sphinx, texinfo, xz, zlib
|
||||
, isBootstrap ? null, isMinimalBuild ? (if isBootstrap != null then
|
||||
lib.warn
|
||||
"isBootstrap argument is deprecated and will be removed; use isMinimalBuild instead"
|
||||
isBootstrap
|
||||
else
|
||||
false), useOpenSSL ? !isMinimalBuild
|
||||
, useSharedLibraries ? (!isMinimalBuild && !stdenv.isCygwin)
|
||||
, uiToolkits ? [ ] # can contain "ncurses" and/or "qt5"
|
||||
, buildDocs ? !(isMinimalBuild || (uiToolkits == [ ])), darwin
|
||||
# , libsForQt5
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (darwin.apple_sdk.frameworks) CoreServices SystemConfiguration;
|
||||
# inherit (libsForQt5) qtbase wrapQtAppsHook;
|
||||
cursesUI = lib.elem "ncurses" uiToolkits;
|
||||
# qt5UI = lib.elem "qt5" uiToolkits;
|
||||
# Accepts only "ncurses" and "qt5" as possible uiToolkits
|
||||
in assert lib.subtractLists [ "ncurses" "qt5" ] uiToolkits == [ ];
|
||||
# Minimal, bootstrap cmake does not have toolkits
|
||||
assert isMinimalBuild -> (uiToolkits == [ ]);
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "cmake" + lib.optionalString isMinimalBuild "-minimal"
|
||||
+ lib.optionalString cursesUI "-cursesUI";
|
||||
# + lib.optionalString qt5UI "-qt5UI";
|
||||
version = "3.29.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cmake.org/files/v${
|
||||
lib.versions.majorMinor finalAttrs.version
|
||||
}/cmake-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-f7Auj1e2Kzmqa0z3HoIBSLoaI3JIiElHNQIeMqsO78w=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Don't search in non-Nix locations such as /usr, but do search in our libc.
|
||||
./001-search-path.diff
|
||||
# Don't depend on frameworks.
|
||||
./002-application-services.diff
|
||||
# Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d
|
||||
./003-libuv-application-services.diff
|
||||
] ++ lib.optional stdenv.isCygwin ./004-cygwin.diff
|
||||
# Derived from https://github.com/curl/curl/commit/31f631a142d855f069242f3e0c643beec25d1b51
|
||||
++ lib.optional (stdenv.isDarwin && isMinimalBuild)
|
||||
./005-remove-systemconfiguration-dep.diff
|
||||
# On Darwin, always set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG.
|
||||
++ lib.optional stdenv.isDarwin ./006-darwin-always-set-runtime-c-flag.diff;
|
||||
|
||||
outputs = [ "out" ] ++ lib.optionals buildDocs [ "man" "info" ];
|
||||
separateDebugInfo = true;
|
||||
setOutputFlags = false;
|
||||
|
||||
setupHooks = [ ./setup-hook.sh ./check-pc-files-hook.sh ];
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
nativeBuildInputs = finalAttrs.setupHooks ++ [ pkg-config ]
|
||||
++ lib.optionals buildDocs [ texinfo ];
|
||||
# ++ lib.optionals qt5UI [ wrapQtAppsHook ];
|
||||
|
||||
buildInputs = lib.optionals useSharedLibraries [
|
||||
bzip2
|
||||
curlMinimal
|
||||
expat
|
||||
libarchive
|
||||
xz
|
||||
zlib
|
||||
libuv
|
||||
rhash
|
||||
] ++ lib.optional useOpenSSL openssl ++ lib.optional cursesUI ncurses
|
||||
# ++ lib.optional qt5UI qtbase
|
||||
++ lib.optional stdenv.isDarwin CoreServices
|
||||
++ lib.optional (stdenv.isDarwin && !isMinimalBuild) SystemConfiguration;
|
||||
|
||||
propagatedBuildInputs = lib.optional stdenv.isDarwin ps;
|
||||
|
||||
preConfigure = ''
|
||||
fixCmakeFiles .
|
||||
substituteInPlace Modules/Platform/UnixPaths.cmake \
|
||||
--subst-var-by libc_bin ${lib.getBin stdenv.cc.libc} \
|
||||
--subst-var-by libc_dev ${lib.getDev stdenv.cc.libc} \
|
||||
--subst-var-by libc_lib ${lib.getLib stdenv.cc.libc}
|
||||
# CC_FOR_BUILD and CXX_FOR_BUILD are used to bootstrap cmake
|
||||
configureFlags="--parallel=''${NIX_BUILD_CORES:-1} CC=$CC_FOR_BUILD CXX=$CXX_FOR_BUILD $configureFlags"
|
||||
'';
|
||||
|
||||
# The configuration script is not autoconf-based, although being similar;
|
||||
# triples and other interesting info are passed via CMAKE_* environment
|
||||
# variables and commandline switches
|
||||
configurePlatforms = [ ];
|
||||
|
||||
configureFlags = [
|
||||
"CXXFLAGS=-Wno-elaborated-enum-base"
|
||||
"--docdir=share/doc/${finalAttrs.pname}-${finalAttrs.version}"
|
||||
] ++ (if useSharedLibraries then [
|
||||
"--no-system-cppdap"
|
||||
"--no-system-jsoncpp"
|
||||
"--system-libs"
|
||||
] else
|
||||
[ "--no-system-libs" ]) # FIXME: cleanup
|
||||
# ++ lib.optional qt5UI "--qt-gui"
|
||||
++ lib.optionals buildDocs [
|
||||
"--sphinx-build=${sphinx}/bin/sphinx-build"
|
||||
"--sphinx-info"
|
||||
"--sphinx-man"
|
||||
]
|
||||
# Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/20568
|
||||
++ lib.optionals stdenv.hostPlatform.is32bit [
|
||||
"CFLAGS=-D_FILE_OFFSET_BITS=64"
|
||||
"CXXFLAGS=-D_FILE_OFFSET_BITS=64"
|
||||
] ++ [
|
||||
"--"
|
||||
# We should set the proper `CMAKE_SYSTEM_NAME`.
|
||||
# http://www.cmake.org/Wiki/CMake_Cross_Compiling
|
||||
#
|
||||
# Unfortunately cmake seems to expect absolute paths for ar, ranlib, and
|
||||
# strip. Otherwise they are taken to be relative to the source root of the
|
||||
# package being built.
|
||||
(lib.cmakeFeature "CMAKE_CXX_COMPILER" "${stdenv.cc.targetPrefix}c++")
|
||||
(lib.cmakeFeature "CMAKE_C_COMPILER" "${stdenv.cc.targetPrefix}cc")
|
||||
(lib.cmakeFeature "CMAKE_AR" "${
|
||||
lib.getBin stdenv.cc.bintools.bintools
|
||||
}/bin/${stdenv.cc.targetPrefix}ar")
|
||||
(lib.cmakeFeature "CMAKE_RANLIB" "${
|
||||
lib.getBin stdenv.cc.bintools.bintools
|
||||
}/bin/${stdenv.cc.targetPrefix}ranlib")
|
||||
(lib.cmakeFeature "CMAKE_STRIP" "${
|
||||
lib.getBin stdenv.cc.bintools.bintools
|
||||
}/bin/${stdenv.cc.targetPrefix}strip")
|
||||
|
||||
(lib.cmakeBool "CMAKE_USE_OPENSSL" useOpenSSL)
|
||||
(lib.cmakeBool "BUILD_CursesDialog" cursesUI)
|
||||
];
|
||||
|
||||
# `pkgsCross.musl64.cmake.override { stdenv = pkgsCross.musl64.llvmPackages_16.libcxxStdenv; }`
|
||||
# fails with `The C++ compiler does not support C++11 (e.g. std::unique_ptr).`
|
||||
# The cause is a compiler warning `warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]`
|
||||
# interfering with the feature check.
|
||||
env.NIX_CFLAGS_COMPILE = "-Wno-unused-command-line-argument";
|
||||
|
||||
# make install attempts to use the just-built cmake
|
||||
preInstall =
|
||||
lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
sed -i 's|bin/cmake|${buildPackages.cmakeMinimal}/bin/cmake|g' Makefile
|
||||
'';
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = false; # fails
|
||||
|
||||
meta = {
|
||||
homepage = "https://cmake.org/";
|
||||
description = "Cross-platform, open-source build system generator";
|
||||
longDescription = ''
|
||||
CMake is an open-source, cross-platform family of tools designed to build,
|
||||
test and package software. CMake is used to control the software
|
||||
compilation process using simple platform and compiler independent
|
||||
configuration files, and generate native makefiles and workspaces that can
|
||||
be used in the compiler environment of your choice.
|
||||
'';
|
||||
changelog = "https://cmake.org/cmake/help/v${
|
||||
lib.versions.majorMinor finalAttrs.version
|
||||
}/release/${lib.versions.majorMinor finalAttrs.version}.html";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ ttuegel lnl7 AndersonTorres ];
|
||||
platforms = lib.platforms.all;
|
||||
mainProgram = "cmake";
|
||||
broken = ( # qt5UI &&
|
||||
stdenv.isDarwin);
|
||||
};
|
||||
})
|
|
@ -1,13 +0,0 @@
|
|||
{ ... }:
|
||||
res: pkgs: super:
|
||||
|
||||
with pkgs; {
|
||||
cmake = callPackage ./. { };
|
||||
|
||||
# can't use override - it triggers infinite recursion
|
||||
cmakeMinimal = callPackage ./. { isMinimalBuild = true; };
|
||||
|
||||
cmakeCurses = cmake.override { uiToolkits = [ "ncurses" ]; };
|
||||
|
||||
cmakeWithGui = cmake.override { uiToolkits = [ "ncurses" "qt5" ]; };
|
||||
}
|
|
@ -1,184 +0,0 @@
|
|||
addCMakeParams() {
|
||||
addToSearchPath CMAKE_PREFIX_PATH $1
|
||||
}
|
||||
|
||||
fixCmakeFiles() {
|
||||
# Replace occurences of /usr and /opt by /var/empty.
|
||||
echo "fixing cmake files..."
|
||||
find "$1" \( -type f -name "*.cmake" -o -name "*.cmake.in" -o -name CMakeLists.txt \) -print |
|
||||
while read fn; do
|
||||
sed -e 's^/usr\([ /]\|$\)^/var/empty\1^g' -e 's^/opt\([ /]\|$\)^/var/empty\1^g' < "$fn" > "$fn.tmp"
|
||||
mv "$fn.tmp" "$fn"
|
||||
done
|
||||
}
|
||||
|
||||
cmakeConfigurePhase() {
|
||||
runHook preConfigure
|
||||
|
||||
# default to CMake defaults if unset
|
||||
: ${cmakeBuildDir:=build}
|
||||
|
||||
export CTEST_OUTPUT_ON_FAILURE=1
|
||||
if [ -n "${enableParallelChecking-1}" ]; then
|
||||
export CTEST_PARALLEL_LEVEL=$NIX_BUILD_CORES
|
||||
fi
|
||||
|
||||
if [ -z "${dontFixCmake-}" ]; then
|
||||
fixCmakeFiles .
|
||||
fi
|
||||
|
||||
if [ -z "${dontUseCmakeBuildDir-}" ]; then
|
||||
mkdir -p "$cmakeBuildDir"
|
||||
cd "$cmakeBuildDir"
|
||||
: ${cmakeDir:=..}
|
||||
else
|
||||
: ${cmakeDir:=.}
|
||||
fi
|
||||
|
||||
if [ -z "${dontAddPrefix-}" ]; then
|
||||
cmakeFlags="-DCMAKE_INSTALL_PREFIX=$prefix $cmakeFlags"
|
||||
fi
|
||||
|
||||
# We should set the proper `CMAKE_SYSTEM_NAME`.
|
||||
# http://www.cmake.org/Wiki/CMake_Cross_Compiling
|
||||
#
|
||||
# Unfortunately cmake seems to expect absolute paths for ar, ranlib, and
|
||||
# strip. Otherwise they are taken to be relative to the source root of the
|
||||
# package being built.
|
||||
cmakeFlags="-DCMAKE_CXX_COMPILER=$CXX $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_C_COMPILER=$CC $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_AR=$(command -v $AR) $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_RANLIB=$(command -v $RANLIB) $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_STRIP=$(command -v $STRIP) $cmakeFlags"
|
||||
|
||||
# on macOS we want to prefer Unix-style headers to Frameworks
|
||||
# because we usually do not package the framework
|
||||
cmakeFlags="-DCMAKE_FIND_FRAMEWORK=LAST $cmakeFlags"
|
||||
|
||||
# we never want to use the global macOS SDK
|
||||
cmakeFlags="-DCMAKE_OSX_SYSROOT= $cmakeFlags"
|
||||
|
||||
# correctly detect our clang compiler
|
||||
cmakeFlags="-DCMAKE_POLICY_DEFAULT_CMP0025=NEW $cmakeFlags"
|
||||
|
||||
# This installs shared libraries with a fully-specified install
|
||||
# name. By default, cmake installs shared libraries with just the
|
||||
# basename as the install name, which means that, on Darwin, they
|
||||
# can only be found by an executable at runtime if the shared
|
||||
# libraries are in a system path or in the same directory as the
|
||||
# executable. This flag makes the shared library accessible from its
|
||||
# nix/store directory.
|
||||
cmakeFlags="-DCMAKE_INSTALL_NAME_DIR=${!outputLib}/lib $cmakeFlags"
|
||||
|
||||
# The docdir flag needs to include PROJECT_NAME as per GNU guidelines,
|
||||
# try to extract it from CMakeLists.txt.
|
||||
if [[ -z "$shareDocName" ]]; then
|
||||
local cmakeLists="${cmakeDir}/CMakeLists.txt"
|
||||
if [[ -f "$cmakeLists" ]]; then
|
||||
local shareDocName="$(grep --only-matching --perl-regexp --ignore-case '\bproject\s*\(\s*"?\K([^[:space:]")]+)' < "$cmakeLists" | head -n1)"
|
||||
fi
|
||||
# The argument sometimes contains garbage or variable interpolation.
|
||||
# When that is the case, let’s fall back to the derivation name.
|
||||
if [[ -z "$shareDocName" ]] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_+-]'; then
|
||||
if [[ -n "${pname-}" ]]; then
|
||||
shareDocName="$pname"
|
||||
else
|
||||
shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# This ensures correct paths with multiple output derivations
|
||||
# It requires the project to use variables from GNUInstallDirs module
|
||||
# https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
|
||||
cmakeFlags="-DCMAKE_INSTALL_BINDIR=${!outputBin}/bin $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_SBINDIR=${!outputBin}/sbin $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_INCLUDEDIR=${!outputInclude}/include $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_OLDINCLUDEDIR=${!outputInclude}/include $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_MANDIR=${!outputMan}/share/man $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_INFODIR=${!outputInfo}/share/info $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_DOCDIR=${!outputDoc}/share/doc/${shareDocName} $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_LIBDIR=${!outputLib}/lib $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_LIBEXECDIR=${!outputLib}/libexec $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_LOCALEDIR=${!outputLib}/share/locale $cmakeFlags"
|
||||
|
||||
# Don’t build tests when doCheck = false
|
||||
if [ -z "${doCheck-}" ]; then
|
||||
cmakeFlags="-DBUILD_TESTING=OFF $cmakeFlags"
|
||||
fi
|
||||
|
||||
# Always build Release, to ensure optimisation flags
|
||||
cmakeFlags="-DCMAKE_BUILD_TYPE=${cmakeBuildType:-Release} $cmakeFlags"
|
||||
|
||||
# Disable user package registry to avoid potential side effects
|
||||
# and unecessary attempts to access non-existent home folder
|
||||
# https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#disabling-the-package-registry
|
||||
cmakeFlags="-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF $cmakeFlags"
|
||||
|
||||
if [ "${buildPhase-}" = ninjaBuildPhase ]; then
|
||||
cmakeFlags="-GNinja $cmakeFlags"
|
||||
fi
|
||||
|
||||
echo "cmake flags: $cmakeFlags ${cmakeFlagsArray[@]}"
|
||||
|
||||
cmake "$cmakeDir" $cmakeFlags "${cmakeFlagsArray[@]}"
|
||||
|
||||
if ! [[ -v enableParallelBuilding ]]; then
|
||||
enableParallelBuilding=1
|
||||
echo "cmake: enabled parallel building"
|
||||
fi
|
||||
|
||||
if ! [[ -v enableParallelInstalling ]]; then
|
||||
enableParallelInstalling=1
|
||||
echo "cmake: enabled parallel installing"
|
||||
fi
|
||||
|
||||
runHook postConfigure
|
||||
}
|
||||
|
||||
if [ -z "${dontUseCmakeConfigure-}" -a -z "${configurePhase-}" ]; then
|
||||
setOutputFlags=
|
||||
configurePhase=cmakeConfigurePhase
|
||||
fi
|
||||
|
||||
addEnvHooks "$targetOffset" addCMakeParams
|
||||
|
||||
makeCmakeFindLibs(){
|
||||
isystem_seen=
|
||||
iframework_seen=
|
||||
for flag in ${NIX_CFLAGS_COMPILE-} ${NIX_LDFLAGS-}; do
|
||||
if test -n "$isystem_seen" && test -d "$flag"; then
|
||||
isystem_seen=
|
||||
export CMAKE_INCLUDE_PATH="${CMAKE_INCLUDE_PATH-}${CMAKE_INCLUDE_PATH:+:}${flag}"
|
||||
elif test -n "$iframework_seen" && test -d "$flag"; then
|
||||
iframework_seen=
|
||||
export CMAKE_FRAMEWORK_PATH="${CMAKE_FRAMEWORK_PATH-}${CMAKE_FRAMEWORK_PATH:+:}${flag}"
|
||||
else
|
||||
isystem_seen=
|
||||
iframework_seen=
|
||||
case $flag in
|
||||
-I*)
|
||||
export CMAKE_INCLUDE_PATH="${CMAKE_INCLUDE_PATH-}${CMAKE_INCLUDE_PATH:+:}${flag:2}"
|
||||
;;
|
||||
-L*)
|
||||
export CMAKE_LIBRARY_PATH="${CMAKE_LIBRARY_PATH-}${CMAKE_LIBRARY_PATH:+:}${flag:2}"
|
||||
;;
|
||||
-F*)
|
||||
export CMAKE_FRAMEWORK_PATH="${CMAKE_FRAMEWORK_PATH-}${CMAKE_FRAMEWORK_PATH:+:}${flag:2}"
|
||||
;;
|
||||
-isystem)
|
||||
isystem_seen=1
|
||||
;;
|
||||
-iframework)
|
||||
iframework_seen=1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# not using setupHook, because it could be a setupHook adding additional
|
||||
# include flags to NIX_CFLAGS_COMPILE
|
||||
postHooks+=(makeCmakeFindLibs)
|
|
@ -1,48 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitLab, fetchpatch, ninja, pkg-config, meson, libevent
|
||||
, curl, spdlog }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "coeurl";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "nheko.im";
|
||||
owner = "nheko-reborn";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-sN+YSddUOdnJLcnHyWdjNm1PpxCwnkwiqSvyrwUrg6w=";
|
||||
};
|
||||
patches = [
|
||||
# Fix compatibility issues with curl > 7.85, see:
|
||||
# https://nheko.im/nheko-reborn/coeurl/-/commit/d926893007c353fbc149d8538a5762ca8384273a
|
||||
# PATCH CAN BE REMOVED AFTER 0.3.0
|
||||
(fetchpatch {
|
||||
url =
|
||||
"https://nheko.im/nheko-reborn/coeurl/-/commit/d926893007c353fbc149d8538a5762ca8384273a.patch";
|
||||
hash = "sha256-hOBk7riuVI7k7qe/SMq3XJnFzyZ0gB9kVG7dKvWOsPY=";
|
||||
})
|
||||
# Fix error when building with fmt >= 10, see:
|
||||
# https://nheko.im/nheko-reborn/coeurl/-/commit/831e2ee8e9cf08ea1ee9736cde8370f9d0312abc
|
||||
# PATCH CAN BE REMOVED AFTER 0.3.0
|
||||
(fetchpatch {
|
||||
url =
|
||||
"https://nheko.im/nheko-reborn/coeurl/-/commit/831e2ee8e9cf08ea1ee9736cde8370f9d0312abc.patch";
|
||||
hash = "sha256-a52Id7Nm3Mmmwv7eL58j6xovjlkpAO4KahVM/Q3H65w=";
|
||||
})
|
||||
];
|
||||
postPatch = ''
|
||||
substituteInPlace subprojects/curl.wrap --replace '[provides]' '[provide]'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ ninja pkg-config meson ];
|
||||
|
||||
buildInputs = [ libevent curl spdlog ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple async wrapper around CURL for C++";
|
||||
homepage = "https://nheko.im/nheko-reborn/coeurl";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ rnhmjoj ];
|
||||
};
|
||||
}
|
|
@ -4,7 +4,9 @@
|
|||
, libsepol
|
||||
# No openssl in default version, so openssl-induced rebuilds aren't too big.
|
||||
# It makes *sum functions significantly faster.
|
||||
, minimal ? true, withOpenssl ? !minimal, openssl, withPrefix ? false
|
||||
, minimal ? true, withOpenssl ? !minimal
|
||||
, openssl ? throw "openssl used for non-minimal build of coreutils"
|
||||
, withPrefix ? false
|
||||
, singleBinary ? "symlinks" # you can also pass "shebangs" or false
|
||||
}:
|
||||
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, autoreconfHook
|
||||
|
||||
# for passthru.tests
|
||||
# , git
|
||||
# , libguestfs
|
||||
# , nixosTests
|
||||
# , rpm
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cpio";
|
||||
version = "2.15";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/cpio/cpio-${version}.tar.bz2";
|
||||
hash = "sha256-k3YQuXwymh7JJoVT+3gAN7z/8Nz/6XJevE/ZwaqQdds=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
preConfigure = lib.optionalString stdenv.isCygwin ''
|
||||
sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# passthru.tests = {
|
||||
# inherit libguestfs rpm;
|
||||
# git = git.tests.withInstallCheck;
|
||||
# initrd = nixosTests.systemd-initrd-simple;
|
||||
# };
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/cpio/";
|
||||
description = "A program to create or extract from cpio archives";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.all;
|
||||
priority = 6; # resolves collision with gnutar's "libexec/rmt"
|
||||
mainProgram = "cpio";
|
||||
};
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
let version = "2.9.11";
|
||||
in { stdenv, lib, buildPackages, fetchurl, zlib, gettext, lists ? [
|
||||
(fetchurl {
|
||||
url =
|
||||
"https://github.com/cracklib/cracklib/releases/download/v${version}/cracklib-words-${version}.gz";
|
||||
hash = "sha256-popxGjE1c517Z+nzYLM/DU7M+b1/rE0XwNXkVqkcUXo=";
|
||||
})
|
||||
] }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cracklib";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
|
||||
hash = "sha256-yosEmjwtOyIloejRXWE3mOvHSOOVA4jtomlN5Qe6YCA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
buildPackages.cracklib;
|
||||
buildInputs = [ zlib gettext ];
|
||||
|
||||
postPatch =
|
||||
lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
chmod +x util/cracklib-format
|
||||
patchShebangs util
|
||||
|
||||
'' + ''
|
||||
ln -vs ${toString lists} dicts/
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
make dict-local
|
||||
'';
|
||||
doInstallCheck = true;
|
||||
installCheckTarget = "test";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/cracklib/cracklib";
|
||||
description = "A library for checking the strength of passwords";
|
||||
license =
|
||||
licenses.lgpl21; # Different license for the wordlist: http://www.openwall.com/wordlists
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, lvm2, json_c, asciidoctor, openssl, libuuid, pkg-config
|
||||
, popt, nixosTests, libargon2, withInternalArgon2 ? false
|
||||
|
||||
# Programs enabled by default upstream are implicitly enabled unless
|
||||
# manually set to false.
|
||||
, programs ? { }
|
||||
# The release tarballs contain precomputed manpage files, so we don't need
|
||||
# to run asciidoctor on the man sources. By avoiding asciidoctor, we make
|
||||
# the bare NixOS build hash independent of changes to the ruby ecosystem,
|
||||
# saving mass-rebuilds.
|
||||
, rebuildMan ? false }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cryptsetup";
|
||||
version = "2.7.1";
|
||||
|
||||
outputs = [ "bin" "out" "dev" "man" ];
|
||||
separateDebugInfo = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/utils/cryptsetup/v${
|
||||
lib.versions.majorMinor version
|
||||
}/${pname}-${version}.tar.xz";
|
||||
hash = "sha256-2l0UGeKobgGqMv15WCzVTSCIV8tUG8ov1Cal/xqqu8M=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Allow reading tokens from a relative path, see #167994
|
||||
./relative-token-path.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs tests
|
||||
|
||||
# O_DIRECT is filesystem dependent and fails in a sandbox (on tmpfs)
|
||||
# and on several filesystem types (btrfs, zfs) without sandboxing.
|
||||
# Remove it, see discussion in #46151
|
||||
substituteInPlace tests/unit-utils-io.c --replace "| O_DIRECT" ""
|
||||
'';
|
||||
|
||||
NIX_LDFLAGS =
|
||||
lib.optionalString (stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic)
|
||||
"-lgcc_s";
|
||||
|
||||
configureFlags = [ "--with-crypto_backend=openssl" "--disable-ssh-token" ]
|
||||
++ lib.optionals (!rebuildMan) [ "--disable-asciidoc" ]
|
||||
++ lib.optionals (!withInternalArgon2) [ "--enable-libargon2" ]
|
||||
++ lib.optionals stdenv.hostPlatform.isStatic [
|
||||
"--disable-external-tokens"
|
||||
# We have to override this even though we're removing token
|
||||
# support, because the path still gets included in the binary even
|
||||
# though it isn't used.
|
||||
"--with-luks2-external-tokens-path=/"
|
||||
] ++ (with lib; mapAttrsToList (flip enableFeature)) programs;
|
||||
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
++ lib.optionals rebuildMan [ asciidoctor ];
|
||||
buildInputs = [ lvm2 json_c openssl libuuid popt ]
|
||||
++ lib.optional (!withInternalArgon2) libargon2;
|
||||
|
||||
# The test [7] header backup in compat-test fails with a mysterious
|
||||
# "out of memory" error, even though tons of memory is available.
|
||||
# Issue filed upstream: https://gitlab.com/cryptsetup/cryptsetup/-/issues/763
|
||||
doCheck = !stdenv.hostPlatform.isMusl;
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
nixos = lib.optionalAttrs stdenv.hostPlatform.isLinux
|
||||
(lib.recurseIntoAttrs
|
||||
(lib.filterAttrs (name: _value: lib.hasPrefix "luks" name)
|
||||
nixosTests.installer));
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://gitlab.com/cryptsetup/cryptsetup/";
|
||||
description = "LUKS for dm-crypt";
|
||||
changelog =
|
||||
"https://gitlab.com/cryptsetup/cryptsetup/-/raw/v${version}/docs/v${version}-ReleaseNotes";
|
||||
license = lib.licenses.gpl2;
|
||||
mainProgram = "cryptsetup";
|
||||
maintainers = with lib.maintainers; [ raitobezarius ];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
From 4f95ab1f8110a8ab9d7b0e192731ce467f6e5c26 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Janne=20He=C3=9F?= <janne@hess.ooo>
|
||||
Date: Sun, 4 Sep 2022 11:15:02 -0600
|
||||
Subject: [PATCH] Allow loading token handlers from the default search path
|
||||
|
||||
Since [1] landed in cryptsetup, token handlers (libcryptsetup-token-*.so)
|
||||
are loaded from a fixed path defined at compile-time. This is
|
||||
problematic with NixOS since it introduces a dependency cycle
|
||||
between cryptsetup and systemd.
|
||||
|
||||
This downstream patch [2] allows loading token plugins from the
|
||||
default library search path. This approach is not accepted upstream [3]
|
||||
due to security concerns, but the potential attack vectors require
|
||||
root access and they are sufficiently addressed:
|
||||
|
||||
* cryptsetup could be used as a setuid binary (not used in NixOS).
|
||||
In this case, LD_LIBRARY_PATH is ignored because of secure-execution
|
||||
mode.
|
||||
* cryptsetup running as root could lead to a malicious token handler
|
||||
being loaded through LD_LIBRARY_PATH. However, fixing the path
|
||||
doesn't prevent the same malicious .so being loaded through LD_PRELOAD.
|
||||
|
||||
[1] https://gitlab.com/cryptsetup/cryptsetup/-/commit/5b9e98f94178d3cd179d9f6e2a0a68c7d9eb6507
|
||||
[2] https://github.com/NixOS/nixpkgs/issues/167994#issuecomment-1094249369
|
||||
[3] https://gitlab.com/cryptsetup/cryptsetup/-/issues/733
|
||||
---
|
||||
lib/luks2/luks2_token.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/luks2/luks2_token.c b/lib/luks2/luks2_token.c
|
||||
index 26467253..6f8329f0 100644
|
||||
--- a/lib/luks2/luks2_token.c
|
||||
+++ b/lib/luks2/luks2_token.c
|
||||
@@ -151,12 +151,10 @@ crypt_token_load_external(struct crypt_device *cd, const char *name, struct cryp
|
||||
|
||||
token = &ret->u.v2;
|
||||
|
||||
- r = snprintf(buf, sizeof(buf), "%s/libcryptsetup-token-%s.so", crypt_token_external_path(), name);
|
||||
+ r = snprintf(buf, sizeof(buf), "libcryptsetup-token-%s.so", name);
|
||||
if (r < 0 || (size_t)r >= sizeof(buf))
|
||||
return -EINVAL;
|
||||
|
||||
- assert(*buf == '/');
|
||||
-
|
||||
log_dbg(cd, "Trying to load %s.", buf);
|
||||
|
||||
h = dlopen(buf, RTLD_LAZY);
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, autoconf, automake, libtool, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "CUnit";
|
||||
version = "2.1-3";
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook autoconf automake ];
|
||||
buildInputs = [ libtool ];
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"mirror://sourceforge/cunit/CUnit/${version}/${pname}-${version}.tar.bz2";
|
||||
sha256 = "057j82da9vv4li4z5ri3227ybd18nzyq81f6gsvhifs5z0vr3cpm";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A Unit Testing Framework for C";
|
||||
|
||||
longDescription = ''
|
||||
CUnit is a lightweight system for writing, administering, and running
|
||||
unit tests in C. It provides C programmers a basic testing functionality
|
||||
with a flexible variety of user interfaces.
|
||||
'';
|
||||
|
||||
homepage = "https://cunit.sourceforge.net/";
|
||||
|
||||
license = lib.licenses.lgpl2;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue