Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkgmap: 4565 → 4600 #111182

Merged
merged 1 commit into from Jan 30, 2021
Merged

mkgmap: 4565 → 4600 #111182

merged 1 commit into from Jan 30, 2021

Conversation

sikmir
Copy link
Member

@sikmir sikmir commented Jan 29, 2021

Motivation for this change
  • Changelog
  • replace fetchsvn to fetchurl
  • add passthru.updateScript
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

inherit sha256;
url = "https://svn.mkgmap.org.uk/mkgmap/mkgmap/trunk";
rev = version;
src = fetchurl {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use fetchzip here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main difference between fetchurl and fetchzip is in how they store the contents. fetchurl will store the unaltered contents of the URL within the Nix store. fetchzip on the other hand will decompress the archive for you, making files and directories directly accessible in the future.

@SuperSandro2000 why? what is the main reason to choose fetchzip over fetchurl in general?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with fetchzip you do not need to manually uncrompress the files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With fetchurl you do not need to manually uncompress as well.
What I see is:

... This is primarily useful for dynamically generated archives, such as GitHub's /archive URLs, where the unpacked content of the zip file doesn't change, but the zip file itself may (e.g. due to minor changes in the compression algorithm, or changes in timestamps).

So fetchzip is kind of workaround for some cases, where fetchurl doesn't work properly due to mentioned above reasons.

inherit sha256;
url = "https://svn.mkgmap.org.uk/mkgmap/splitter/trunk";
rev = version;
src = fetchurl {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use fetchzip here.

pkgs/applications/misc/mkgmap/update.sh Outdated Show resolved Hide resolved
pkgs/applications/misc/mkgmap/update.sh Outdated Show resolved Hide resolved
@symphorien symphorien merged commit eae2b60 into NixOS:master Jan 30, 2021
@sikmir sikmir deleted the mkgmap branch January 30, 2021 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants