Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { postgresql, pkgs }:
- let sources = import ../nix/sources.nix;
- in with pkgs;
- stdenv.mkDerivation rec {
- name = "mapnik-german-l10n";
- # we needed Nominatim sources to get country_osm_grid.sql
- mapnikSrc = sources.mapnik-german-l10n;
- nominatimSrc = sources.Nominatim;
- srcs = [ mapnikSrc nominatimSrc ];
- # we need to override default unpack cmd
- unpackCmd = ''
- mkdir -p ./all
- if [[ $curSrc == ${mapnikSrc} ]]; then
- cp -r $curSrc ./all/mapnik
- else
- cp -r $curSrc ./all/nominatim
- fi
- '';
- # based on mapnik-german-l10n/debian/control
- buildInputs = [ icu curl kakasi utf8proc pandoc postgresql ];
- configurePhase = "true";
- # script expects country_grid.sql to be named country_osm_grid.sql
- buildPhase = ''
- cp nominatim/data-sources/country-grid/country_grid.sql mapnik/country_osm_grid.sql
- patchShebangs mapnik/gen_osml10n_extension.sh
- patchShebangs mapnik/gen_osml10n_thai_extension.sh
- cd mapnik
- make
- '';
- installPhase = ''
- make DESTDIR=$out EXTDIR= install
- cp $out/extension/* ${postgresql}/share/postgresql/extension
- '';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement