2019-11-10 17:44:34 +01:00
|
|
|
{ stdenv, fetchurl, libjpeg, libGLU, libGL, freeglut, zlib, cmake, libX11, libxml2, libpng,
|
2017-09-03 08:58:57 +02:00
|
|
|
libXxf86vm }:
|
2009-04-08 22:05:59 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2017-01-19 23:35:40 +01:00
|
|
|
name = "freepv-0.3.0";
|
2009-04-08 22:05:59 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "mirror://sourceforge/freepv/freepv-0.3.0.tar.gz";
|
2017-01-19 23:35:40 +01:00
|
|
|
sha256 = "1w19abqjn64w47m35alg7bcdl1p97nf11zn64cp4p0dydihmhv56";
|
2009-04-08 22:05:59 +02:00
|
|
|
};
|
|
|
|
|
2019-11-10 17:44:34 +01:00
|
|
|
buildInputs = [ libjpeg libGLU libGL freeglut zlib cmake libX11 libxml2 libpng
|
2017-09-03 08:58:57 +02:00
|
|
|
libXxf86vm ];
|
2009-04-08 22:05:59 +02:00
|
|
|
|
2017-01-19 23:35:40 +01:00
|
|
|
postPatch = ''
|
2009-04-08 22:05:59 +02:00
|
|
|
sed -i -e '/GECKO/d' CMakeLists.txt
|
|
|
|
sed -i -e '/mozilla/d' src/CMakeLists.txt
|
2017-01-19 23:35:40 +01:00
|
|
|
sed -i -e '1i \
|
|
|
|
#include <cstdio>' src/libfreepv/OpenGLRenderer.cpp
|
|
|
|
sed -i -e '1i \
|
|
|
|
#include <cstring>' src/libfreepv/Image.cpp
|
|
|
|
substituteInPlace src/libfreepv/Action.h \
|
|
|
|
--replace NULL nullptr
|
|
|
|
substituteInPlace src/libfreepv/pngReader.cpp \
|
|
|
|
--replace png_set_gray_1_2_4_to_8 png_set_expand_gray_1_2_4_to_8
|
2009-04-08 22:05:59 +02:00
|
|
|
'';
|
|
|
|
|
2017-01-19 23:35:40 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-fpermissive -Wno-narrowing";
|
|
|
|
|
2009-04-08 22:05:59 +02:00
|
|
|
meta = {
|
|
|
|
description = "Open source panorama viewer using GL";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://freepv.sourceforge.net/";
|
2017-01-19 23:35:40 +01:00
|
|
|
license = [ stdenv.lib.licenses.lgpl21 ];
|
2009-04-08 22:05:59 +02:00
|
|
|
};
|
|
|
|
}
|