Files
IUP_Nix/im.nix
T

64 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchurl
, lsb-release
, fftw
, fftwFloat
, libpng
, lua
, zlib
, tree
}:
stdenv.mkDerivation rec {
pname = "im";
version = "3.15";
src = fetchurl {
url = "mirror://sourceforge/imtoolkit/${version}/Docs%20and%20Sources/${pname}-${version}_Sources.tar.gz";
sha256 = "sha256-NsxCV/j1+BEouFS7O+KcXL3QkUdlKPMVr2ZtCTC5tX4=";
};
nativeBuildInputs = [
lsb-release
];
buildInputs = [
fftw
fftwFloat
libpng
lua
zlib
];
postPatch = ''
patchShebangs .
sed -i '1i#include <unistd.h>' src/libjasper2/base/jas_stream.c
'';
makeFlags = [ "NO_DEPEND=Yes" ];
installPhase = ''
runHook preInstall
mkdir -p $out/{lib,include}
cp -vr include/* $out/include/
cp -v lib/Linux*/*.so $out/lib/
cp -v lib/Linux*/*.a $out/lib/ || true
cp -v lib/Linux*/Lua*/*.so $out/lib/
cp -v lib/Linux*/Lua*/*.a $out/lib/ || true
runHook postInstall
'';
meta = with lib; {
description = "A toolkit for image representation, storage, capture and processing";
license = licenses.mit;
maintainers = [ eko5z ];
platforms = with platforms; gnu ++ linux ++ darwin;
};
}