2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, libjpeg
|
|
|
|
, libGLU
|
|
|
|
, libGL
|
|
|
|
, freeglut
|
|
|
|
, zlib
|
|
|
|
, cmake
|
|
|
|
, libX11
|
|
|
|
, libxml2
|
|
|
|
, libpng
|
|
|
|
, libXxf86vm
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "freepv";
|
|
|
|
version = "0.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "mirror://sourceforge/freepv/freepv-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1w19abqjn64w47m35alg7bcdl1p97nf11zn64cp4p0dydihmhv56";
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ libjpeg libGLU libGL freeglut zlib libX11 libxml2 libpng libXxf86vm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e '/GECKO/d' CMakeLists.txt
|
|
|
|
sed -i -e '/mozilla/d' src/CMakeLists.txt
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-fpermissive -Wno-narrowing";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Open source panorama viewer using GL";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://freepv.sourceforge.net/";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = [ lib.licenses.lgpl21 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|