NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.49k stars 13.68k forks source link

Request for a new nix package for openmesh: library for polygonal meshes #75158

Closed mtola closed 3 months ago

mtola commented 4 years ago

Request for a new nix package for openmesh : library for polygonal meshes

https://www.openmesh.org/ https://www.openmesh.org/media/Releases/8.0/OpenMesh-8.0.tar.gz

Thank you.


OpenMesh is a generic and efficient data structure for representing and manipulating polygonal meshes. OpenMesh is developed at the Computer Graphics Group, RWTH Aachen. It was funded by the German Ministry for Research and Education ( BMBF).

It was designed with the following goals in mind:

Flexibility : provide a basis for many different algorithms without the need for adaptation.
Efficiency : maximize time efficiency while keeping memory usage as low as possible.
Ease of use : wrap complex internal structure in an easy-to-use interface.
prusnak commented 4 years ago

I think it would help if you described why you need the library packaged. Do you plan to include any software that uses the library into the distribution?

mtola commented 4 years ago

Yes it will be feasible later. At the moment I would like to develop and launch continuous integration with Nix. I have 7/8 libraries and I need this last one under Nix to start. Note that this library is very stable, recognized in the domain of meshes, simpler than CGAL, small, without dependency... It is also on Mac with HomeBrew for example.

MostAwesomeDude commented 4 years ago

I don't want to maintain it, but this derivation will get you up off the ground:

{ stdenv, fetchurl, cmake }:
stdenv.mkDerivation rec {
  name = "openmesh-${version}";
  version = "8.0";

  src = fetchurl {
    url = "https://www.openmesh.org/media/Releases/${version}/OpenMesh-${version}.tar.gz";
    sha256 = "10pcaz85044kc8fng7fzr4rgsjr8db4vai8r2xxs7jna4r0d8x49";
  };

  buildInputs = [ cmake ];
}
mtola commented 4 years ago

Thanks a lot, I will look that maybe after summer and maybe I will propose to be the maintainer of this package, we will see ! Thanks

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

prusnak commented 3 years ago

@mtola Have you tried to package this?

mtola commented 3 years ago

No time for the moment.

But I will look that when I can...

https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/9.0/OpenMesh-9.0.tar.gz or https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/10.0/OpenMesh-10.0.0.tar.gz or https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/11.0/OpenMesh-11.0.0.tar.gz

yzx9 commented 3 months ago

Modified from @MostAwesomeDude's version to fit the URL for versions > 10.0:

{
  lib,
  stdenv,
  fetchurl,
  cmake,
  ...
}:

let
  version = "11.0.0";
  versionParts = builtins.splitVersion version;
  majorVersion = builtins.elemAt versionParts 0;
  minorVersion = builtins.elemAt versionParts 1;
  majorMinorVersion = "${majorVersion}.${minorVersion}";
in
stdenv.mkDerivation rec {
  pname = "openmesh";
  inherit version;

  src = fetchurl {
    url = "https://www.openmesh.org/media/Releases/${majorMinorVersion}/OpenMesh-${version}.tar.gz";
    sha256 = "sha256-x/NdKWc+bbttZbIUwQxMYklSGo8ej4226L3C7teYrtw=";
  };

  buildInputs = [ cmake ];
}

Hi @mtola, I saw your comment about the PR. If you have time now, that would be great. If not, I'd be happy to help and create the PR.

mtola commented 3 months ago

Hi @yzx9,

No time sorry, so you can do that.

Thanks !