diff --git a/pkgs/applications/graphics/seg3d/cstdio.patch b/pkgs/applications/graphics/seg3d/cstdio.patch new file mode 100644 index 000000000000..0d9eed07a367 --- /dev/null +++ b/pkgs/applications/graphics/seg3d/cstdio.patch @@ -0,0 +1,81 @@ +diff --git a/Core/Geometry/Transform.cc b/Core/Geometry/Transform.cc +index 4f16fdc..0da4679 100644 +--- a/Core/Geometry/Transform.cc ++++ b/Core/Geometry/Transform.cc +@@ -28,6 +28,7 @@ + + #include + #include ++#include + + #include + #include +diff --git a/Core/Util/FullFileName.cc b/Core/Util/FullFileName.cc +index 7a2cad7..7710e92 100644 +--- a/Core/Util/FullFileName.cc ++++ b/Core/Util/FullFileName.cc +@@ -29,6 +29,7 @@ + + #include + #include ++#include + + namespace SCIRun { + +diff --git a/Externals/particle-system-mm/src/sizingfield/LFS.cxx b/Externals/particle-system-mm/src/sizingfield/LFS.cxx +index d1fa5aa..a5a4358 100644 +--- a/Externals/particle-system-mm/src/sizingfield/LFS.cxx ++++ b/Externals/particle-system-mm/src/sizingfield/LFS.cxx +@@ -1,5 +1,6 @@ + #include + #include ++#include + #include + + using namespace std; +diff --git a/Externals/slivr/Point.cc b/Externals/slivr/Point.cc +index d3be03e..ed4e503 100644 +--- a/Externals/slivr/Point.cc ++++ b/Externals/slivr/Point.cc +@@ -42,6 +42,7 @@ + #include + #include + #include ++#include + + namespace SLIVR { + +diff --git a/Externals/slivr/Transform.cc b/Externals/slivr/Transform.cc +index c0a4430..520179f 100644 +--- a/Externals/slivr/Transform.cc ++++ b/Externals/slivr/Transform.cc +@@ -47,6 +47,7 @@ + #include + #include + #include ++#include + + using namespace SLIVR; + using namespace std; +diff --git a/Externals/slivr/Vector.cc b/Externals/slivr/Vector.cc +index 8370d65..8b04bb9 100644 +--- a/Externals/slivr/Vector.cc ++++ b/Externals/slivr/Vector.cc +@@ -43,6 +43,7 @@ + #include + #include + #include ++#include + + using std::istream; + using std::ostream; +diff --git a/Externals/vispack/src/image/imagefile.txx b/Externals/vispack/src/image/imagefile.txx +index ced2590..13a32b2 100644 +--- a/Externals/vispack/src/image/imagefile.txx ++++ b/Externals/vispack/src/image/imagefile.txx +@@ -1,3 +1,5 @@ ++#include ++ + template + int write_raw(const char* name, const VISImage& im) + { diff --git a/pkgs/applications/graphics/seg3d/default.nix b/pkgs/applications/graphics/seg3d/default.nix new file mode 100644 index 000000000000..2f8623160ed5 --- /dev/null +++ b/pkgs/applications/graphics/seg3d/default.nix @@ -0,0 +1,25 @@ +{ fetchurl, stdenv, cmake, wxGTK, itk, mesa, libXft, libXext, libXi, zlib, libXmu }: + +stdenv.mkDerivation { + name = "seg3d-1.12"; + src = fetchurl { + url = http://www.sci.utah.edu/releases/seg3d_v1.12/Seg3D_1.12_20090930_source.tgz; + sha256 = "1wr6rc6v5qjjkmws8yrc03z35h3iydxk1z28p06v1wdnca0y71z8"; + }; + + patches = [ ./cstdio.patch ]; + + cmakeFlags = [ "-DM_LIBRARY=${stdenv.glibc}/lib/libm.so" + "-DDL_LIBRARY=${stdenv.glibc}/lib/libdl.so" ]; + + preBuild = '' + export LD_LIBRARY_PATH=`pwd`/lib + ''; + + preUnpack = '' + set -x + sourceRoot=`pwd`/src + ''; + + buildInputs = [ cmake wxGTK itk mesa libXft libXext libXi zlib libXmu ]; +} diff --git a/pkgs/development/libraries/itk/default.nix b/pkgs/development/libraries/itk/default.nix new file mode 100644 index 000000000000..c0088d7a8d60 --- /dev/null +++ b/pkgs/development/libraries/itk/default.nix @@ -0,0 +1,24 @@ +{stdenv, fetchurl, cmake, libX11, libuuid}: + +stdenv.mkDerivation rec { + name = "itk-3.16.0"; + + src = fetchurl { + url = mirror://sourceforge/itk/InsightToolkit-3.16.0.tar.gz; + sha256 = "18r021ib2g94qlajjsny0r6cpc61rmr0zrpb2l0mx1y7j9ckr6ks"; + }; + + cmakeFlags = [ "-DBUILD_TESTING=OFF" "-DBUILD_EXAMPLES=OFF" ]; + + # makeFlags = [ "VERBOSE=1" ]; + + buildInputs = [ cmake libX11 libuuid ]; + + meta = { + description = "Insight Segmentation and Registration Toolkit"; + homepage = http://www.itk.org/; + license = "BSD"; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 99c7bc32e71f..507b444be28b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4015,6 +4015,11 @@ let inherit stdenv fetchurl gettext python; }; + itk = import ../development/libraries/itk { + inherit stdenv fetchurl cmake libuuid; + inherit (xlibs) libX11; + }; + jamp = builderDefsPackage ../games/jamp { inherit mesa SDL SDL_image SDL_mixer; }; @@ -7948,6 +7953,11 @@ let qt = qt3; }; + seg3d = import ../applications/graphics/seg3d { + inherit fetchurl stdenv cmake wxGTK itk mesa zlib; + inherit (xlibs) libXft libXext libXi libXmu; + }; + skype_linux = import ../applications/networking/skype { inherit fetchurl stdenv; inherit alsaLib freetype fontconfig zlib;