solvespace: refactor at version 3.0
(#159758) * fix version ("v3.0" is not valid for nix) * add dependencies pkg-config is looking for * build with OpenMP support as per upstream doc * remove obsolete patching on solvespace.desktop * update meta.homepage to avoid a permanent redirect * add meta.changelog Co-authored-by: Renaud <c0bw3b@users.noreply.github.com>
This commit is contained in:
parent
fc4d500e54
commit
608927f7a9
|
@ -1,27 +1,77 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, zlib, libpng, cairo, freetype
|
{ lib
|
||||||
, json_c, fontconfig, gtkmm3, pangomm, glew, libGLU, xorg, pcre, wrapGAppsHook
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, pkg-config
|
||||||
|
, wrapGAppsHook
|
||||||
|
, at-spi2-core
|
||||||
|
, cairo
|
||||||
|
, dbus
|
||||||
|
, freetype
|
||||||
|
, fontconfig
|
||||||
|
, glew
|
||||||
|
, gtkmm3
|
||||||
|
, json_c
|
||||||
|
, libdatrie
|
||||||
|
, libepoxy
|
||||||
|
, libGLU
|
||||||
|
, libpng
|
||||||
|
, libselinux
|
||||||
|
, libsepol
|
||||||
|
, libthai
|
||||||
|
, libxkbcommon
|
||||||
|
, pangomm
|
||||||
|
, pcre
|
||||||
|
, util-linuxMinimal # provides libmount
|
||||||
|
, xorg
|
||||||
|
, zlib
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "solvespace";
|
pname = "solvespace";
|
||||||
version = "v3.0";
|
version = "3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = pname;
|
owner = pname;
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = "v${version}";
|
||||||
sha256 = "04aympdsjp37vp0p13mb8nwkc080hp9cdrjpyy5m1mhwkm8jm9k9";
|
hash = "sha256-aaYqUZ0c1lCL91fmxtKFAAE2uUWrjnDB3WdcqdutXhE=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config cmake wrapGAppsHook
|
cmake
|
||||||
];
|
pkg-config
|
||||||
buildInputs = [
|
wrapGAppsHook
|
||||||
zlib libpng cairo freetype
|
|
||||||
json_c fontconfig gtkmm3 pangomm glew libGLU
|
|
||||||
xorg.libpthreadstubs xorg.libXdmcp pcre
|
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
buildInputs = [
|
||||||
|
at-spi2-core
|
||||||
|
cairo
|
||||||
|
dbus
|
||||||
|
freetype
|
||||||
|
fontconfig
|
||||||
|
glew
|
||||||
|
gtkmm3
|
||||||
|
json_c
|
||||||
|
libdatrie
|
||||||
|
libepoxy
|
||||||
|
libGLU
|
||||||
|
libpng
|
||||||
|
libselinux
|
||||||
|
libsepol
|
||||||
|
libthai
|
||||||
|
libxkbcommon
|
||||||
|
pangomm
|
||||||
|
pcre
|
||||||
|
util-linuxMinimal
|
||||||
|
xorg.libpthreadstubs
|
||||||
|
xorg.libXdmcp
|
||||||
|
xorg.libXtst
|
||||||
|
zlib
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
patch CMakeLists.txt <<EOF
|
patch CMakeLists.txt <<EOF
|
||||||
@@ -20,9 +20,9 @@
|
@@ -20,9 +20,9 @@
|
||||||
# NOTE TO PACKAGERS: The embedded git commit hash is critical for rapid bug triage when the builds
|
# NOTE TO PACKAGERS: The embedded git commit hash is critical for rapid bug triage when the builds
|
||||||
|
@ -35,16 +85,14 @@ stdenv.mkDerivation rec {
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
cmakeFlags = [ "-DENABLE_OPENMP=ON" ];
|
||||||
substituteInPlace $out/share/applications/solvespace.desktop \
|
|
||||||
--replace /usr/bin/ $out/bin/
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A parametric 3d CAD program";
|
description = "A parametric 3d CAD program";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
maintainers = [ maintainers.edef ];
|
maintainers = [ maintainers.edef ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
homepage = "http://solvespace.com";
|
homepage = "https://solvespace.com";
|
||||||
|
changelog = "https://github.com/solvespace/solvespace/raw/v${version}/CHANGELOG.md";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue