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 let
pkgs = nixpkgs.legacyPackages.${system}; 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 { poly2geojson = pkgs.rustPlatform.buildRustPackage rec {
pname = "poly2geojson"; pname = "poly2geojson";
version = "0.1.3"; version = "0.1.3";
@@ -72,12 +66,42 @@
]; ];
doCheck = false; doCheck = false;
doInstallCheck = false;
postInstall = '' postInstall = ''
installShellCompletion --zsh ../zsh_completion/_osmium 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 = geofabrik-base-url =
"https://static.home.all-dressed-programming.com/download.geofabrik.de/north-america/canada/"; "https://static.home.all-dressed-programming.com/download.geofabrik.de/north-america/canada/";
@@ -119,7 +143,7 @@
mkdir -p cities/canada/quebec mkdir -p cities/canada/quebec
cp ${quebec-cities-poly}/canada/quebec/* cities/canada/quebec cp ${quebec-cities-poly}/canada/quebec/* cities/canada/quebec
chmod u+w 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 = '' installPhase = ''
cp -r cities $out cp -r cities $out
@@ -152,10 +176,10 @@
]); ]);
in { in {
packages = { packages = {
default = data-dir; default = historical-data-dir;
poly2geojson = poly2geojson; poly2geojson = poly2geojson;
osmosis = osmosis; osmosis = osmosis;
historical-data-dir = historical-data-dir; duckdb-spatial = duckdb-spatial;
}; };
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
name = "spacial-data-experiments"; name = "spacial-data-experiments";
@@ -167,6 +191,8 @@
gdal gdal
custom-osmium-tool custom-osmium-tool
python-virtual-env python-virtual-env
dotnet-sdk_8
nuget-to-nix
]; ];
}; };
}); });
+1 -1
View File
@@ -24,7 +24,7 @@
cmd (osmium-command osm-file poly-file output-file)] cmd (osmium-command osm-file poly-file output-file)]
(println "Processing " poly-file " file to " output-file) (println "Processing " poly-file " file to " output-file)
(println cmd) (println cmd)
(apply shell (into [{:continue false}] cmd)))) (apply shell (into [{:continue true}] cmd))))
(def opts (cli/parse-opts *command-line-args* {:coerce {:paths []}})) (def opts (cli/parse-opts *command-line-args* {:coerce {:paths []}}))