Skip to content

Commit

Permalink
Merge branch 'master' of github.com:imincik/geospatial-nix
Browse files Browse the repository at this point in the history
  • Loading branch information
imincik committed Jul 12, 2024
2 parents 11cf05a + 49f97f7 commit 6be62e1
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 320 deletions.
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
};

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";

nixgl = {
url = "github:nix-community/nixGL";
Expand Down Expand Up @@ -61,6 +61,7 @@
"postgresql_13"
"postgresql_14"
"postgresql_15"
"postgresql_16"
];
forAllPostgresqlVersions = f: genAttrs postgresqlVersions (postgresql: f postgresql);

Expand Down Expand Up @@ -142,9 +143,6 @@
};

pyqt5 = py.pkgs.pyqt5.override {
# FIX sip and pyqt5_sip compatibility. See: https://github.com/NixOS/nixpkgs/issues/273561
# Remove this fix in NixOS 24.05.
pyqt5_sip = py.pkgs.callPackage ./pkgs/qgis/pyqt5-sip.nix { };
withLocation = true;
withSerialPort = true;
};
Expand Down Expand Up @@ -189,6 +187,8 @@

gdalMinimal = gdal-minimal;
postgresql = pg;

jitSupport = false;
};

# all packages (single Postgresql version)
Expand Down
4 changes: 2 additions & 2 deletions pkgs/fiona/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
cython_3,
cython,
gdal,
oldest-supported-numpy,
setuptools,
Expand Down Expand Up @@ -35,7 +35,7 @@ buildPythonPackage rec {
};

nativeBuildInputs = [
cython_3
cython
gdal # for gdal-config
oldest-supported-numpy
setuptools
Expand Down
22 changes: 0 additions & 22 deletions pkgs/fiona/nixpkgs/cython.patch

This file was deleted.

4 changes: 2 additions & 2 deletions pkgs/gdal/master-rev.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
rev = "c89aeb4";
hash = "sha256-aiYwZaXonn8FHz8jYDCSl+tLSnoQO1Xkdrx84HcgdxY=";
rev = "1b32f9f";
hash = "sha256-CwUx3JsQNhXyPZXCGlDT8AkqLraECErxgcAS/r+uHj8=";
}
6 changes: 3 additions & 3 deletions pkgs/grass/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
, callPackage
, fetchFromGitHub
, makeWrapper
, wrapGAppsHook
, wrapGAppsHook3

, bison
, blas
Expand Down Expand Up @@ -44,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: {

nativeBuildInputs = [
makeWrapper
wrapGAppsHook
wrapGAppsHook3

bison
flex
Expand All @@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {
libmysqlclient # for `mysql_config`
netcdf # for `nc-config`
pkg-config
] ++ (with python3Packages; [ python-dateutil numpy wxPython_4_2 ]);
] ++ (with python3Packages; [ python-dateutil numpy wxpython ]);

buildInputs = [
blas
Expand Down
22 changes: 0 additions & 22 deletions pkgs/grass/nixpkgs/wrapgappshook.patch

This file was deleted.

13 changes: 0 additions & 13 deletions pkgs/grass/nixpkgs/wxpython-rename.patch

This file was deleted.

4 changes: 2 additions & 2 deletions pkgs/pg_featureserv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ buildGoModule rec {
# fix default configuration file location
substituteInPlace \
internal/conf/config.go \
--replace "viper.AddConfigPath(\"/etc\")" "viper.AddConfigPath(\"$out/share/config\")"
--replace-fail "viper.AddConfigPath(\"/etc\")" "viper.AddConfigPath(\"$out/share/config\")"
# fix assets location in configuration file
substituteInPlace \
config/pg_featureserv.toml.example \
--replace "AssetsPath = \"./assets\"" "AssetsPath = \"$out/share/assets\""
--replace-fail "AssetsPath = \"./assets\"" "AssetsPath = \"$out/share/assets\""
'';

ldflags = [ "-s" "-w" "-X github.com/CrunchyData/pg_featureserv/conf.setVersion=${version}" ];
Expand Down
19 changes: 0 additions & 19 deletions pkgs/pg_featureserv/nixpkgs/replace.patch

This file was deleted.

4 changes: 2 additions & 2 deletions pkgs/pg_tileserv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ buildGoModule rec {
# fix default configuration file location
substituteInPlace \
main.go \
--replace "viper.AddConfigPath(\"/etc\")" "viper.AddConfigPath(\"$out/share/config\")"
--replace-fail "viper.AddConfigPath(\"/etc\")" "viper.AddConfigPath(\"$out/share/config\")"
# fix assets location in configuration file
substituteInPlace \
config/pg_tileserv.toml.example \
--replace "# AssetsPath = \"/usr/share/pg_tileserv/assets\"" "AssetsPath = \"$out/share/assets\""
--replace-fail "# AssetsPath = \"/usr/share/pg_tileserv/assets\"" "AssetsPath = \"$out/share/assets\""
'';

ldflags = [ "-s" "-w" "-X main.programVersion=${version}" ];
Expand Down
19 changes: 0 additions & 19 deletions pkgs/pg_tileserv/nixpkgs/replace.patch

This file was deleted.

36 changes: 0 additions & 36 deletions pkgs/postgis/nixpkgs/jitsupport.patch

This file was deleted.

13 changes: 0 additions & 13 deletions pkgs/postgis/nixpkgs/maintainers.patch

This file was deleted.

11 changes: 5 additions & 6 deletions pkgs/postgis/postgis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
, libiconv
, pcre2
, nixosTests
, jitSupport
, llvm
}:

let
Expand All @@ -31,13 +33,11 @@ stdenv.mkDerivation rec {

buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc pcre2.dev ]
++ lib.optional stdenv.isDarwin libiconv;
nativeBuildInputs = [ perl pkg-config ] ++ lib.optional postgresql.jitSupport postgresql.llvm;
nativeBuildInputs = [ perl pkg-config ] ++ lib.optional jitSupport llvm;
dontDisableStatic = true;

# postgis config directory assumes /include /lib from the same root for json-c library
NIX_LDFLAGS = "-L${lib.getLib json_c}/lib"
# Work around https://github.com/NixOS/nixpkgs/issues/166205.
+ lib.optionalString (stdenv.cc.isClang && stdenv.cc.libcxx != null) " -l${stdenv.cc.libcxx.cxxabi.libName}";
env.NIX_LDFLAGS = "-L${lib.getLib json_c}/lib";


preConfigure = ''
Expand Down Expand Up @@ -81,8 +81,7 @@ stdenv.mkDerivation rec {
homepage = "https://postgis.net/";
changelog = "https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS";
license = licenses.gpl2Plus;
maintainers = with maintainers; teams.geospatial.members ++ [ marcweber ];
maintainers = with maintainers; teams.geospatial.members ++ [ marcweber wolfgangwalther ];
inherit (postgresql.meta) platforms;
broken = versionOlder postgresql.version "12";
};
}
44 changes: 0 additions & 44 deletions pkgs/qgis/nixpkgs/wrapgappshook.patch

This file was deleted.

Loading

0 comments on commit 6be62e1

Please sign in to comment.