Skip to content

Commit

Permalink
fix(super-slicer): patch sources to build
Browse files Browse the repository at this point in the history
  • Loading branch information
xokdvium committed Oct 17, 2024
1 parent 4cca6da commit 725aa1f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/home-manager/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ in
./zathura.nix
./gtkwave.nix
./chromium.nix
./super-slicer.nix
./super-slicer
./nekoray.nix
./hiddify-next.nix
];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/src/jpeg-compressor/jpge.cpp b/src/jpeg-compressor/jpge.cpp
index f2605ad..8641ed5 100644
--- a/src/jpeg-compressor/jpge.cpp
+++ b/src/jpeg-compressor/jpge.cpp
@@ -30,8 +30,9 @@

#include "jpge.h"

-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
+#include <cstdio>
//#include <malloc.h> // not needed, even create bugs in macos

#define JPGE_MAX(a,b) (((a)>(b))?(a):(b))
@@ -934,7 +935,6 @@ namespace jpge {
}

// Higher level wrappers/examples (optional).
-#include <stdio.h>

class cfile_stream : public output_stream
{
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ in
in
{
home.packages = lib.mkIf cfg.enable (
# deadnix: skip
with pkgs;
[
# TODO: Fix build failure
# super-slicer-latest
(super-slicer-latest.overrideAttrs (prev: {
patches = prev.patches ++ [
./0001-fix-broken-include.patch
];
}))
]
);
xokdvium.home.persistence = {
Expand Down

0 comments on commit 725aa1f

Please sign in to comment.