diff --git a/pkgs/tools/misc/hdfview/default.nix b/pkgs/tools/misc/hdfview/default.nix index 6030913a2286..94acd6dcd947 100644 --- a/pkgs/tools/misc/hdfview/default.nix +++ b/pkgs/tools/misc/hdfview/default.nix @@ -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; }; }