geo.scm
| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
| 3 | ;;; |
| 4 | ;;; This file is part of GNU Guix. |
| 5 | ;;; |
| 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 7 | ;;; under the terms of the GNU General Public License as published by |
| 8 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 9 | ;;; your option) any later version. |
| 10 | ;;; |
| 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | ;;; GNU General Public License for more details. |
| 15 | ;;; |
| 16 | ;;; You should have received a copy of the GNU General Public License |
| 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 18 | |
| 19 | (define-module (more packages geo) |
| 20 | #:use-module (guix packages) |
| 21 | #:use-module (guix download) |
| 22 | #:use-module (guix git-download) |
| 23 | #:use-module (guix build-system cmake) |
| 24 | #:use-module (guix build-system gnu) |
| 25 | #:use-module (guix build-system go) |
| 26 | #:use-module ((guix licenses) #:prefix license:) |
| 27 | #:use-module (gnu packages) |
| 28 | #:use-module (gnu packages boost) |
| 29 | #:use-module (gnu packages compression) |
| 30 | #:use-module (gnu packages databases) |
| 31 | #:use-module (gnu packages geo) |
| 32 | #:use-module (gnu packages image) |
| 33 | #:use-module (gnu packages lua) |
| 34 | #:use-module (gnu packages pcre) |
| 35 | #:use-module (gnu packages perl) |
| 36 | #:use-module (gnu packages pkg-config) |
| 37 | #:use-module (gnu packages web) |
| 38 | #:use-module (gnu packages xml)) |
| 39 | |
| 40 | (define-public tegola |
| 41 | (package |
| 42 | (name "tegola") |
| 43 | (version "0.6.3") |
| 44 | (source (origin |
| 45 | (method url-fetch) |
| 46 | (uri (string-append |
| 47 | "https://github.com/go-spatial/tegola/archive/v" |
| 48 | version ".tar.gz")) |
| 49 | (sha256 |
| 50 | (base32 |
| 51 | "0172ikggayprxmhhm9yfk1gc4i8m48llc8zzgqklbijkdpvp1zh0")))) |
| 52 | (build-system go-build-system) |
| 53 | (arguments |
| 54 | `(#:import-path "github.com/go-spatial/tegola/cmd/tegola" |
| 55 | #:unpack-path "github.com/go-spatial" |
| 56 | #:phases |
| 57 | (modify-phases %standard-phases |
| 58 | (add-before 'build 'rename-import |
| 59 | (lambda _ |
| 60 | (rename-file (string-append "src/github.com/go-spatial/tegola-" ,version) |
| 61 | "src/github.com/go-spatial/tegola") |
| 62 | #t))))) |
| 63 | (home-page "http://tegola.io") |
| 64 | (synopsis "Vector tile server for maps") |
| 65 | (description "Tegola is a free vector tile server written in Go. Tegola |
| 66 | takes geospatial data and slices it into vector tiles that can be efficiently |
| 67 | delivered to any client.") |
| 68 | (license license:expat))) |
| 69 | |
| 70 | (define-public imposm3 |
| 71 | (package |
| 72 | (name "imposm3") |
| 73 | (version "0.6.0-alpha.4") |
| 74 | (source |
| 75 | (origin |
| 76 | (method url-fetch) |
| 77 | (uri (string-append "https://github.com/omniscale/imposm3/archive/v" |
| 78 | version ".tar.gz")) |
| 79 | (file-name (string-append name "-" version ".tar.gz")) |
| 80 | (sha256 |
| 81 | (base32 |
| 82 | "06f0kwmv52yd5m9jlckqxqmkf0cnqy3hamakrvg9lspplyqrds80")))) |
| 83 | (build-system go-build-system) |
| 84 | (arguments |
| 85 | `(#:import-path "github.com/omniscale/imposm3/cmd/imposm" |
| 86 | #:unpack-path "github.com/omniscale" |
| 87 | #:phases |
| 88 | (modify-phases %standard-phases |
| 89 | (add-before 'build 'rename-import |
| 90 | (lambda _ |
| 91 | (rename-file (string-append "src/github.com/omniscale/imposm3-" ,version) |
| 92 | "src/github.com/omniscale/imposm3") |
| 93 | #t))))) |
| 94 | (inputs |
| 95 | `(("geos" ,geos) |
| 96 | ("leveldb" ,leveldb))) |
| 97 | (home-page "http://imposm.org/") |
| 98 | (synopsis "OpenStreetMap importer for PostGIS.") |
| 99 | (description "OpenStreetMap importer for PostGIS.") |
| 100 | (license license:asl2.0))) |
| 101 | |
| 102 | (define-public osmconvert |
| 103 | (package |
| 104 | (name "osmconvert") |
| 105 | (version "0") |
| 106 | (source (origin |
| 107 | (method url-fetch) |
| 108 | (uri (string-append "http://m.m.i24.cc/osmconvert.c")) |
| 109 | (sha256 |
| 110 | (base32 |
| 111 | "19glwq8w5sl8579zxbpydj56lybs94nrf47f3i2xjwlkmzrlljfv")))) |
| 112 | (build-system gnu-build-system) |
| 113 | (arguments |
| 114 | `(#:tests? #f; no tests |
| 115 | #:phases |
| 116 | (modify-phases %standard-phases |
| 117 | (delete 'unpack) |
| 118 | (delete 'configure) |
| 119 | (delete 'install) |
| 120 | (replace 'build |
| 121 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 122 | (mkdir-p (string-append (assoc-ref outputs "out") "/bin")) |
| 123 | (invoke "gcc" (assoc-ref inputs "source") "-lz" "-o" |
| 124 | (string-append (assoc-ref outputs "out") "/bin/osmconvert")) |
| 125 | (chmod (string-append (assoc-ref outputs "out") "/bin/osmconvert") |
| 126 | #o755) |
| 127 | #t))))) |
| 128 | (inputs |
| 129 | `(("zlib" ,zlib))) |
| 130 | (home-page "") |
| 131 | (synopsis "") |
| 132 | (description "") |
| 133 | (license license:agpl3+))) |
| 134 | |
| 135 | (define-public osm2pgsql |
| 136 | (package |
| 137 | (name "osm2pgsql") |
| 138 | (version "0.96.0") |
| 139 | (source (origin |
| 140 | (method url-fetch) |
| 141 | (uri (string-append "https://github.com/openstreetmap/osm2pgsql/archive/" |
| 142 | version ".tar.gz")) |
| 143 | (file-name (string-append name "-" version ".tar.gz")) |
| 144 | (sha256 |
| 145 | (base32 |
| 146 | "08y7776r4l9v9177a4q6cfdri0lpirky96m6g699hwl7v1vhw0mn")))) |
| 147 | (build-system cmake-build-system) |
| 148 | (arguments |
| 149 | ;; failure :/ |
| 150 | `(#:tests? #f)) |
| 151 | (inputs |
| 152 | `(("boost" ,boost) |
| 153 | ("expat" ,expat) |
| 154 | ("lua" ,lua) |
| 155 | ("postgresql" ,postgresql) |
| 156 | ("proj.4" ,proj.4) |
| 157 | ("zlib" ,zlib))) |
| 158 | (home-page "") |
| 159 | (synopsis "") |
| 160 | (description "") |
| 161 | (license license:gpl2))) |
| 162 | |
| 163 | (define-public tippecanoe |
| 164 | (package |
| 165 | (name "tippecanoe") |
| 166 | (version "1.31.5") |
| 167 | (source (origin |
| 168 | (method url-fetch) |
| 169 | (uri (string-append "https://github.com/mapbox/tippecanoe/archive/" |
| 170 | version ".tar.gz")) |
| 171 | (file-name (string-append name "-" version ".tar.gz")) |
| 172 | (sha256 |
| 173 | (base32 |
| 174 | "1057na1dkgjaryr7jr15lqkxpam111d3l5zdpdkqzzzpxmdjxqcf")))) |
| 175 | (build-system gnu-build-system) |
| 176 | (arguments |
| 177 | `(#:phases |
| 178 | (modify-phases %standard-phases (delete 'configure)) |
| 179 | #:test-target "test" |
| 180 | #:make-flags |
| 181 | (list "CC=gcc" |
| 182 | (string-append "PREFIX=" (assoc-ref %outputs "out"))))) |
| 183 | (inputs |
| 184 | `(("sqlite" ,sqlite) |
| 185 | ("zlib" ,zlib))) |
| 186 | (native-inputs |
| 187 | `(("perl" ,perl))) |
| 188 | (home-page "") |
| 189 | (synopsis "") |
| 190 | (description "") |
| 191 | (license license:bsd-2))) |
| 192 |