20 stdenv.mkDerivation (finalAttrs: {
24 src = fetchFromGitHub {
25 owner = "openstreetmap";
27 rev = finalAttrs.version;
28 hash = "sha256-+//cAoN8m66SboEYP5Dhtm0q0+oyvEr5o584e4JQ9xM=";
32 # Remove bundled libraries
36 nativeBuildInputs = [ cmake ];
38 buildInputs = [ expat fmt proj bzip2 zlib boost postgresql libosmium protozero rapidjson ]
39 ++ lib.optional withLuaJIT luajit
40 ++ lib.optional (!withLuaJIT) lua;
43 "-DEXTERNAL_LIBOSMIUM=ON"
44 "-DEXTERNAL_PROTOZERO=ON"
45 "-DEXTERNAL_RAPIDJSON=ON"
47 ] ++ lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON";
49 passthru.tests.version = testers.testVersion {
50 package = finalAttrs.finalPackage;
54 description = "OpenStreetMap data to PostgreSQL converter";
55 homepage = "https://osm2pgsql.org";
56 license = licenses.gpl2Plus;
57 platforms = platforms.unix;
58 maintainers = with maintainers; [ jglukasik das-g ];