hdfview: add support for darwin

Copy HDFView.app to Applications folder.
This commit is contained in:
Jiajie Chen 2022-07-04 14:01:23 +08:00
parent 2785e3ca78
commit 4a12c56ebd

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
installPhase = ''
runHook preInstall
'' + lib.optionalString stdenv.isLinux ''
mkdir -p $out/bin $out/lib
cp -a build/dist/HDFView/bin/HDFView $out/bin/
cp -a build/dist/HDFView/lib/app $out/lib/
@ -45,7 +45,10 @@ stdenv.mkDerivation rec {
mkdir -p $out/share/applications $out/share/icons/hicolor/32x32/apps
cp src/HDFView.png $out/share/icons/hicolor/32x32/apps/
'' + lib.optionalString stdenv.isDarwin ''
mkdir -p $out/Applications
cp -a build/dist/HDFView.app $out/Applications/
'' + ''
runHook postInstall
'';
@ -53,6 +56,6 @@ stdenv.mkDerivation rec {
description = "A visual tool for browsing and editing HDF4 and HDF5 files";
license = lib.licenses.free; # BSD-like
homepage = "https://portal.hdfgroup.org/display/HDFVIEW/HDFView";
platforms = lib.platforms.linux;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}