Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
100 lines
2.0 KiB
Nix
100 lines
2.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
zlib,
|
|
eigen,
|
|
libGL,
|
|
spglib,
|
|
mmtf-cpp,
|
|
glew,
|
|
python3,
|
|
libarchive,
|
|
libmsym,
|
|
qttools,
|
|
wrapQtAppsHook,
|
|
}:
|
|
|
|
let
|
|
pythonWP = python3.withPackages (
|
|
p: with p; [
|
|
openbabel
|
|
numpy
|
|
]
|
|
);
|
|
|
|
# Pure data repositories
|
|
moleculesRepo = fetchFromGitHub {
|
|
owner = "OpenChemistry";
|
|
repo = "molecules";
|
|
tag = "1.101.0";
|
|
hash = "sha256-hMLf0gYYnQpjSGKcPy4tihNbmpRR7UxnXF/hyhforgI=";
|
|
};
|
|
crystalsRepo = fetchFromGitHub {
|
|
owner = "OpenChemistry";
|
|
repo = "crystals";
|
|
tag = "1.101.0";
|
|
hash = "sha256-WhzFldaOt/wJy1kk+ypOkw1OYFT3hqD7j5qGdq9g+IY=";
|
|
};
|
|
fragmentsRepo = fetchFromGitHub {
|
|
owner = "OpenChemistry";
|
|
repo = "fragments";
|
|
tag = "1.101.0";
|
|
hash = "sha256-x10jGl3lAEfm8OxUZJnjXRJCQg8RLQZTstjwnt5B2bw=";
|
|
};
|
|
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "avogadrolibs";
|
|
version = "1.101.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "OpenChemistry";
|
|
repo = "avogadrolibs";
|
|
tag = version;
|
|
hash = "sha256-0DJU40Etse90rdX8xByjQeUiBsJtEQozZQQsWsc4vxk=";
|
|
};
|
|
|
|
postUnpack = ''
|
|
cp -r ${moleculesRepo} molecules
|
|
cp -r ${crystalsRepo} crystals
|
|
cp -r ${fragmentsRepo} fragments
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
wrapQtAppsHook
|
|
pythonWP
|
|
];
|
|
|
|
buildInputs = [
|
|
eigen
|
|
zlib
|
|
libGL
|
|
spglib
|
|
mmtf-cpp
|
|
glew
|
|
libarchive
|
|
libmsym
|
|
qttools
|
|
];
|
|
|
|
# Fix the broken CMake files to use the correct paths
|
|
postInstall = ''
|
|
substituteInPlace $out/lib/cmake/avogadrolibs/AvogadroLibsConfig.cmake \
|
|
--replace "$out/" ""
|
|
|
|
substituteInPlace $out/lib/cmake/avogadrolibs/AvogadroLibsTargets.cmake \
|
|
--replace "_IMPORT_PREFIX}/$out" "_IMPORT_PREFIX}/"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Molecule editor and visualizer";
|
|
maintainers = with maintainers; [ sheepforce ];
|
|
homepage = "https://github.com/OpenChemistry/avogadrolibs";
|
|
platforms = platforms.linux;
|
|
license = licenses.gpl2Only;
|
|
};
|
|
}
|