Skip to content

Commit

Permalink
Final isis version
Browse files Browse the repository at this point in the history
It compiles now and I moved most of the libraries to buildInputs and
left only make, cmake and hooks in NBI.
  • Loading branch information
arunoruto committed Nov 5, 2024
1 parent 178990f commit 3923b71
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions pkgs/isis/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
stdenv,
fetchFromGitHub,
fetchurl,
autoPatchelfHook,
patchelf,

# build
cmake,
ninja,

# runtime
ale,
armadillo,
blas,
Expand All @@ -17,6 +21,7 @@
doxygen,
eigen,
embree,
geos,
gsl,
gtest,
hdf5,
Expand All @@ -25,8 +30,10 @@
lapack,
libgeotiff,
libtiff,
libsForQt5,
nanoflann,
nn,
opencv,
protobuf,
python3,
pcl,
Expand All @@ -36,12 +43,8 @@
tnt,
swig,
xalanc,

# runtime
geos,
opencv,
xercesc,
libsForQt5,

}:
let
pname = "isis";
Expand Down Expand Up @@ -130,6 +133,11 @@ stdenv.mkDerivation {
nativeBuildInputs = [
cmake
ninja
autoPatchelfHook
patchelf
];

buildInputs = [
ale
armadillo
blas
Expand All @@ -140,6 +148,7 @@ stdenv.mkDerivation {
doxygen
eigen
embree3
geos
gsl
gtest
hdf5
Expand Down Expand Up @@ -169,47 +178,38 @@ stdenv.mkDerivation {
tnt126
swig
xalanc
];

buildInputs = [
geos
xercesc
];

# phases = [
# "unpackPhase"
# "preBuild"
# "buildPhase"
# "preInstall"
# "installPhase"
# ];
dontWrapQtApps = true;
configurePhase = ":";

preBuild = ''
mkdir -p build/lib install
export ISISROOT=$(pwd)
'';
cmakeFlags = [
"-GNinja"
"-DJP2KFLAG=OFF"
"-DBUILDTESTS=OFF"
"-DPYBINDINGS=OFF"
"-S../isis"
"-Bbuild"
];

buildPhase = ''
runHook preBuild
cd ./build
cmake -DJP2KFLAG=OFF -DBUILDTESTS=OFF -DPYBINDINGS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/../install -GNinja ../isis
preConfigure = ''
mkdir build
export ISISROOT="$(pwd)"
'';

preInstall = ''
preBuild = ''
substituteInPlace \
../isis/src/base/objs/EmbreeTargetShape/EmbreeTargetShape.cpp \
--replace-fail "isinf" "std::isinf"
cd build
export ISISROOT=$(pwd)
'';

installPhase = ''
runHook preInstall
mkdir $out
ninja install
cp -r ../install/* $out
preFixup = ''
# Sensorbuild needs to be linked again!
for entry in $out/lib/*.so; do
patchelf --set-rpath "$out/lib" $entry
done
'';

meta = with lib; {
Expand Down

0 comments on commit 3923b71

Please sign in to comment.