mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, libjpeg
|
|
, libGLU
|
|
, libGL
|
|
, libglut
|
|
, zlib
|
|
, cmake
|
|
, libX11
|
|
, libxml2
|
|
, libpng
|
|
, libXxf86vm
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "freepv";
|
|
version = "0.3.0";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/freepv/freepv-${version}.tar.gz";
|
|
sha256 = "1w19abqjn64w47m35alg7bcdl1p97nf11zn64cp4p0dydihmhv56";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [ libjpeg libGLU libGL libglut zlib libX11 libxml2 libpng libXxf86vm ];
|
|
|
|
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
|
|
'';
|
|
|
|
env.NIX_CFLAGS_COMPILE = "-fpermissive -Wno-narrowing";
|
|
|
|
meta = {
|
|
description = "Open source panorama viewer using GL";
|
|
homepage = "https://freepv.sourceforge.net/";
|
|
license = [ lib.licenses.lgpl21 ];
|
|
};
|
|
}
|