summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/st/structuresynth/package.nix
blob: 5917c568fa04bd162d54aa46928ec2c0ab7e3328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  cmake,
  libsForQt5,
  libGL,
  libGLU,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "structuresynth";
  version = "1.5.1";

  src = fetchFromGitHub {
    owner = "alemuntoni";
    repo = "structuresynth";
    tag = finalAttrs.version;
    hash = "sha256-uFz4WPwA586B/5p+DUJ/W8KzbHLBhLIwP6mySZJ1vPY=";
  };

  patches = [
    # This PR in 2 commits allow packaging of this project as standalone.
    # It was merged upstream, so those 2 patches can be removed on next release.
    (fetchpatch {
      name = "shared-lib.patch";
      url = "https://github.com/alemuntoni/StructureSynth/pull/1/commits/fdb87c55a03c6a0faa4335de5d29f0fb547b6102.patch";
      hash = "sha256-/66x8HGyNhGwoxsbV+QIRFYQNuFSHYXNYkJzAn4jyJI=";
    })
    (fetchpatch {
      name = "install-project.patch";
      url = "https://github.com/alemuntoni/StructureSynth/pull/1/commits/f96a90f6a4c60e9e0316edd20ea77674a2b764a7.patch";
      hash = "sha256-cSZAL1N2/Gd0x+9UkTUQxqVlb2m2MM8AA1Zzlo6S35w=";
    })
  ];

  outputs = [
    "dev"
    "out"
  ];

  buildInputs = [
    libGL
    libGLU
    libsForQt5.qtbase
  ];

  nativeBuildInputs = [
    cmake
    libsForQt5.wrapQtAppsHook
  ];

  meta = {
    description = "Generate 3D structures by specifying a design grammar";
    homepage = "https://github.com/alemuntoni/StructureSynth";
    license = lib.licenses.lgpl21;
    maintainers = with lib.maintainers; [ nim65s ];
  };
})