added broken duckdb-spacial

This commit is contained in:
didier committed 2025-01-04 08:41:54 -05:00
1 parent fcde91436a
commit 16ccca118d
2 files changed
+36 -10

No files matched your search

+35 -9
View File
@@ -14,12 +14,6 @@
let
pkgs = nixpkgs.legacyPackages.${system};
# osm-data = pkgs.fetchurl {
# url =
# "https://static.home.all-dressed-programming.com/download.geofabrik.de/north-america/canada/quebec-241223.osm.pbf";
# hash = "sha256-JkDJxODHnZQLK4+5Bjdu5GkbmHSK9TPt2ep6nsykCRg=";
# };
poly2geojson = pkgs.rustPlatform.buildRustPackage rec {
pname = "poly2geojson";
version = "0.1.3";
@@ -72,12 +66,42 @@
];
doCheck = false;
doInstallCheck = false;
postInstall = ''
installShellCompletion --zsh ../zsh_completion/_osmium
'';
};
duckdb-spatial = pkgs.clangStdenv.mkDerivation rec {
pname = "duckdb-spatial";
version = "master";
src = pkgs.fetchFromGitHub {
owner = "duckdb";
repo = "duckdb-spatial";
rev = "7f861c037567dadaeff9cb5dcde4e5f2e87a4e14";
sha256 = "sha256-8kfNofzbmPJ7+qKKzsr7LVu1mMDwGhy5nQj6/kRhYLg=";
};
librarySystemDepends = [ pkgs.zlib ];
executableSystemDepends = [ pkgs.zlib ];
cmakeFlags =
[ "-DVCPKG_TARGET_TRIPLET=${system}" "-DSPATIAL_USE_NETWORK=0" ];
nativeBuildInputs = with pkgs; [
cmake
installShellFiles
pandoc
pkg-config
zlib
];
buildInputs = with pkgs; [ geographiclib openssl geos curl zlib ];
doCheck = false;
};
geofabrik-base-url =
"https://static.home.all-dressed-programming.com/download.geofabrik.de/north-america/canada/";
@@ -119,7 +143,7 @@
mkdir -p cities/canada/quebec
cp ${quebec-cities-poly}/canada/quebec/* cities/canada/quebec
chmod u+w cities/canada/quebec
${pkgs.babashka}/bin/bb to-geojson.clj --osm-file ${osm-data} --paths cities/canada/quebec/mon*.poly
${pkgs.babashka}/bin/bb to-geojson.clj --osm-file ${osm-data} --paths cities/canada/quebec/*.poly
'';
installPhase = ''
cp -r cities $out
@@ -152,10 +176,10 @@
]);
in {
packages = {
default = data-dir;
default = historical-data-dir;
poly2geojson = poly2geojson;
osmosis = osmosis;
historical-data-dir = historical-data-dir;
duckdb-spatial = duckdb-spatial;
};
devShell = pkgs.mkShell {
name = "spacial-data-experiments";
@@ -167,6 +191,8 @@
gdal
custom-osmium-tool
python-virtual-env
dotnet-sdk_8
nuget-to-nix
];
};
});