push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,139 @@
{
stdenv,
fetchurl,
fetchzip,
lib,
emptyDirectory,
linkFarm,
jam,
openssl,
testers,
}:
let
opensslStatic = openssl.override {
static = true;
};
androidZlibContrib =
let
src = fetchzip {
url = "https://android.googlesource.com/platform/external/zlib/+archive/61174f4fd262c6075f88768465f308aae95a2f04.tar.gz";
sha256 = "sha256-EMzKAHcEWOUugcHKH2Fj3ZaIHC9UlgO4ULKe3RvgxvI=";
stripRoot = false;
};
in
linkFarm "android-zlib-contrib" [
# We only want to keep the contrib directory as the other files conflict
# with p4's own zlib files. (For the same reason, we can't use the
# cone-based Git sparse checkout, either.)
{
name = "contrib";
path = "${src}/contrib";
}
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "p4";
version = "2024.1/2596294";
src = fetchurl {
# Upstream replaces minor versions, so use archived URL.
url = "https://web.archive.org/web/20240526153453id_/https://ftp.perforce.com/perforce/r24.1/bin.tools/p4source.tgz";
sha256 = "sha256-6+DOJPeVzP4x0UsN9MlZRAyusapBTICX0BuyvVBQBC8=";
};
postPatch = lib.optionals stdenv.hostPlatform.isDarwin ''
# same error as https://github.com/pocoproject/poco/issues/4586
substituteInPlace zlib/zutil.h \
--replace-fail '#if defined(MACOS) || defined(TARGET_OS_MAC)' '#if defined(MACOS)'
'';
nativeBuildInputs = [ jam ];
outputs = [
"out"
"bin"
"dev"
];
hardeningDisable = lib.optionals stdenv.hostPlatform.isDarwin [ "strictoverflow" ];
jamFlags = [
"-sEXEC=bin.unix"
"-sCROSS_COMPILE=${stdenv.cc.targetPrefix}"
"-sMALLOC_OVERRIDE=no"
"-sSSLINCDIR=${lib.getDev opensslStatic}/include"
"-sSSLLIBDIR=${lib.getLib opensslStatic}/lib"
]
++ lib.optionals stdenv.cc.isClang [
"-sOSCOMP=clang"
"-sCLANGVER=${stdenv.cc.cc.version}"
]
++ lib.optionals stdenv.cc.isGNU [
"-sOSCOMP=gcc"
"-sGCCVER=${stdenv.cc.cc.version}"
]
++ lib.optionals stdenv.hostPlatform.isLinux [ "-sOSVER=26" ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
"-sOSVER=1013"
"-sLIBC++DIR=${lib.getLib stdenv.cc.libcxx}/lib"
];
CCFLAGS =
# The file contrib/optimizations/slide_hash_neon.h is missing from the
# upstream distribution. It comes from the Android/Chromium sources.
lib.optionals stdenv.hostPlatform.isAarch64 [ "-I${androidZlibContrib}" ];
"C++FLAGS" =
# Avoid a compilation error that only occurs for 4-byte longs.
lib.optionals stdenv.hostPlatform.isi686 [ "-Wno-narrowing" ]
# See the "Header dependency changes" section of
# https://www.gnu.org/software/gcc/gcc-11/porting_to.html for more
# information on why we need to include these.
++
lib.optionals
(stdenv.cc.isClang || (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.cc.version "11.0.0"))
[
"-include"
"limits"
"-include"
"thread"
];
preBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
export MACOSX_SDK=$SDKROOT
'';
buildPhase = ''
runHook preBuild
jam $jamFlags -j$NIX_BUILD_CORES p4
jam $jamFlags -j$NIX_BUILD_CORES -sPRODUCTION=yes p4api.tar
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $bin/bin $dev $out
cp bin.unix/p4 $bin/bin
cp -r bin.unix/p4api-*/include $dev
cp -r bin.unix/p4api-*/lib $out
runHook postInstall
'';
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "p4 -V";
};
meta = with lib; {
description = "Perforce Helix Core command-line client and APIs";
homepage = "https://www.perforce.com";
license = licenses.bsd2;
mainProgram = "p4";
platforms = platforms.unix;
maintainers = with maintainers; [
corngood
impl
];
};
})

View File

@@ -0,0 +1,53 @@
{
stdenv,
fetchurl,
lib,
autoPatchelfHook,
}:
let
# Upstream replaces minor versions, so use cached URLs.
srcs = {
"x86_64-linux" = fetchurl {
url = "https://web.archive.org/web/20231109221336id_/https://ftp.perforce.com/perforce/r23.1/bin.linux26x86_64/helix-core-server.tgz";
sha256 = "b68c4907cf9258ab47102e8f0e489c11d528a8f614bfa45e3a2fa198639e2362";
};
"x86_64-darwin" = fetchurl {
url = "https://web.archive.org/web/20231109221937id_/https://ftp.perforce.com/perforce/r23.1/bin.macosx1015x86_64/helix-core-server.tgz";
sha256 = "fcbf09787ffc29f7237839711447bf19a37ae18a8a7e19b2d30deb3715ae2c11";
};
};
in
stdenv.mkDerivation {
pname = "p4d";
version = "2023.1.2513900";
src =
assert lib.assertMsg (builtins.hasAttr stdenv.hostPlatform.system srcs)
"p4d is not available for ${stdenv.hostPlatform.system}";
srcs.${stdenv.hostPlatform.system};
sourceRoot = ".";
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
dontBuild = true;
installPhase = ''
install -D -t $out/bin p4broker p4d p4p
install -D -t $out/doc/p4d -m 0644 *.txt
'';
meta = with lib; {
description = "Perforce Helix Core Server";
homepage = "https://www.perforce.com";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
mainProgram = "p4d";
platforms = builtins.attrNames srcs;
maintainers = with maintainers; [
corngood
impl
];
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
mpi,
zlib,
jansson,
mpiCheckPhaseHook,
debug ? false,
mpiSupport ? true,
# passthru.tests
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "p4est-sc";
version = "2.8.7";
src = fetchFromGitHub {
owner = "cburstedde";
repo = "libsc";
tag = "v${finalAttrs.version}";
hash = "sha256-oeEYNaYx1IdEWefctgUZVUa6wnb8K3z5Il2Y9MtQwBc=";
};
strictDeps = true;
postPatch = ''
echo $version > .tarball-version
'';
nativeBuildInputs = [
autoreconfHook
pkg-config
]
++ lib.optional mpiSupport mpi;
propagatedBuildInputs = [
zlib
jansson
];
configureFlags = [
"LDFLAGS=-lm"
]
++ lib.optionals mpiSupport [
"--enable-mpi"
"CC=mpicc"
]
++ lib.optional debug "--enable-debug";
__darwinAllowLocalNetworking = mpiSupport;
nativeCheckInputs = lib.optionals mpiSupport [
mpiCheckPhaseHook
];
doCheck = true;
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
description = "Support for parallel scientific applications";
longDescription = ''
The SC library provides support for parallel scientific applications.
Its main purpose is to support the p4est software library, hence
this package is called p4est-sc, but it works standalone, too.
'';
homepage = "https://www.p4est.org/";
downloadPage = "https://github.com/cburstedde/libsc.git";
pkgConfigModules = [ "libsc" ];
license = lib.licenses.lgpl21Plus;
maintainers = with lib.maintainers; [ qbisi ];
};
})

View File

@@ -0,0 +1,88 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
metis,
p4est-sc,
mpi,
mpiCheckPhaseHook,
debug ? false,
withMetis ? true,
mpiSupport ? true,
# passthru.tests
testers,
}:
let
p4est-sc' = p4est-sc.override { inherit mpi mpiSupport debug; };
in
stdenv.mkDerivation (finalAttrs: {
pname = "p4est";
version = "2.8.7";
src = fetchFromGitHub {
owner = "cburstedde";
repo = "p4est";
tag = "v${finalAttrs.version}";
hash = "sha256-8JvKaYOP4IO1Xmim74KNHvMLOV3y9VRoT76RBCaRyhI=";
};
strictDeps = true;
postPatch = ''
echo $version > .tarball-version
substituteInPlace Makefile.am \
--replace-fail "@P4EST_SC_AMFLAGS@" "-I ${p4est-sc}/share/aclocal"
'';
nativeBuildInputs = [
autoreconfHook
pkg-config
]
++ lib.optional mpiSupport mpi;
buildInputs = [
metis
];
propagatedBuildInputs = [ p4est-sc' ];
configureFlags = [
"--with-sc=${p4est-sc'}"
"--with-metis"
"--enable-p6est"
"LDFLAGS=-lm"
]
++ lib.optionals mpiSupport [
"--enable-mpi"
"CC=mpicc"
]
++ lib.optional debug "--enable-debug";
doCheck = true;
__darwinAllowLocalNetworking = mpiSupport;
nativeCheckInputs = lib.optionals mpiSupport [
mpiCheckPhaseHook
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
description = "Parallel AMR on Forests of Octrees";
longDescription = ''
The p4est software library provides algorithms for parallel AMR.
AMR refers to Adaptive Mesh Refinement, a technique in scientific
computing to cover the domain of a simulation with an adaptive mesh.
'';
homepage = "https://www.p4est.org/";
downloadPage = "https://github.com/cburstedde/p4est.git";
pkgConfigModules = [ "p4est" ];
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ qbisi ];
};
})