nixpkgs/pkgs/applications/graphics/freepv/default.nix
Lluís Batlle i Rossell 813a3b6c6d Adding freepv, without its mozilla plug-in.
svn path=/nixpkgs/trunk/; revision=14954
2009-04-08 20:05:59 +00:00

45 lines
1.2 KiB
Nix

{ stdenv, fetchurl, libjpeg, mesa, freeglut, zlib, cmake, libX11, libxml2, libpng,
libXxf86vm }:
stdenv.mkDerivation {
name = "freepv-0.3.0_beta1";
src = fetchurl {
url = mirror://sourceforge/freepv/freepv-0.3.0_beta1.tar.gz;
sha256 = "084qqa361np73anvqrv78ngw8hjxglmdm3akkpszbwnzniw89qla";
};
buildInputs = [ libjpeg mesa freeglut zlib cmake libX11 libxml2 libpng
libXxf86vm ];
patchPhase = ''
sed -i -e '/GECKO/d' CMakeLists.txt
sed -i -e '/mozilla/d' src/CMakeLists.txt
'';
# I added these flags to get all the rpaths right, which I guess they are
# taken from the qt4 sources. Not very nice.
cmakeFlags = " -DCMAKE_EXE_LINKER_FLAGS=\"" +
" -lpng12 -lXxf86vm -ljpeg -lz -lglut -lGLU -lxml2 -lX11\"" +
" -DCMAKE_SKIP_BUILD_RPATH=ON" +
" -DCMAKE_BUILD_TYPE=Release" +
" -DCMAKE_INSTALL_PREFIX=$out";
dontUseCmakeConfigure = true;
# I rewrote the configure phase to get the $out references evaluated in
# cmakeFlags
configurePhase = ''
set -x
mkdir -p build;
cd build
eval -- "cmake .. $cmakeFlags"
set +x
'';
meta = {
description = "Open source panorama viewer using GL";
homepage = http://freepv.sourceforge.net/;
license = "LGPL";
};
}