1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 cmake,
7 qtbase,
8 wrapQtAppsHook,
9 libGL,
10 libGLU,
11}:
12
13stdenv.mkDerivation (finalAttrs: {
14 pname = "structuresynth";
15 version = "1.5.1";
16
17 src = fetchFromGitHub {
18 owner = "alemuntoni";
19 repo = "structuresynth";
20 rev = finalAttrs.version;
21 hash = "sha256-uFz4WPwA586B/5p+DUJ/W8KzbHLBhLIwP6mySZJ1vPY=";
22 };
23
24 patches = [
25 # This PR in 2 commits allow packaging of this project as standalone.
26 # It was merged upstream, so those 2 patches can be removed on next release.
27 (fetchpatch {
28 name = "shared-lib.patch";
29 url = "https://github.com/alemuntoni/StructureSynth/pull/1/commits/fdb87c55a03c6a0faa4335de5d29f0fb547b6102.patch";
30 hash = "sha256-/66x8HGyNhGwoxsbV+QIRFYQNuFSHYXNYkJzAn4jyJI=";
31 })
32 (fetchpatch {
33 name = "install-project.patch";
34 url = "https://github.com/alemuntoni/StructureSynth/pull/1/commits/f96a90f6a4c60e9e0316edd20ea77674a2b764a7.patch";
35 hash = "sha256-cSZAL1N2/Gd0x+9UkTUQxqVlb2m2MM8AA1Zzlo6S35w=";
36 })
37 ];
38
39 outputs = [
40 "dev"
41 "out"
42 ];
43
44 buildInputs = [
45 libGL
46 libGLU
47 qtbase
48 ];
49
50 nativeBuildInputs = [
51 cmake
52 wrapQtAppsHook
53 ];
54
55 meta = with lib; {
56 description = "Generate 3D structures by specifying a design grammar";
57 homepage = "https://github.com/alemuntoni/StructureSynth";
58 license = licenses.lgpl21;
59 maintainers = with maintainers; [ nim65s ];
60 };
61})