~ruther/guix-local

8fa839ce68efca343995415f03fcecf64da0cb83 — Sharlatan Hellseher 6 months ago 892a2b6
gnu: imposm3: Unvendor.

* gnu/packages/geo.scm (imposm3): Update to 0.14.2, use G-expressions,
unvendor.
[source] <snippet>: Remove "vendor" directory.
[arguments] <build-flags>: Set version here instead of modifying
version.go file.
<test-flags>: Skip 2 problematic tests.
<test-subdirs>: Run test for the whole project.
<phases>: Remove 'set-version; add 'remove-integration-tests.
[native-inputs]: Add go-github-com-gogo-protobuf,
go-github-com-jmhodges-levigo, go-github-com-lib-pq,
go-github-com-omniscale-go-osm, go-github-com-pkg-errors, and
go-gopkg-in-yaml-v2.
[license]: Keep just project's direct license as "vendor" dirrectory was
purged.

Change-Id: Ib39c32c5ece6ac53d45d1e219f83e92d5077fa89
1 files changed, 62 insertions(+), 26 deletions(-)

M gnu/packages/geo.scm
M gnu/packages/geo.scm => gnu/packages/geo.scm +62 -26
@@ 2140,39 2140,75 @@ delivered to any client.")
    (name "imposm3")
    (version "0.14.2")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
     (origin
       (method git-fetch)
       (uri (git-reference
              (url "https://github.com/omniscale/imposm3")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
         (base32
          "1za04n0d73gqff4qmgxbn6rz2sqwnqcpyxvzjhsgfdysbx48nph6"))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1za04n0d73gqff4qmgxbn6rz2sqwnqcpyxvzjhsgfdysbx48nph6"))
       (snippet
        #~(begin (use-modules (guix build utils))
                 (delete-file-recursively "vendor")))))
    (build-system go-build-system)
    (arguments
     `(#:import-path "github.com/omniscale/imposm3/cmd/imposm"
       #:unpack-path "github.com/omniscale/imposm3"
       #:phases
       (modify-phases %standard-phases
         (add-before 'build 'set-version
           (lambda _
             (substitute* "src/github.com/omniscale/imposm3/version.go"
               (("0.0.0-dev") ,version))
             #t)))))
     (list
      #:install-source? #f
      #:import-path "github.com/omniscale/imposm3/cmd/imposm"
      #:unpack-path "github.com/omniscale/imposm3"
      #:build-flags
      #~(list (string-append "-ldflags="
                             " -X github.com/omniscale/imposm3.Version="
                             #$version))
      #:test-flags
      #~(list "-vet=off"     ;Go@1.24 forces vet, but tests are not ready yet.
              ;; XXX: Network access or additional test data are required.
              ;;
              ;; 1. expected error with "no such host|No address associated
              ;; with hostname", got fetching current sequence for estimated
              ;; import sequence: fetching current state: Get
              ;; "https://unknownurl_planet.openstreetmap.org/replication/\
              ;; day/state.txt":
              ;; dial tcp: lookup unknownurl_planet.openstreetmap.org on
              ;; [::1]:53: read udp [::1]:60519->[::1]:53: read: connection
              ;; refused
              ;;
              ;; 2. opening PBF file: open
              ;; ../vendor/github.com/omniscale/go-osm/parser/pbf/\
              ;; monaco-20150428.osm.pbf:
              ;; no such file or directory
              "-skip" "TestStateFromTimestamp|TestFromPBF")
      #:test-subdirs
      #~(list "../../...")  ;test the whole libary
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'remove-integration-tests
            ;; XXX: Some tests require network access and the whole suite
            ;; fails simultaneously, check if some tests may be enabled.
            ;;
            ;; [2025-11-25T09:56:15Z] 0:00:00 dial tcp [::1]:5432: connect:
            ;; connection refused
            (lambda* (#:key unpack-path #:allow-other-keys)
              (delete-file-recursively
               (string-append "src/" unpack-path "/test")))))))
    (native-inputs
     (list go-github-com-gogo-protobuf
           go-github-com-jmhodges-levigo
           go-github-com-lib-pq
           go-github-com-omniscale-go-osm
           go-github-com-pkg-errors
           go-gopkg-in-yaml-v2))
    (inputs
     (list geos leveldb))
     (list geos
           leveldb))
    (home-page "https://imposm.org/")
    (synopsis "OpenStreetMap importer for PostGIS")
    (description "Imposm is an importer for OpenStreetMap data.  It reads PBF
files and imports the data into PostgreSQL/PostGIS databases.  It is designed
to create databases that are optimized for rendering/tile/map-services.")
    (license (list
               license:asl2.0
               ;; Some dependencies in vendor have different licenses
               license:expat
               license:bsd-2
               license:bsd-3))))
    (description
     "Imposm is an importer for OpenStreetMap data.  It reads PBF files and
imports the data into PostgreSQL/PostGIS databases.  It is designed to create
databases that are optimized for rendering/tile/map-services.")
    (license (list license:asl2.0))))

(define-public python-metpy
  (package