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

open-orienteering-mapper: init at 0.8.1 #37326

Merged
merged 2 commits into from Mar 24, 2018

Conversation

mpickering
Copy link
Contributor

@mpickering mpickering commented Mar 18, 2018

Motivation for this change

Two new packages. I have only tested these on darwin.

This also depends on #35667 as otherwise some dependencies don't build.

I put this in the gis folder as it is related to qgis at least somewhat and if this doesn't get added there then nothing else ever will.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.


buildInputs = [ gdal qtbase qttools qtlocation qtsensors clipper zlib proj doxygen cups];

nativeBuildInputs = [ cmake makeWrapper ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you also add ninja?


nativeBuildInputs = [ cmake makeWrapper ];

enableParallelBuilding = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

CMake builds in parallel by default.


buildInputs = [ ];

nativeBuildInputs = [ cmake unzip ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Add ninja.

OpenOrienteering Mapper is an orienteering mapmaking program
and provides a free alternative to the existing proprietary solution.
'';
homepage = http://www.openorienteering.org/apps/mapper/;
Copy link
Contributor

Choose a reason for hiding this comment

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

Use https

sha256 = "1mqnmsb765970p9xfss6sf3ym0kmg8069qjlh5h5pjm3646bzphl";
};

cmakeFlags =
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just use a single list?

patches = [ ./license.patch ];

src = fetchurl {
url = "https://github.com/OpenOrienteering/mapper/archive/v${version}.tar.gz";
Copy link
Contributor

Choose a reason for hiding this comment

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

You should use fetchFromGitHub if you just want to download a tag.

enableParallelBuilding = true;

# Don't build the manual or bundle licenses
patches = [ ./license.patch ];
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use -DLICENSING_PROVIDER:BOOL=OFF OpenOrienteering/mapper#886 (comment)

["-DPROJ4_ROOT=${proj}"] ++
# FindGDAL is broken and always finds /Library/Framework unless this is
# specified
["-DGDAL_INCLUDE_DIR=${gdal}/include"] ++
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you make the darwin specific flags conditional?

@@ -16915,6 +16917,8 @@ with pkgs;

openjump = callPackage ../applications/misc/openjump { };

open-orienteering-mapper = libsForQt5.callPackage ../applications/gis/open-orienteering-mapper { };
Copy link
Contributor

Choose a reason for hiding this comment

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

The application is named OpenOrienteering Mapper so it should probably be named openorienteering-mapper as other distros do: https://repology.org/metapackage/openorienteering-mapper/versions

@mpickering
Copy link
Contributor Author

I made all of @jtojnar's suggested changes, thanks for the review. The patch turned out to not be necessary.

version = "6.4.2";
name = "Clipper-${version}";
src = fetchurl {
url = "https://download.sourceforge.net/project/polyclipping/clipper_ver${version}.zip";
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use sourceforge mirror: protocol.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean exactly? Replace https with mirror?

Copy link
Contributor

Choose a reason for hiding this comment

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

Something like mirror://sourceforge/polyclipping/clipper_ver${version}.zip

@mpickering
Copy link
Contributor Author

I change the clipper url.

@lheckemann
Copy link
Member

@GrahamcOfBorg build openorienteering-mapper

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: openorienteering-mapper

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: openorienteering-mapper

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: openorienteering-mapper

Partial log (click to expand)

--
-- fixup_bundle: done
-- Installing: /nix/store/7saa602795g6qxs8a57nblx6snbqyf11-OpenOrienteering-Mapper-0.8.1/Mapper.app/Contents/Resources/doc/3rd-party/qtsingleapplication.txt
-- Installing: /nix/store/7saa602795g6qxs8a57nblx6snbqyf11-OpenOrienteering-Mapper-0.8.1/Mapper.app/Contents/Resources/doc/common-licenses/GPL-3.txt
-- Installing: /nix/store/7saa602795g6qxs8a57nblx6snbqyf11-OpenOrienteering-Mapper-0.8.1/Mapper.app/Contents/Resources/doc/licensing.html
post-installation fixup
strip is /nix/store/vb6mgjqgd9h11nbv60fvrp1ls9nxck2y-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/7saa602795g6qxs8a57nblx6snbqyf11-OpenOrienteering-Mapper-0.8.1/bin
patching script interpreter paths in /nix/store/7saa602795g6qxs8a57nblx6snbqyf11-OpenOrienteering-Mapper-0.8.1
postPatchMkspecs

@thoughtpolice
Copy link
Member

LGTM, and Borg gave it the clear -- @jtojnar, if there's something else missed/you want changed, feel free to pin that on me and I'll fix it in a follow up.

@thoughtpolice thoughtpolice merged commit 1e0a60b into NixOS:master Mar 24, 2018
}:

stdenv.mkDerivation rec {
name = "OpenOrienteering-Mapper-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

@mpickering

13.2. Package naming:

The name attribute must not contain uppercase letters — e.g., "mplayer-1.0rc2" instead of "MPlayer-1.0rc2".

Copy link
Contributor

Choose a reason for hiding this comment

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

The rules are still evolving and I feel like this one is being phased out these days.

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

6 participants