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,37 @@
From 54b1dbc550b3daa2a7834a9bfd73a0c2f8aeba6a Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Tue, 5 Jul 2022 19:40:53 +0200
Subject: [PATCH] proj-config.cmake generation: only add find_dependency(CURL)
for static builds
---
cmake/project-config.cmake.in | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
index 3f359668..db886396 100644
--- a/cmake/project-config.cmake.in
+++ b/cmake/project-config.cmake.in
@@ -19,11 +19,15 @@ include(CMakeFindDependencyMacro)
# Cf https://gitlab.kitware.com/cmake/cmake/-/issues/17612
cmake_policy(PUSH)
cmake_policy(SET CMP0012 NEW)
-if("@ENABLE_TIFF@")
- set(PROJ_CONFIG_FIND_TIFF_DEP ON)
+if(NOT "@BUILD_SHARED_LIBS@")
+ if("@ENABLE_TIFF@")
+ set(PROJ_CONFIG_FIND_TIFF_DEP ON)
+ endif()
endif()
-if("@CURL_ENABLED@")
- set(PROJ_CONFIG_FIND_CURL_DEP ON)
+if(NOT "@BUILD_SHARED_LIBS@")
+ if("@CURL_ENABLED@")
+ set(PROJ_CONFIG_FIND_CURL_DEP ON)
+ endif()
endif()
cmake_policy(POP)
--
2.41.0

View File

@@ -0,0 +1,93 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
buildPackages,
callPackage,
sqlite,
libtiff,
curl,
gtest,
nlohmann_json,
python3,
cacert,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "proj";
version = "9.7.0";
src = fetchFromGitHub {
owner = "OSGeo";
repo = "PROJ";
rev = finalAttrs.version;
hash = "sha256-Vdznj9WGuws1p+owDNHlVERjOM3fS1+RBtqe01q500E=";
};
patches = [
# https://github.com/OSGeo/PROJ/pull/3252
./only-add-curl-for-static-builds.patch
];
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
sqlite
libtiff
curl
nlohmann_json
];
nativeCheckInputs = [
cacert
gtest
];
cmakeFlags = [
"-DUSE_EXTERNAL_GTEST=ON"
"-DRUN_NETWORK_DEPENDENT_TESTS=OFF"
"-DNLOHMANN_JSON_ORIGIN=external"
"-DEXE_SQLITE3=${buildPackages.sqlite}/bin/sqlite3"
];
CXXFLAGS = [
# GCC 13: error: 'int64_t' in namespace 'std' does not name a type
"-include cstdint"
];
preCheck =
let
libPathEnvVar = if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
in
''
export HOME=$TMPDIR
export TMP=$TMPDIR
export ${libPathEnvVar}=$PWD/lib
'';
doCheck = true;
passthru.tests = {
python = python3.pkgs.pyproj;
proj = callPackage ./tests.nix { proj = finalAttrs.finalPackage; };
};
meta = with lib; {
changelog = "https://github.com/OSGeo/PROJ/blob/${finalAttrs.src.rev}/NEWS.md";
description = "Cartographic Projections Library";
homepage = "https://proj.org/";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
teams = [ teams.geospatial ];
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,10 @@
{ runCommand, proj }:
let
inherit (proj) pname;
in
runCommand "${pname}-tests" { meta.timeout = 60; } ''
${proj}/bin/projinfo EPSG:4326 \
| grep '+proj=longlat +datum=WGS84 +no_defs +type=crs'
touch $out
''