Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2020
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. { postgresql, pkgs }:
  2.  
  3. let sources = import ../nix/sources.nix;
  4. in with pkgs;
  5.  
  6. stdenv.mkDerivation rec {
  7. name = "mapnik-german-l10n";
  8.  
  9. # we needed Nominatim sources to get country_osm_grid.sql
  10. mapnikSrc = sources.mapnik-german-l10n;
  11. nominatimSrc = sources.Nominatim;
  12.  
  13. srcs = [ mapnikSrc nominatimSrc ];
  14.  
  15. # we need to override default unpack cmd
  16. unpackCmd = ''
  17. mkdir -p ./all
  18. if [[ $curSrc == ${mapnikSrc} ]]; then
  19. cp -r $curSrc ./all/mapnik
  20. else
  21. cp -r $curSrc ./all/nominatim
  22. fi
  23. '';
  24.  
  25. # based on mapnik-german-l10n/debian/control
  26. buildInputs = [ icu curl kakasi utf8proc pandoc postgresql ];
  27.  
  28. configurePhase = "true";
  29.  
  30. # script expects country_grid.sql to be named country_osm_grid.sql
  31. buildPhase = ''
  32. cp nominatim/data-sources/country-grid/country_grid.sql mapnik/country_osm_grid.sql
  33. patchShebangs mapnik/gen_osml10n_extension.sh
  34. patchShebangs mapnik/gen_osml10n_thai_extension.sh
  35. cd mapnik
  36. make
  37. '';
  38. installPhase = ''
  39. make DESTDIR=$out EXTDIR= install
  40. cp $out/extension/* ${postgresql}/share/postgresql/extension
  41. '';
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement