nixpkgs/pkgs/applications/graphics/ovito/default.nix
Ihar Hrachyshka dd0f03a56c treewide: remove usage of deprecated apple_sdk framework stubs
They are not doing anything right now. This is in preparation for their
complete removal from the tree.

Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.

Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-19 20:28:20 -04:00

103 lines
1.9 KiB
Nix

{
lib,
stdenv,
fetchFromGitLab,
fetchurl,
makeDesktopItem,
cmake,
boost,
bzip2,
ffmpeg,
fftwSinglePrec,
hdf5,
muparser,
netcdf,
openssl,
python3,
qscintilla,
qtbase,
qtsvg,
qttools,
wrapQtAppsHook,
copyDesktopItems,
# needed to run natively on wayland
qtwayland,
}:
stdenv.mkDerivation rec {
pname = "ovito";
version = "3.11.1";
src = fetchFromGitLab {
owner = "stuko";
repo = "ovito";
rev = "v${version}";
hash = "sha256-ulzcsFAiZDg8nABQXNB2/MS7lZdK3czGHLKgKDWS15E=";
fetchSubmodules = true;
};
patches = [ ./zstd.patch ];
nativeBuildInputs = [
cmake
wrapQtAppsHook
copyDesktopItems
];
buildInputs = [
boost
bzip2
ffmpeg
fftwSinglePrec
hdf5
muparser
netcdf
openssl
python3
qscintilla
qtbase
qtsvg
qttools
qtwayland
];
# manually create a desktop file
desktopItems = [
(makeDesktopItem {
name = "ovito";
comment = "Open Visualization Tool";
exec = "ovito";
icon = "ovito";
terminal = false;
startupNotify = false;
desktopName = "ovito";
startupWMClass = "Ovito";
categories = [ "Science" ];
})
];
postInstall =
let
icon = fetchurl {
url = "https://www.ovito.org/wp-content/uploads/logo_rgb-768x737.png";
hash = "sha256-FOmIUeXem+4MjavQNag0UIlcR2wa2emJjivwxoJh6fI=";
};
in
''
install -Dm644 ${icon} $out/share/pixmaps/ovito.png
'';
meta = with lib; {
description = "Scientific visualization and analysis software for atomistic and particle simulation data";
mainProgram = "ovito";
homepage = "https://ovito.org";
license = with licenses; [
gpl3Only
mit
];
maintainers = with maintainers; [
twhitehead
chn
];
broken = stdenv.hostPlatform.isDarwin; # clang-11: error: no such file or directory: '$-DOVITO_COPYRIGHT_NOTICE=...
};
}