diff mbox series

[bug#52548] gnu: Add osmium-tool.

Message ID dda63a981796b42803ede5f7ad25b799baec11d6.1639655626.git.sikmir@gmail.com
State Accepted
Headers show
Series [bug#52548] gnu: Add osmium-tool. | expand

Commit Message

Nikolay Korotkiy Dec. 16, 2021, 11:53 a.m. UTC
* gnu/packages/geo.scm (osmium-tool): New variable.
---
 gnu/packages/geo.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

Julien Lepiller Dec. 16, 2021, 10:49 p.m. UTC | #1
Thanks for the patch! It looks good to me, but I wonder if we could
unbundle rapidjson and msinttypes? rapidjson is already a guix package,
and I'm not sure where msinttypes is used exactly.

Le Thu, 16 Dec 2021 14:53:46 +0300,
Nikolay Korotkiy <sikmir@gmail.com> a écrit :

> * gnu/packages/geo.scm (osmium-tool): New variable.
> ---
>  gnu/packages/geo.scm | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
> index cb5f4cbc64..63569a3bcf 100644
> --- a/gnu/packages/geo.scm
> +++ b/gnu/packages/geo.scm
> @@ -82,6 +82,7 @@ (define-module (gnu packages geo)
>    #:use-module (gnu packages graphics)
>    #:use-module (gnu packages gtk)
>    #:use-module (gnu packages haskell-apps)
> +  #:use-module (gnu packages haskell-xyz)
>    #:use-module (gnu packages image)
>    #:use-module (gnu packages image-processing)
>    #:use-module (gnu packages icu4c)
> @@ -1198,6 +1199,35 @@ (define-public libosmium
>  OpenStreetMap data.")
>      (license license:boost1.0)))
>  
> +(define-public osmium-tool
> +  (package
> +    (name "osmium-tool")
> +    (version "1.13.2")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/osmcode/osmium-tool")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32
> "0brifazzwnd4qx234z049wh4ii0a7jy79n8jc2f3ry6jcrijddkl"))))
> +    (build-system cmake-build-system)
> +    (inputs
> +     (list libosmium))
> +    (native-inputs
> +     (list pandoc))
> +    (home-page "https://osmcode.org/osmium-tool/")
> +    (synopsis "Osmium Command Line Tool")
> +    (description "Command line tool for working with OpenStreetMap
> data +based on the Osmium library")
> +    (license (list
> +               license:gpl3+
> +               ;; rapidjson
> +               license:expat
> +               ;; msinttypes
> +               license:bsd-3))))
> +
>  (define-public osm2pgsql
>    (package
>      (name "osm2pgsql")
Nikolay Korotkiy Dec. 16, 2021, 11:03 p.m. UTC | #2
RapidJSON is header-only library, so it doesn't make much sense to 
unbundle it, since upstream authors decided to vendor it. And such 
unbundling could complicate maintenance and package expression for no 
reason. The same story about msinttypes, RapidJSON vendors msinttypes.

Julien Lepiller kirjoitti 17.12.2021 klo 1.49:
> Thanks for the patch! It looks good to me, but I wonder if we could
> unbundle rapidjson and msinttypes? rapidjson is already a guix package,
> and I'm not sure where msinttypes is used exactly.
> 
> Le Thu, 16 Dec 2021 14:53:46 +0300,
> Nikolay Korotkiy <sikmir@gmail.com> a écrit :
> 
>> * gnu/packages/geo.scm (osmium-tool): New variable.
>> ---
>>   gnu/packages/geo.scm | 30 ++++++++++++++++++++++++++++++
>>   1 file changed, 30 insertions(+)
>>
>> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
>> index cb5f4cbc64..63569a3bcf 100644
>> --- a/gnu/packages/geo.scm
>> +++ b/gnu/packages/geo.scm
>> @@ -82,6 +82,7 @@ (define-module (gnu packages geo)
>>     #:use-module (gnu packages graphics)
>>     #:use-module (gnu packages gtk)
>>     #:use-module (gnu packages haskell-apps)
>> +  #:use-module (gnu packages haskell-xyz)
>>     #:use-module (gnu packages image)
>>     #:use-module (gnu packages image-processing)
>>     #:use-module (gnu packages icu4c)
>> @@ -1198,6 +1199,35 @@ (define-public libosmium
>>   OpenStreetMap data.")
>>       (license license:boost1.0)))
>>   
>> +(define-public osmium-tool
>> +  (package
>> +    (name "osmium-tool")
>> +    (version "1.13.2")
>> +    (source
>> +     (origin
>> +       (method git-fetch)
>> +       (uri (git-reference
>> +             (url "https://github.com/osmcode/osmium-tool")
>> +             (commit (string-append "v" version))))
>> +       (file-name (git-file-name name version))
>> +       (sha256
>> +        (base32
>> "0brifazzwnd4qx234z049wh4ii0a7jy79n8jc2f3ry6jcrijddkl"))))
>> +    (build-system cmake-build-system)
>> +    (inputs
>> +     (list libosmium))
>> +    (native-inputs
>> +     (list pandoc))
>> +    (home-page "https://osmcode.org/osmium-tool/")
>> +    (synopsis "Osmium Command Line Tool")
>> +    (description "Command line tool for working with OpenStreetMap
>> data +based on the Osmium library")
>> +    (license (list
>> +               license:gpl3+
>> +               ;; rapidjson
>> +               license:expat
>> +               ;; msinttypes
>> +               license:bsd-3))))
>> +
>>   (define-public osm2pgsql
>>     (package
>>       (name "osm2pgsql")
>
Ludovic Courtès Jan. 5, 2022, 10:36 p.m. UTC | #3
Hi,

Nikolay Korotkiy <sikmir@gmail.com> skribis:

> RapidJSON is header-only library, so it doesn't make much sense to
> unbundle it,

You’re right that it’s different from the situation of .so files.
However, unbundling still clarifies the dependency graph by making code
reuse visible, and it allows us to make sure a security update in
RapidJSON propagates to all its users, should that happen.

> since upstream authors decided to vendor it. And such unbundling could
> complicate maintenance and package expression for no reason. The same
> story about msinttypes, RapidJSON vendors msinttypes.

Yeah it could complicate things, but in some cases it’s a no-brainer.
Could you give it a try and see whether there are any roadblocks?

Thanks in advance,
Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index cb5f4cbc64..63569a3bcf 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -82,6 +82,7 @@  (define-module (gnu packages geo)
   #:use-module (gnu packages graphics)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages haskell-apps)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages image)
   #:use-module (gnu packages image-processing)
   #:use-module (gnu packages icu4c)
@@ -1198,6 +1199,35 @@  (define-public libosmium
 OpenStreetMap data.")
     (license license:boost1.0)))
 
+(define-public osmium-tool
+  (package
+    (name "osmium-tool")
+    (version "1.13.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/osmcode/osmium-tool")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0brifazzwnd4qx234z049wh4ii0a7jy79n8jc2f3ry6jcrijddkl"))))
+    (build-system cmake-build-system)
+    (inputs
+     (list libosmium))
+    (native-inputs
+     (list pandoc))
+    (home-page "https://osmcode.org/osmium-tool/")
+    (synopsis "Osmium Command Line Tool")
+    (description "Command line tool for working with OpenStreetMap data
+based on the Osmium library")
+    (license (list
+               license:gpl3+
+               ;; rapidjson
+               license:expat
+               ;; msinttypes
+               license:bsd-3))))
+
 (define-public osm2pgsql
   (package
     (name "osm2pgsql")