2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, qt4, qmake4Hook, unzip, libGLU, makeWrapper }:
|
2018-06-24 16:12:12 +02:00
|
|
|
|
2022-02-28 12:35:10 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "structure-synth";
|
2022-02-28 12:35:10 +01:00
|
|
|
version = "1.5.0";
|
2018-06-24 16:12:12 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-02-28 12:35:10 +01:00
|
|
|
url = "mirror://sourceforge/structuresynth/StructureSynth-Source-v${version}.zip";
|
2018-06-24 16:12:12 +02:00
|
|
|
sha256 = "1kiammx46719az6jzrav8yrwz82nk4m72ybj0kpbnvp9wfl3swbb";
|
|
|
|
};
|
|
|
|
|
2021-02-20 22:01:53 +01:00
|
|
|
buildInputs = [ qt4 libGLU ];
|
|
|
|
nativeBuildInputs = [ qmake4Hook makeWrapper unzip ];
|
2018-06-24 16:12:12 +02:00
|
|
|
|
|
|
|
# Thanks to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672000#15:
|
|
|
|
patches = [ ./gcc47.patch ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
${qt4}/bin/qmake -project -after "CONFIG+=opengl" -after "QT+=xml opengl script" -after "unix:LIBS+=-lGLU"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin;
|
|
|
|
mkdir -p $out/share/Examples $out/share/Misc;
|
|
|
|
cp "Structure Synth Source Code" $out/bin/structure-synth;
|
|
|
|
cp -r Examples/* $out/share/Examples;
|
|
|
|
cp -r Misc/* $out/share/Misc;
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Structure Synth expects to see 'Examples' and 'Misc' directory in
|
|
|
|
# either $HOME or $PWD - so help it along by moving $PWD to 'share',
|
|
|
|
# where we just copied those two directories:
|
|
|
|
preFixup = ''
|
2022-03-14 19:06:00 +01:00
|
|
|
wrapProgram "$out/bin/structure-synth" --chdir "$out/share"
|
2018-06-24 16:12:12 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-06-24 16:12:12 +02:00
|
|
|
description = "Application for generating 3D structures by specifying a design grammar";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://structuresynth.sourceforge.net";
|
2018-06-24 16:12:12 +02:00
|
|
|
maintainers = with maintainers; [ hodapp ];
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|