Merge pull request #269758 from CertainLach/prusa-slicer-2.7.0

This commit is contained in:
Maciej Krüger 2023-11-30 14:12:32 +01:00 committed by GitHub
commit bce155566a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 66 additions and 23 deletions

View File

@ -32,6 +32,9 @@
, tbb_2021_8
, wxGTK32
, xorg
, libbgcode
, heatshrink
, catch2
, fetchpatch
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
, wxGTK-override ? null
@ -68,7 +71,14 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "prusa-slicer";
version = "2.6.1";
version = "2.7.0";
src = fetchFromGitHub {
owner = "prusa3d";
repo = "PrusaSlicer";
hash = "sha256-S0z2v6knkQ+xlABB1zedEGtlxA/65X/vxLh304StfbE=";
rev = "version_${finalAttrs.version}";
};
nativeBuildInputs = [
cmake
@ -102,6 +112,9 @@ stdenv.mkDerivation (finalAttrs: {
tbb_2021_8
wxGTK-override'
xorg.libX11
libbgcode
heatshrink
catch2
] ++ lib.optionals withSystemd [
systemd
];
@ -143,21 +156,6 @@ stdenv.mkDerivation (finalAttrs: {
--replace "#ifdef __APPLE__" "#if 0"
'';
patches = [
# wxWidgets: CheckResizerFlags assert fix
(fetchpatch {
url = "https://github.com/prusa3d/PrusaSlicer/commit/24a5ebd65c9d25a0fd69a3716d079fd1b00eb15c.patch";
hash = "sha256-MNGtaI7THu6HEl9dMwcO1hkrCtIkscoNh4ulA2cKtZA=";
})
];
src = fetchFromGitHub {
owner = "prusa3d";
repo = "PrusaSlicer";
hash = "sha256-t5lnBL7SZVfyR680ZK29YXgE3pag+uVv4+BGJZq40/A=";
rev = "version_${finalAttrs.version}";
};
cmakeFlags = [
"-DSLIC3R_STATIC=0"
"-DSLIC3R_FHS=1"

View File

@ -0,0 +1,40 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, heatshrink
, zlib
, boost
, catch2
}:
stdenv.mkDerivation {
pname = "libbgcode";
version = "2023-11-16";
src = fetchFromGitHub {
owner = "prusa3d";
repo = "libbgcode";
rev = "bc390aab4427589a6402b4c7f65cf4d0a8f987ec";
hash = "sha256-TZShYeDAh+fNdmTr1Xqctji9f0vEGpNZv1ba/IY5EoY=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
heatshrink
zlib
boost
catch2
];
meta = with lib; {
homepage = "https://github.com/prusa3d/libbgcode";
description = "Prusa Block & Binary G-code reader / writer / converter";
license = licenses.agpl3Only;
maintainers = with maintainers; [ lach ];
};
}

View File

@ -1,6 +1,8 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, fetchpatch
}:
stdenv.mkDerivation rec {
@ -14,14 +16,17 @@ stdenv.mkDerivation rec {
hash = "sha256-Nm9/+JFMDXY1N90hmNFGh755V2sXSRQ4VBN9f8TcsGk=";
};
makeFlags = [ "PREFIX=$(out)" ];
patches = [
# Add CMake build script, wanted by prusa-slicer and libbgcode, which are the only users of this library.
(fetchpatch {
url = "https://github.com/atomicobject/heatshrink/commit/0886e9ca76552b8e325841e2b820b4563e5d5aba.patch";
hash = "sha256-13hy4+/RDaaKgQcdaSbACvMfElUIskvJ+owXqm40feY=";
})
];
preInstall = ''
mkdir -p $out/{bin,lib,include}
'';
doCheck = true;
checkTarget = "test";
nativeBuildInputs = [
cmake
];
doInstallCheck = true;
installCheckPhase = ''