db: make patches and autoreconfHook unconditional

This commit is contained in:
Randy Eckenrode 2023-07-06 16:45:12 -06:00
parent 2b9656eb4f
commit a76023f256
No known key found for this signature in database
GPG key ID: 64C1CD4EC2A600D9
5 changed files with 24 additions and 15 deletions

View file

@ -3,8 +3,11 @@
import ./generic.nix (args // {
version = "4.8.30";
sha256 = "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0";
extraPatches = [ ./clang-4.8.patch ./CVE-2017-10140-4.8-cwd-db_config.patch ]
++ lib.optionals stdenv.isDarwin [ ./darwin-mutexes-4.8.patch ];
extraPatches = [
./clang-4.8.patch
./CVE-2017-10140-4.8-cwd-db_config.patch
./darwin-mutexes-4.8.patch
];
drvArgs.hardeningDisable = [ "format" ];
drvArgs.doCheck = false;

View file

@ -3,6 +3,9 @@
import ./generic.nix (args // {
version = "5.3.28";
sha256 = "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0";
extraPatches = [ ./clang-5.3.patch ./CVE-2017-10140-cwd-db_config.patch ]
++ lib.optionals stdenv.isDarwin [ ./darwin-mutexes.patch ];
extraPatches = [
./clang-5.3.patch
./CVE-2017-10140-cwd-db_config.patch
./darwin-mutexes.patch
];
})

View file

@ -4,6 +4,9 @@ import ./generic.nix (args // {
version = "6.0.20";
sha256 = "00r2aaglq625y8r9xd5vw2y070plp88f1mb2gbq3kqsl7128lsl0";
license = lib.licenses.agpl3;
extraPatches = [ ./clang-6.0.patch ./CVE-2017-10140-cwd-db_config.patch ]
++ lib.optionals stdenv.isDarwin [ ./darwin-mutexes.patch ];
extraPatches = [
./clang-6.0.patch
./CVE-2017-10140-cwd-db_config.patch
./darwin-mutexes.patch
];
})

View file

@ -4,6 +4,9 @@ import ./generic.nix (args // {
version = "6.2.23";
sha256 = "1isxx4jfmnh913jzhp8hhfngbk6dsg46f4kjpvvc56maj64jqqa7";
license = lib.licenses.agpl3;
extraPatches = [ ./clang-6.0.patch ./CVE-2017-10140-cwd-db_config.patch ]
++ lib.optionals stdenv.isDarwin [ ./darwin-mutexes.patch ];
extraPatches = [
./clang-6.0.patch
./CVE-2017-10140-cwd-db_config.patch
./darwin-mutexes.patch
];
})

View file

@ -10,9 +10,6 @@
, drvArgs ? {}
}:
let
shouldReconfigure = stdenv.cc.isClang;
in
stdenv.mkDerivation (rec {
pname = "db";
inherit version;
@ -24,16 +21,16 @@ stdenv.mkDerivation (rec {
# The provided configure script features `main` returning implicit `int`, which causes
# configure checks to work incorrectly with clang 16.
nativeBuildInputs = lib.optionals stdenv.cc.isClang [ autoreconfHook ];
nativeBuildInputs = [ autoreconfHook ];
patches = extraPatches;
outputs = [ "bin" "out" "dev" ];
# Required when regenerated the configure script to make sure the vendored macros are found.
autoreconfFlags = lib.optionalString shouldReconfigure [ "-fi" "-Iaclocal" "-Iaclocal_java" ];
autoreconfFlags = [ "-fi" "-Iaclocal" "-Iaclocal_java" ];
preAutoreconf = lib.optionalString shouldReconfigure ''
preAutoreconf = ''
pushd dist
# Upstreams `dist/s_config` cats everything into `aclocal.m4`, but that doesnt work with
# autoreconfHook, so cat `config.m4` to another file. Otherwise, it wont be found by `aclocal`.
@ -43,7 +40,7 @@ stdenv.mkDerivation (rec {
# This isnt pretty. The version information is kept separate from the configure script.
# After the configure script is regenerated, the version information has to be replaced with the
# contents of `dist/RELEASE`.
postAutoreconf = lib.optionalString shouldReconfigure ''
postAutoreconf = ''
(
declare -a vars=(
"DB_VERSION_FAMILY"