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,57 @@
{
makeWrapper,
nixosTests,
symlinkJoin,
extraPythonPackages ? (ps: [ ]),
libsForQt5,
# unwrapped package parameters
withGrass ? false,
withServer ? false,
withWebKit ? false,
}:
let
qgis-unwrapped = libsForQt5.callPackage ./unwrapped.nix {
withGrass = withGrass;
withServer = withServer;
withWebKit = withWebKit;
};
in
symlinkJoin {
inherit (qgis-unwrapped) version src;
pname = "qgis";
paths = [ qgis-unwrapped ];
nativeBuildInputs = [
makeWrapper
qgis-unwrapped.py.pkgs.wrapPython
];
# extend to add to the python environment of QGIS without rebuilding QGIS application.
pythonInputs = qgis-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-unwrapped.py.pkgs);
postBuild = ''
buildPythonPath "$pythonInputs"
for program in $out/bin/*; do
wrapProgram $program \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
done
'';
passthru = {
unwrapped = qgis-unwrapped;
tests.qgis = nixosTests.qgis;
updateScript = [
./update.sh
"qgis"
];
};
meta = qgis-unwrapped.meta;
}

View File

@@ -0,0 +1,58 @@
{
makeWrapper,
nixosTests,
symlinkJoin,
extraPythonPackages ? (ps: [ ]),
libsForQt5,
# unwrapped package parameters
withGrass ? false,
withServer ? false,
withWebKit ? false,
}:
let
qgis-ltr-unwrapped = libsForQt5.callPackage ./unwrapped-ltr.nix {
withGrass = withGrass;
withServer = withServer;
withWebKit = withWebKit;
};
in
symlinkJoin {
inherit (qgis-ltr-unwrapped) version src;
pname = "qgis";
paths = [ qgis-ltr-unwrapped ];
nativeBuildInputs = [
makeWrapper
qgis-ltr-unwrapped.py.pkgs.wrapPython
];
# extend to add to the python environment of QGIS without rebuilding QGIS application.
pythonInputs =
qgis-ltr-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-ltr-unwrapped.py.pkgs);
postBuild = ''
buildPythonPath "$pythonInputs"
for program in $out/bin/*; do
wrapProgram $program \
--prefix PATH : $program_PATH \
--set PYTHONPATH $program_PYTHONPATH
done
'';
passthru = {
unwrapped = qgis-ltr-unwrapped;
tests.qgis-ltr = nixosTests.qgis-ltr;
updateScript = [
./update.sh
"qgis-ltr"
];
};
inherit (qgis-ltr-unwrapped) meta;
}

View File

@@ -0,0 +1,49 @@
diff --git a/cmake/FindPyQt5.cmake b/cmake/FindPyQt5.cmake
index b51fd0075e..87ee317e05 100644
--- a/cmake/FindPyQt5.cmake
+++ b/cmake/FindPyQt5.cmake
@@ -25,7 +25,7 @@ ELSE(EXISTS PYQT5_VERSION_STR)
IF(SIP_BUILD_EXECUTABLE)
# SIP >= 5.0 path
- FILE(GLOB _pyqt5_metadata "${Python_SITEARCH}/PyQt5-*.dist-info/METADATA")
+ FILE(GLOB _pyqt5_metadata "@pyQt5PackageDir@/PyQt5-*.dist-info/METADATA")
IF(_pyqt5_metadata)
FILE(READ ${_pyqt5_metadata} _pyqt5_metadata_contents)
STRING(REGEX REPLACE ".*\nVersion: ([^\n]+).*$" "\\1" PYQT5_VERSION_STR ${_pyqt5_metadata_contents})
diff --git a/cmake/FindQsci.cmake b/cmake/FindQsci.cmake
index 69e41c1fe9..5456c3d59b 100644
--- a/cmake/FindQsci.cmake
+++ b/cmake/FindQsci.cmake
@@ -24,7 +24,7 @@ ELSE(QSCI_MOD_VERSION_STR)
IF(SIP_BUILD_EXECUTABLE)
# SIP >= 5.0 path
- FILE(GLOB _qsci_metadata "${Python_SITEARCH}/QScintilla*.dist-info/METADATA")
+ FILE(GLOB _qsci_metadata "@qsciPackageDir@/QScintilla*.dist-info/METADATA")
IF(_qsci_metadata)
FILE(READ ${_qsci_metadata} _qsci_metadata_contents)
STRING(REGEX REPLACE ".*\nVersion: ([^\n]+).*$" "\\1" QSCI_MOD_VERSION_STR ${_qsci_metadata_contents})
@@ -33,7 +33,7 @@ ELSE(QSCI_MOD_VERSION_STR)
ENDIF(_qsci_metadata)
IF(QSCI_MOD_VERSION_STR)
- SET(QSCI_SIP_DIR "${PYQT_SIP_DIR}")
+ SET(QSCI_SIP_DIR "@qsciPackageDir@/PyQt5/bindings")
SET(QSCI_FOUND TRUE)
ENDIF(QSCI_MOD_VERSION_STR)
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 4cd19c3af4..668cc6a5e6 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -212,7 +212,7 @@ if (WITH_GUI)
install(FILES ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_gui.pyi DESTINATION ${QGIS_PYTHON_DIR})
endif()
if(QSCI_SIP_DIR)
- set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -I ${QSCI_SIP_DIR})
+ set(SIP_BUILD_EXTRA_OPTIONS ${SIP_BUILD_EXTRA_OPTIONS} --include-dir=${QSCI_SIP_DIR})
else()
message(STATUS "Qsci sip file not found - disabling bindings for derived classes")
set(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} HAVE_QSCI_SIP)

View File

@@ -0,0 +1,49 @@
diff --git a/cmake/FindPyQt5.cmake b/cmake/FindPyQt5.cmake
index b51fd0075e..87ee317e05 100644
--- a/cmake/FindPyQt5.cmake
+++ b/cmake/FindPyQt5.cmake
@@ -25,7 +25,7 @@ ELSE(EXISTS PYQT5_VERSION_STR)
IF(SIP_BUILD_EXECUTABLE)
# SIP >= 5.0 path
- FILE(GLOB _pyqt5_metadata "${Python_SITEARCH}/PyQt5-*.dist-info/METADATA")
+ FILE(GLOB _pyqt5_metadata "@pyQt5PackageDir@/PyQt5-*.dist-info/METADATA")
IF(_pyqt5_metadata)
FILE(READ ${_pyqt5_metadata} _pyqt5_metadata_contents)
STRING(REGEX REPLACE ".*\nVersion: ([^\n]+).*$" "\\1" PYQT5_VERSION_STR ${_pyqt5_metadata_contents})
diff --git a/cmake/FindQsci.cmake b/cmake/FindQsci.cmake
index 69e41c1fe9..5456c3d59b 100644
--- a/cmake/FindQsci.cmake
+++ b/cmake/FindQsci.cmake
@@ -24,7 +24,7 @@ ELSE(QSCI_MOD_VERSION_STR)
IF(SIP_BUILD_EXECUTABLE)
# SIP >= 5.0 path
- FILE(GLOB _qsci_metadata "${Python_SITEARCH}/QScintilla*.dist-info/METADATA")
+ FILE(GLOB _qsci_metadata "@qsciPackageDir@/QScintilla*.dist-info/METADATA")
IF(_qsci_metadata)
FILE(READ ${_qsci_metadata} _qsci_metadata_contents)
STRING(REGEX REPLACE ".*\nVersion: ([^\n]+).*$" "\\1" QSCI_MOD_VERSION_STR ${_qsci_metadata_contents})
@@ -33,7 +33,7 @@ ELSE(QSCI_MOD_VERSION_STR)
ENDIF(_qsci_metadata)
IF(QSCI_MOD_VERSION_STR)
- SET(QSCI_SIP_DIR "${PYQT_SIP_DIR}")
+ SET(QSCI_SIP_DIR "@qsciPackageDir@/PyQt5/bindings")
SET(QSCI_FOUND TRUE)
ENDIF(QSCI_MOD_VERSION_STR)
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 4cd19c3af4..668cc6a5e6 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -212,7 +212,7 @@ if (WITH_GUI)
install(FILES ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_gui.pyi DESTINATION ${QGIS_PYTHON_DIR})
endif()
if(QSCI_SIP_DIR)
- set(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -I ${QSCI_SIP_DIR})
+ set(SIP_BUILD_EXTRA_OPTIONS ${SIP_BUILD_EXTRA_OPTIONS} --include-dir=${QSCI_SIP_DIR})
else()
message(STATUS "Qsci sip file not found - disabling bindings for derived classes")
set(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} HAVE_QSCI_SIP)

View File

@@ -0,0 +1,64 @@
# QGIS test script.
# This script will create vector memory layer containing Nix snowflake.
# Set QGIS_TEST_INTERACTIVE=True to run this script in interactive mode (and see
# Nix snowflake).
# Run script as following:
# QGIS_TEST_INTERACTIVE=True ./result/bin/qgis --code pkgs/applications/gis/qgis/test.py
import os
test_interactive = eval(os.getenv("QGIS_TEST_INTERACTIVE", "False"))
def test(test_interactive=False):
import osgeo # just to check if geo python modules are available
from qgis.core import QgsVectorLayer, QgsFeature, QgsGeometry, QgsProject
# Nix snowflake as WKT
WKT = """
MULTIPOLYGON (
((37.10819200000000251 45.01934500000000128, 41.42360200000000248 45.0228350000000006, 43.98593199999999825 46.39836900000000242, 51.11554000000000286 46.39135900000000134, 52.20562400000000025 46.98079299999999847, 51.13812500000000227 47.55708200000000119, 46.12925599999999804 47.56117799999999818, 48.65136199999999889 48.91279899999999969, 46.46644299999999816 50.06610299999999825, 37.10819200000000251 45.01934500000000128)),
((36.37806400000000195 49.06532800000000094, 34.21064499999999953 50.22733199999999698, 29.10392099999999971 50.23055699999999746, 25.55861099999999908 52.15672200000000203, 23.37426999999999921 52.15597100000000097, 22.30527299999999968 51.57995100000000122, 24.79831000000000074 50.22714599999999763, 19.77820099999999925 50.23147999999999769, 17.66315000000000168 49.06561399999999651, 36.37806400000000195 49.06532800000000094)),
((25.51021400000000128 46.84120599999999968, 23.36222199999999916 45.67570500000000067, 25.90661599999999964 44.29694800000000043, 22.32231799999999922 42.37779100000000199, 23.41657500000000169 41.78910799999999881, 25.55307200000000023 41.78884599999999949, 28.06890399999999985 43.13755299999999693, 30.56690599999999947 41.78159999999999741, 34.86687599999999776 41.79416100000000256, 25.51021400000000128 46.84120599999999968)),
((29.60533099999999962 44.88583400000000267, 31.77274900000000102 43.72382000000000346, 36.87947299999999728 43.7205939999999984, 40.42478299999999791 41.79442999999999842, 42.60912400000000133 41.7951929999999976, 43.67812200000000189 42.37121299999999735, 41.18508400000000336 43.72401599999999888, 46.20519399999999877 43.71968400000000088, 48.32024400000000242 44.885548, 29.60533099999999962 44.88583400000000267)),
((28.88739899999999849 48.92013800000000145, 24.57198899999999853 48.9166450000000026, 22.0096589999999992 47.54111400000000032, 14.88005199999999917 47.54812199999999933, 13.78996700000000075 46.95868999999999716, 14.85746600000000051 46.38240100000000155, 19.86633600000000044 46.37830199999999792, 17.34422899999999856 45.02668100000000351, 19.52914900000000031 43.87337800000000243, 28.88739899999999849 48.92013800000000145)),
((25.52133699999999905 46.84445300000000145, 23.37334500000000048 45.67894900000000291, 25.91773900000000097 44.30019200000000268, 22.33344200000000157 42.38103699999999918, 23.4276990000000005 41.79235400000000311, 25.56419500000000156 41.79209199999999669, 28.08002700000000118 43.14079900000000123, 30.57802999999999827 41.78484600000000171, 34.87800000000000011 41.79740699999999975, 25.52133699999999905 46.84445300000000145)),
((25.52133699999999905 46.84445300000000145, 23.37334500000000048 45.67895099999999786, 25.91773900000000097 44.30019200000000268, 22.33344200000000157 42.38103699999999918, 23.4276990000000005 41.79235400000000311, 25.56419500000000156 41.79209199999999669, 28.08002700000000118 43.14079900000000123, 30.57802999999999827 41.78484600000000171, 34.87800000000000011 41.79740699999999975, 25.52133699999999905 46.84445300000000145)),
((25.51021400000000128 46.84120599999999968, 23.36222199999999916 45.67570500000000067, 25.90661599999999964 44.29694800000000043, 22.32231799999999922 42.37779100000000199, 23.41657500000000169 41.78910799999999881, 25.55307200000000023 41.78884599999999949, 28.06890399999999985 43.13755299999999693, 30.56690599999999947 41.78159999999999741, 34.86687599999999776 41.79416100000000256, 25.51021400000000128 46.84120599999999968)),
((40.49807200000000051 47.09720099999999832, 42.64606299999999806 48.26270199999999733, 40.10166999999999859 49.64145899999999756, 43.685966999999998 51.56061600000000311, 42.59170999999999907 52.14929899999999918, 40.45521399999999801 52.1495609999999985, 37.93938099999999736 50.80085400000000107, 35.44137899999999775 52.15680700000000058, 31.14140899999999945 52.14424700000000001, 40.49807200000000051 47.09720099999999832)),
)
"""
layer = QgsVectorLayer('Polygon?crs=epsg:3857', 'QGIS-on-Nix', 'memory')
provider = layer.dataProvider()
polygon = QgsFeature()
geom = QgsGeometry.fromWkt(WKT)
polygon.setGeometry(geom)
provider.addFeatures([polygon])
layer.updateExtents()
QgsProject.instance().addMapLayers([layer])
# Make sure our test layer contains exactly one feature
assert layer.featureCount() == 1
if not test_interactive:
QgsProject.instance().removeMapLayer(layer)
QgsProject.instance().clear()
try:
test(test_interactive=test_interactive)
if not test_interactive:
print("QGIS test script was successfully executed.")
os._exit(0) # iface.actionExit().trigger() doesn't work
except Exception as e:
if not test_interactive:
print("QGIS test script has failed.")
print("Error message: {}".format(e))
os._exit(1)

View File

@@ -0,0 +1,209 @@
{
lib,
fetchFromGitHub,
makeWrapper,
mkDerivation,
replaceVars,
wrapGAppsHook3,
wrapQtAppsHook,
withGrass,
withServer,
withWebKit,
bison,
cmake,
draco,
exiv2,
fcgi,
flex,
geos,
grass,
gsl,
hdf5,
libpq,
libspatialindex,
libspatialite,
libzip,
netcdf,
ninja,
openssl,
pdal,
proj,
protobuf,
python3,
qca-qt5,
qscintilla,
qt3d,
qtbase,
qtkeychain,
qtlocation,
qtmultimedia,
qtsensors,
qtserialport,
qtwebkit,
qtxmlpatterns,
qwt,
sqlite,
txt2tags,
zstd,
}:
let
py = python3.override {
self = py;
packageOverrides = self: super: {
pyqt5 = super.pyqt5.override {
withLocation = true;
withSerialPort = true;
};
};
};
pythonBuildInputs = with py.pkgs; [
chardet
gdal
jinja2
numpy
owslib
psycopg2
pygments
pyqt5
pyqt-builder
python-dateutil
pytz
pyyaml
qscintilla-qt5
requests
setuptools
sip
six
urllib3
];
in
mkDerivation rec {
version = "3.40.11";
pname = "qgis-ltr-unwrapped";
src = fetchFromGitHub {
owner = "qgis";
repo = "QGIS";
rev = "final-${lib.replaceStrings [ "." ] [ "_" ] version}";
hash = "sha256-HjdOLG/x8qXTDlMKW6+jBuwi+36rBkBFM1OCe3BcjWY=";
};
passthru = {
inherit pythonBuildInputs;
inherit py;
};
nativeBuildInputs = [
makeWrapper
wrapGAppsHook3
wrapQtAppsHook
bison
cmake
flex
ninja
];
buildInputs = [
draco
exiv2
fcgi
geos
gsl
hdf5
libpq
libspatialindex
libspatialite
libzip
netcdf
openssl
pdal
proj
protobuf
qca-qt5
qscintilla
qt3d
qtbase
qtkeychain
qtlocation
qtmultimedia
qtsensors
qtserialport
qtxmlpatterns
qwt
sqlite
txt2tags
zstd
]
++ lib.optional withGrass grass
++ lib.optional withWebKit qtwebkit
++ pythonBuildInputs;
patches = [
(replaceVars ./set-pyqt-package-dirs-ltr.patch {
pyQt5PackageDir = "${py.pkgs.pyqt5}/${py.pkgs.python.sitePackages}";
qsciPackageDir = "${py.pkgs.qscintilla-qt5}/${py.pkgs.python.sitePackages}";
})
];
# Add path to Qt platform plugins
# (offscreen is needed by "${APIS_SRC_DIR}/generate_console_pap.py")
env.QT_QPA_PLATFORM_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}/platforms";
cmakeFlags = [
"-DWITH_3D=True"
"-DWITH_PDAL=True"
"-DENABLE_TESTS=False"
"-DQT_PLUGINS_DIR=${qtbase}/${qtbase.qtPluginPrefix}"
# Remove for QGIS 3.42
"-DCMAKE_POLICY_DEFAULT_CMP0175=OLD"
"-DCMAKE_POLICY_DEFAULT_CMP0177=OLD"
]
++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF"
++ lib.optional withServer [
"-DWITH_SERVER=True"
"-DQGIS_CGIBIN_SUBDIR=${placeholder "out"}/lib/cgi-bin"
]
++ lib.optional withGrass (
let
gmajor = lib.versions.major grass.version;
gminor = lib.versions.minor grass.version;
in
"-DGRASS_PREFIX${gmajor}=${grass}/grass${gmajor}${gminor}"
);
qtWrapperArgs = [
"--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase}/${qtbase.qtPluginPrefix}/platforms"
];
dontWrapGApps = true; # wrapper params passed below
postFixup = lib.optionalString withGrass ''
# GRASS has to be availble on the command line even though we baked in
# the path at build time using GRASS_PREFIX.
# Using wrapGAppsHook also prevents file dialogs from crashing the program
# on non-NixOS.
for program in $out/bin/*; do
wrapProgram $program \
"''${gappsWrapperArgs[@]}" \
--prefix PATH : ${lib.makeBinPath [ grass ]}
done
'';
# >9k objects, >3h build time on a normal build slot
requiredSystemFeatures = [ "big-parallel" ];
meta = with lib; {
description = "Free and Open Source Geographic Information System";
homepage = "https://www.qgis.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ lsix ];
teams = [ teams.geospatial ];
platforms = with platforms; linux;
};
}

View File

@@ -0,0 +1,205 @@
{
lib,
fetchFromGitHub,
makeWrapper,
mkDerivation,
replaceVars,
wrapGAppsHook3,
wrapQtAppsHook,
withGrass,
withServer,
withWebKit,
bison,
cmake,
draco,
exiv2,
fcgi,
flex,
geos,
grass,
gsl,
hdf5,
libspatialindex,
libspatialite,
libzip,
netcdf,
ninja,
openssl,
pdal,
libpq,
proj,
protobuf,
python3,
qca-qt5,
qscintilla,
qt3d,
qtbase,
qtkeychain,
qtlocation,
qtmultimedia,
qtsensors,
qtserialport,
qtwebkit,
qtxmlpatterns,
qwt,
sqlite,
txt2tags,
zstd,
}:
let
py = python3.override {
self = py;
packageOverrides = self: super: {
pyqt5 = super.pyqt5.override {
withLocation = true;
withSerialPort = true;
};
};
};
pythonBuildInputs = with py.pkgs; [
chardet
gdal
jinja2
numpy
owslib
psycopg2
pygments
pyqt5
pyqt-builder
python-dateutil
pytz
pyyaml
qscintilla-qt5
requests
setuptools
sip
six
urllib3
];
in
mkDerivation rec {
version = "3.44.3";
pname = "qgis-unwrapped";
src = fetchFromGitHub {
owner = "qgis";
repo = "QGIS";
rev = "final-${lib.replaceStrings [ "." ] [ "_" ] version}";
hash = "sha256-g7ZdNLal16b0Fbq492mPpOiNkYc3Bm4c7INWX+2e7H8=";
};
passthru = {
inherit pythonBuildInputs;
inherit py;
};
nativeBuildInputs = [
makeWrapper
wrapGAppsHook3
wrapQtAppsHook
bison
cmake
flex
ninja
];
buildInputs = [
draco
exiv2
fcgi
geos
gsl
hdf5
libspatialindex
libspatialite
libzip
netcdf
openssl
pdal
libpq
proj
protobuf
qca-qt5
qscintilla
qt3d
qtbase
qtkeychain
qtlocation
qtmultimedia
qtsensors
qtserialport
qtxmlpatterns
qwt
sqlite
txt2tags
zstd
]
++ lib.optional withGrass grass
++ lib.optional withWebKit qtwebkit
++ pythonBuildInputs;
patches = [
(replaceVars ./set-pyqt-package-dirs.patch {
pyQt5PackageDir = "${py.pkgs.pyqt5}/${py.pkgs.python.sitePackages}";
qsciPackageDir = "${py.pkgs.qscintilla-qt5}/${py.pkgs.python.sitePackages}";
})
];
# Add path to Qt platform plugins
# (offscreen is needed by "${APIS_SRC_DIR}/generate_console_pap.py")
env.QT_QPA_PLATFORM_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}/platforms";
cmakeFlags = [
"-DWITH_3D=True"
"-DWITH_PDAL=True"
"-DENABLE_TESTS=False"
"-DQT_PLUGINS_DIR=${qtbase}/${qtbase.qtPluginPrefix}"
]
++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF"
++ lib.optional withServer [
"-DWITH_SERVER=True"
"-DQGIS_CGIBIN_SUBDIR=${placeholder "out"}/lib/cgi-bin"
]
++ lib.optional withGrass (
let
gmajor = lib.versions.major grass.version;
gminor = lib.versions.minor grass.version;
in
"-DGRASS_PREFIX${gmajor}=${grass}/grass${gmajor}${gminor}"
);
qtWrapperArgs = [
"--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase}/${qtbase.qtPluginPrefix}/platforms"
];
dontWrapGApps = true; # wrapper params passed below
postFixup = lib.optionalString withGrass ''
# GRASS has to be availble on the command line even though we baked in
# the path at build time using GRASS_PREFIX.
# Using wrapGAppsHook also prevents file dialogs from crashing the program
# on non-NixOS.
for program in $out/bin/*; do
wrapProgram $program \
"''${gappsWrapperArgs[@]}" \
--prefix PATH : ${lib.makeBinPath [ grass ]}
done
'';
# >9k objects, >3h build time on a normal build slot
requiredSystemFeatures = [ "big-parallel" ];
meta = with lib; {
description = "Free and Open Source Geographic Information System";
homepage = "https://www.qgis.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ lsix ];
teams = [ teams.geospatial ];
platforms = with platforms; linux;
};
}

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts curl jq
set -eu -o pipefail
url="https://version.qgis.org/version.json"
package="$1"
function make_version {
jq --raw-output '[.major, .minor, .patch] | join(".")'
}
if [ "$package" == "qgis" ]; then
version="$(curl --silent $url | jq '.latest' | make_version)"
elif [ "$package" == "qgis-ltr" ]; then
version="$(curl --silent $url | jq '.ltr' | make_version)"
fi
update-source-version "$package" "$version"