Merge pull request #214981 from superherointj/fix-musl-mariadb

mariadb: fix musl, make Numa optional; pmdk: remove
This commit is contained in:
ajs124 2023-02-08 14:29:17 +01:00 committed by GitHub
commit 555c21b15d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 51 deletions

View file

@ -1,42 +0,0 @@
{ lib, stdenv, fetchFromGitHub
, autoconf, libndctl, pkg-config, gnum4, pandoc
}:
stdenv.mkDerivation rec {
pname = "pmdk";
version = "1.11.1";
src = fetchFromGitHub {
owner = "pmem";
repo = "pmdk";
rev = "refs/tags/${version}";
hash = "sha256-8bnyLtgkKfgIjJkfY/ZS1I9aCYcrz0nrdY7m/TUVWAk=";
};
nativeBuildInputs = [ autoconf pkg-config gnum4 pandoc ];
buildInputs = [ libndctl ];
enableParallelBuilding = true;
outputs = [ "out" "lib" "dev" "man" ];
patchPhase = "patchShebangs utils";
NIX_CFLAGS_COMPILE = "-Wno-error";
installPhase = ''
make install prefix=$out
mkdir -p $lib $dev $man/share
mv $out/share/man $man/share/man
mv $out/include $dev/include
mv $out/lib $lib/lib
'';
meta = with lib; {
description = "Persistent Memory Development Kit";
homepage = "https://github.com/pmem/pmdk";
license = licenses.lgpl21;
maintainers = with maintainers; [ thoughtpolice ];
platforms = [ "x86_64-linux" ]; # aarch64 is experimental
};
}

View file

@ -13,13 +13,17 @@ let
# Server components
, bzip2, lz4, lzo, snappy, xz, zlib, zstd
, cracklib, judy, libevent, libxml2
, linux-pam, numactl, pmdk
, linux-pam, numactl
, fmt_8
, withStorageMroonga ? true, kytea, libsodium, msgpack, zeromq
, withStorageRocks ? true
, withEmbedded ? false
, withNuma ? false
}:
let
isCross = stdenv.buildPlatform != stdenv.hostPlatform;
libExt = stdenv.hostPlatform.extensions.sharedLibrary;
mytopEnv = buildPackages.perl.withPackages (p: with p; [ DBDmysql DBI TermReadKey ]);
@ -99,7 +103,7 @@ let
] ++ lib.optionals (stdenv.hostPlatform.isDarwin && lib.versionAtLeast version "10.6") [
# workaround for https://jira.mariadb.org/browse/MDEV-29925
"-Dhave_C__Wl___as_needed="
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
] ++ lib.optionals isCross [
# revisit this if nixpkgs supports any architecture whose stack grows upwards
"-DSTACK_DIRECTION=-1"
"-DCMAKE_CROSSCOMPILING_EMULATOR=${stdenv.hostPlatform.emulator buildPackages}"
@ -169,16 +173,14 @@ let
buildInputs = common.buildInputs ++ [
bzip2 lz4 lzo snappy xz zstd
cracklib judy libevent libxml2
] ++ lib.optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) numactl
] ++ lib.optional withNuma numactl
++ lib.optionals stdenv.hostPlatform.isLinux [ linux-pam ]
++ lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64) pmdk.dev
++ lib.optional (!stdenv.hostPlatform.isDarwin) mytopEnv
++ lib.optionals withStorageMroonga [ kytea libsodium msgpack zeromq ]
++ lib.optionals (lib.versionAtLeast common.version "10.7") [ fmt_8 ];
propagatedBuildInputs = lib.optionals withEmbedded
(lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64) pmdk.lib
++ lib.optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) numactl);
(lib.optional withNuma numactl);
postPatch = ''
substituteInPlace scripts/galera_new_cluster.sh \
@ -197,7 +199,7 @@ let
"-DWITHOUT_EXAMPLE=1"
"-DWITHOUT_FEDERATED=1"
"-DWITHOUT_TOKUDB=1"
] ++ lib.optionals (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) [
] ++ lib.optionals withNuma [
"-DWITH_NUMA=ON"
] ++ lib.optionals (!withStorageMroonga) [
"-DWITHOUT_MROONGA=1"

View file

@ -1214,6 +1214,7 @@ mapAliases ({
pleroma-otp = pleroma; # Added 2021-07-10
plexpy = throw "'plexpy' has been renamed to/replaced by 'tautulli'"; # Converted to throw 2022-02-22
pltScheme = racket; # just to be sure
pmdk = throw "'pmdk' is discontinued, no further support or maintenance is planned by upstream"; # Added 2023-02-06
pmtools = throw "'pmtools' has been renamed to/replaced by 'acpica-tools'"; # Converted to throw 2022-02-22
pocketsphinx = throw "pocketsphinx has been removed: unmaintained"; # Added 2022-04-24
polarssl = throw "'polarssl' has been renamed to/replaced by 'mbedtls'"; # Converted to throw 2022-02-22

View file

@ -17756,8 +17756,6 @@ with pkgs;
openjdk = openjdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
};
pmdk = callPackage ../development/libraries/pmdk { };
jdepend = callPackage ../development/tools/analysis/jdepend {
jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
};