tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
structure-synth: init at v1.5
Chris Hodapp
7 years ago
ec73f89a
c51ac5eb
+99
3 changed files
expand all
collapse all
unified
split
pkgs
tools
graphics
structure-synth
default.nix
gcc47.patch
top-level
all-packages.nix
+47
pkgs/tools/graphics/structure-synth/default.nix
···
1
1
+
{ stdenv, fetchurl, qt4, qmake4Hook, unzip, mesa_glu, makeWrapper }:
2
2
+
3
3
+
stdenv.mkDerivation rec {
4
4
+
5
5
+
name = "structure-synth-${version}";
6
6
+
version = "v1.5";
7
7
+
8
8
+
src = fetchurl {
9
9
+
url = mirror://sourceforge/structuresynth/StructureSynth-Source-v1.5.0.zip;
10
10
+
sha256 = "1kiammx46719az6jzrav8yrwz82nk4m72ybj0kpbnvp9wfl3swbb";
11
11
+
};
12
12
+
13
13
+
buildInputs = [ qt4 unzip mesa_glu makeWrapper ];
14
14
+
nativeBuildInputs = [ qmake4Hook ];
15
15
+
16
16
+
# Thanks to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672000#15:
17
17
+
patches = [ ./gcc47.patch ];
18
18
+
19
19
+
enableParallelBuilding = true;
20
20
+
21
21
+
preConfigure = ''
22
22
+
${qt4}/bin/qmake -project -after "CONFIG+=opengl" -after "QT+=xml opengl script" -after "unix:LIBS+=-lGLU"
23
23
+
'';
24
24
+
25
25
+
installPhase = ''
26
26
+
mkdir -p $out/bin;
27
27
+
mkdir -p $out/share/Examples $out/share/Misc;
28
28
+
cp "Structure Synth Source Code" $out/bin/structure-synth;
29
29
+
cp -r Examples/* $out/share/Examples;
30
30
+
cp -r Misc/* $out/share/Misc;
31
31
+
'';
32
32
+
33
33
+
# Structure Synth expects to see 'Examples' and 'Misc' directory in
34
34
+
# either $HOME or $PWD - so help it along by moving $PWD to 'share',
35
35
+
# where we just copied those two directories:
36
36
+
preFixup = ''
37
37
+
wrapProgram "$out/bin/structure-synth" --run "cd $out/share"
38
38
+
'';
39
39
+
40
40
+
meta = with stdenv.lib; {
41
41
+
description = "Application for generating 3D structures by specifying a design grammar";
42
42
+
homepage = http://structuresynth.sourceforge.net;
43
43
+
maintainers = with maintainers; [ hodapp ];
44
44
+
license = licenses.gpl3;
45
45
+
platforms = platforms.linux;
46
46
+
};
47
47
+
}
+50
pkgs/tools/graphics/structure-synth/gcc47.patch
···
1
1
+
diff -rc "Structure Synth Source Code/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp" "Structure Synth Source Code2/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp"
2
2
+
*** "Structure Synth Source Code/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp" 2010-11-13 22:32:44.000000000 -0500
3
3
+
--- "Structure Synth Source Code2/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp" 2018-06-24 14:23:30.794296776 -0400
4
4
+
***************
5
5
+
*** 1,5 ****
6
6
+
#include <QThread>
7
7
+
!
8
8
+
9
9
+
#include "RayTracer.h"
10
10
+
11
11
+
--- 1,5 ----
12
12
+
#include <QThread>
13
13
+
! #include <GL/glu.h>
14
14
+
15
15
+
#include "RayTracer.h"
16
16
+
17
17
+
diff -rc "Structure Synth Source Code/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp" "Structure Synth Source Code2/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp"
18
18
+
*** "Structure Synth Source Code/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp" 2010-09-08 21:25:30.000000000 -0400
19
19
+
--- "Structure Synth Source Code2/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp" 2018-06-24 14:23:12.542868194 -0400
20
20
+
***************
21
21
+
*** 122,128 ****
22
22
+
currentT = p;
23
23
+
24
24
+
// We do not intersect grid.
25
25
+
! if (!found) return false;
26
26
+
}
27
27
+
28
28
+
stepX = (dir.x() > 0) ? 1 : -1;
29
29
+
--- 122,128 ----
30
30
+
currentT = p;
31
31
+
32
32
+
// We do not intersect grid.
33
33
+
! if (!found) return NULL;
34
34
+
}
35
35
+
36
36
+
stepX = (dir.x() > 0) ? 1 : -1;
37
37
+
Only in Structure Synth Source Code2/SyntopiaCore/GLEngine/Raytracer: VoxelStepper.cpp.orig
38
38
+
diff -rc "Structure Synth Source Code/SyntopiaCore/GLEngine/Sphere.h" "Structure Synth Source Code2/SyntopiaCore/GLEngine/Sphere.h"
39
39
+
*** "Structure Synth Source Code/SyntopiaCore/GLEngine/Sphere.h" 2010-08-11 15:12:22.000000000 -0400
40
40
+
--- "Structure Synth Source Code2/SyntopiaCore/GLEngine/Sphere.h" 2018-06-24 14:23:30.793296807 -0400
41
41
+
***************
42
42
+
*** 2,7 ****
43
43
+
--- 2,8 ----
44
44
+
45
45
+
#include "SyntopiaCore/Math/Vector3.h"
46
46
+
#include "Object3D.h"
47
47
+
+ #include <GL/glu.h>
48
48
+
49
49
+
namespace SyntopiaCore {
50
50
+
namespace GLEngine {
+2
pkgs/top-level/all-packages.nix
···
5129
5129
5130
5130
sstp = callPackage ../tools/networking/sstp {};
5131
5131
5132
5132
+
structure-synth = callPackage ../tools/graphics/structure-synth { };
5133
5133
+
5132
5134
su-exec = callPackage ../tools/security/su-exec {};
5133
5135
5134
5136
subsurface = libsForQt5.callPackage ../applications/misc/subsurface { };