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

pure-maps: init at 2.6.0 #107836

Merged
merged 5 commits into from Mar 3, 2021
Merged

pure-maps: init at 2.6.0 #107836

merged 5 commits into from Mar 3, 2021

Conversation

Thra11
Copy link
Member

@Thra11 Thra11 commented Dec 28, 2020

Motivation for this change

Pure maps is a great navigation application. While it's main focus is mobile devices (I intend to use it on NixOS Mobile), it works pretty well on the desktop too.

Pure maps has multiple GUI 'flavours', Kirigami, QtControls, Sailfish, & Ubuntu Touch: I have just packaged the kirigami version for the sake of simplicity, but we can always add a flag to choose the flavour later if there's interest.

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.

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

I added some new lines to some packages. It would be nice if you could add them to all to make the packages clearer.

pkgs/applications/misc/pure-maps/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/pure-maps/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/pure-maps/default.nix Show resolved Hide resolved
repo = "pure-maps";
rev = version;
sha256 = "0xcrjzxnm3zx12ffb8yy87qa6iqga2h6ca6gi05q9xp5p6zg16j0";
fetchSubmodules = true;
Copy link
Member

Choose a reason for hiding this comment

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

if we propagate gpxpy do we need to fetch the submodules?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's at least one other submodule, geomag, which is still required. In theory we could try to de-vendor them all, but I'm not sure it's trivial (for example, in one place, geomag is imported as poor.geomag, rather than as an external module).

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 it would make sense to devendor gpxpy as it is already part of nixpkgs.

pkgs/development/libraries/s2geometry/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/s2geometry/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 107836 run on x86_64-linux 1

5 packages built:
  • mapbox-gl-native
  • mapbox-gl-qml
  • nemo-qml-plugin-dbus
  • pure-maps
  • s2geometry

@Thra11 Thra11 force-pushed the pure-maps branch 4 times, most recently from bbbeb51 to c94bbb3 Compare December 29, 2020 12:32
@Thra11 Thra11 mentioned this pull request Jan 3, 2021
10 tasks
@Thra11 Thra11 force-pushed the pure-maps branch 2 times, most recently from 3900117 to b62bd8d Compare January 6, 2021 18:45
pkgs/development/libraries/mapbox-gl-native/default.nix Outdated Show resolved Hide resolved
nativeBuildInputs = [ qmake ];
buildInputs = [ qtlocation mapbox-gl-native ];
NIX_CFLAGS_COMPILE = "-I${mapbox-gl-native}/include/qt5";
postUnpack = ''
Copy link
Member

Choose a reason for hiding this comment

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

And this.

pkgs/development/libraries/s2geometry/default.nix Outdated Show resolved Hide resolved
@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 107836 run on x86_64-linux 1

3 packages failed to build and are new build failures:
2 packages built:
  • nemo-qml-plugin-dbus
  • s2geometry

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 107836 run on x86_64-linux 1

5 packages built:
  • mapbox-gl-native
  • mapbox-gl-qml
  • nemo-qml-plugin-dbus
  • pure-maps
  • s2geometry

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/470

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Please fix the merge conflict and rename postUnpack to postPatch to not break patches.

@Thra11 Thra11 changed the title pure-maps: init at 2.2.0 pure-maps: init at 2.6.0 Feb 23, 2021
@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 107836 run on x86_64-linux 1

5 packages built:
  • mapbox-gl-native
  • mapbox-gl-qml
  • nemo-qml-plugin-dbus
  • pure-maps
  • s2geometry

@Thra11
Copy link
Member Author

Thra11 commented Feb 28, 2021

/marvin opt-in
/status needs_reviewer

@marvin-mk2
Copy link

marvin-mk2 bot commented Feb 28, 2021

Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here.

Copy link
Contributor

@bennyandresen bennyandresen left a comment

Choose a reason for hiding this comment

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

Based on most on most of the comments and building the package myself and the iterations it already went through, this LGTM.

/status needs_merger

@marvin-mk2 marvin-mk2 bot requested a review from kevincox February 28, 2021 17:13
@SuperSandro2000 SuperSandro2000 merged commit e0e4484 into NixOS:master Mar 3, 2021
@dotlambda
Copy link
Member

This doesn't work for me:

"PyOtherSide error: Traceback (most recent call last):\n\n  File \"/nix/store/l3ivd5jwgvvnphbcqbgv4m3qxy4s6mqb-pure-maps-2.6.0/share/pure-maps/poor/__init__.py\", line 42, in <module>\n    from poor import util\n\n  File \"/nix/store/l3ivd5jwgvvnphbcqbgv4m3qxy4s6mqb-pure-maps-2.6.0/share/pure-maps/poor/util.py\", line 24, in <module>\n    import gpxpy.parser\n\nModuleNotFoundError: No module named 'gpxpy'\n"
qml: Error: Cannot import module: poor (Traceback (most recent call last):

  File "/nix/store/l3ivd5jwgvvnphbcqbgv4m3qxy4s6mqb-pure-maps-2.6.0/share/pure-maps/poor/__init__.py", line 42, in <module>
    from poor import util

  File "/nix/store/l3ivd5jwgvvnphbcqbgv4m3qxy4s6mqb-pure-maps-2.6.0/share/pure-maps/poor/util.py", line 24, in <module>
    import gpxpy.parser

ModuleNotFoundError: No module named 'gpxpy'
)
"PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nNameError: name 'poor' is not defined\n"
qml: Error: Function not found: 'poor.main' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'poor' is not defined
)
"PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nNameError: name 'poor' is not defined\n"
qml: Error: Function not found: 'poor.conf.get_all' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'poor' is not defined
)
file:///nix/store/l3ivd5jwgvvnphbcqbgv4m3qxy4s6mqb-pure-maps-2.6.0/share/pure-maps/qml/Config.qml:171: TypeError: Cannot read property 'auto_complete_geo' of undefined
"PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nNameError: name 'poor' is not defined\n"
qml: Error: Function not found: 'poor.conf.get_all' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'poor' is not defined
)

@Thra11
Copy link
Member Author

Thra11 commented Mar 13, 2021

Thanks for reporting! Looks like it works in nix-shell, but not when installed on the system. Think the problem is that propagatedBuildInputs works for python dependencies if you're doing python development in a shell, but they need to be added to the wrapper for an application like pure-maps. I've created a new PR which should fix the issue: #116209.

@PureTryOut
Copy link

@Thra11 I noticed Repology said mapbox-gl-native was of a higher version in NixOS than in Alpine Linux (where I maintain it) and I was wondering why since I was pretty sure I packaged the latest version (1.6.0). It seems NixOS packages some random commit and defines it's own version of the package?
Why do you guys do this? Why not just take 1.6.0? It works fine with Pure-maps, you just need some patches. Patch number 1 and 3 we use in Alpine are being upstreamed as well.

@dotlambda
Copy link
Member

@PureTryOut Thanks for reaching out! I will change our version. Would you mind explaining what the reason for your third patch is?

@dotlambda
Copy link
Member

See #117052.

@PureTryOut
Copy link

I don't fully know out of the top of my head, I believe I had a compilation error that was fixed with it. You'll have to ask @rinigus why it's necessary.

@rinigus
Copy link

rinigus commented Mar 21, 2021

Re patch3: it was needed for some compilers. Cannot tell which exactly, as there are few platforms that I keep updated and I don't remember which one required it.

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

7 participants