proj-data: add proj-data package and integration support#290643
proj-data: add proj-data package and integration support#290643imincik wants to merge 1 commit intoNixOS:masterfrom
Conversation
7083125 to
d088c57
Compare
d088c57 to
6af0a2a
Compare
6af0a2a to
74783d8
Compare
| proj = finalAttrs.finalPackage; | ||
| in | ||
| { | ||
| withProjData = gridPackages: |
| proj.overrideAttrs (final: prev: { | ||
| pname = prev.pname + "-with-grid-packages"; | ||
| postInstall = '' | ||
| cp --recursive ${proj-data}/* $out/share/proj/ |
There was a problem hiding this comment.
Rather than copying the data across, would it be possible to instead install proj-data and link to it from this package? That way there's only one way to install proj-data (and only ever one copy of each version), but proj can refer to that package.
There was a problem hiding this comment.
Unfortunately, this is not possible because $out/share/proj/ already contains data installed by proj. Otherwise I would do a symlink.
|
|
||
| shopt -u extglob | ||
| runHook postInstall | ||
| ''; |
There was a problem hiding this comment.
Would you mind running this through shellcheck --shell=bash -? It does have a handful of issues. Ditto for the other shell scripts.
|
Can 4c88316 be reverted once this is merged? |
No, I don't think so. You have to explicitly enable required proj-data grids using |
Description of changes
add
proj-datapackage toprojadd optional support for installing
proj-datagrid files toprojusingwithProjDatapassthru functionImplementation notes
AFAIK, installation of
proj-dataresource files inshare/projdirectory is the only user-friendly way of enabling them for all programs usingproj. Another alternative methods are:PROJ_DATAvariable to${proj}/share/proj:${proj-data}which can be very tricky for other applications using
projin containers or multi-user environments and can be error-prone.For more information, see: https://proj.org/en/9.3/resource_files.html
Installation of
proj-datafiles toprojis optional, becauseproj-datarepository size is large (can reach 1GB of size soon) andproj-datasupport is not always needed.Example usage
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.