Hello everyone!
I’m trying to update the curaengine
package: right now I see version 4.13 on nixpkgs and I’d like to build v5.4 The problem is that since the major bump CuraEngine is using conan as build tool and I have no idea how to handle that.
I’ve tried to simply run conan as stated in their docs, but I’ve got some errors and I also suspect it would be a better idea to use nix dependencies.
So I’m trying to work around conan with the following (inglorious) attempt:
{ stdenv
, callPackage
, fetchFromGitHub
, cmake
, zlib
, clipper
, boost
, rapidjson
, stb
, spdlog
, range-v3
, fmt
}:
let
standardprojectsettings = stdenv.mkDerivation {
name = "standardprojectsettings";
src = fetchFromGitHub {
owner = "Ultimaker";
repo = "conan-ultimaker-index";
rev = "1a97d7b0aaa19b492065ae0f893e076a49cd1eaa";
hash = "sha256-99sbG5a8EDeg2Rl1/VRrYVrBnKp2LhXQyzy/DF8IrPY=";
};
buildPhase = ''
mkdir -p $out/lib
cp -r $src/recipes/standardprojectsettings $out/lib
'';
};
in
stdenv.mkDerivation rec {
pname = "CuraEngine";
version = "5.4.0";
src = fetchFromGitHub {
owner = "Ultimaker";
repo = "CuraEngine";
rev = version;
hash = "sha256-1l3GXBEty/IFrXEhuSa/Due+Vn5OINstsqOI8T9Dnw0=";
};
libArcus = fetchFromGitHub {
owner = "Ultimaker";
repo = "libArcus";
rev = "5.3.0";
hash = "sha256-MZevvZFGBKwHeeCj1TjgagFGTOIzTMKlIESu8yyV/ow=";
};
scripta = fetchFromGitHub {
owner = "Ultimaker";
repo = "Scripta_public";
rev = "c378c837eeb505146ab67abe0904bfed2099128f";
hash = "sha256-KZOxm2VlmOjrNjgHtlphSPvKUbQCjg+OvyvFO7DVmP4=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
libArcus
zlib
clipper
boost
rapidjson
stb
spdlog
range-v3
scripta
standardprojectsettings
fmt
];
}
and now the build fails when it tries to find the standardprojectsettings package, because it’s pretty obvious that I have no idea of what I’m doing with both nix and cmake.
So my questions are:
- is my assumption right and I should avoid mixing
conan
with nix build or should I try to build the package following the documentation? - where can I find some help to understand better cmake and nix tools? do you have some articles/guides/docs or maybe a similar package I could study to understand better the context?
any help will be much appreciated