2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
|
|
|
cmake,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gtest,
|
|
|
|
hydra-core,
|
|
|
|
lib,
|
|
|
|
nlohmann_json,
|
|
|
|
pybind11,
|
|
|
|
pyvirtualdisplay,
|
|
|
|
sfml,
|
|
|
|
substituteAll,
|
2023-01-11 07:51:40 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nocturne";
|
|
|
|
version = "unstable-2022-10-15";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebookresearch";
|
|
|
|
repo = pname;
|
|
|
|
rev = "ae0a4e361457caf6b7e397675cc86f46161405ed";
|
|
|
|
hash = "sha256-pFVbl4m7qX1mJgleNabRboS9klDDsbzUa4PYL5+Jupc=";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Simulate the git submodules but with nixpkgs dependencies
|
|
|
|
postUnpack = ''
|
|
|
|
rm -rf $sourceRoot/third_party/*
|
|
|
|
ln -s ${nlohmann_json.src} $sourceRoot/third_party/json
|
|
|
|
ln -s ${pybind11.src} $sourceRoot/third_party/pybind11
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./dependencies.patch;
|
|
|
|
gtest_src = gtest.src;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
buildInputs = [ sfml ];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
# hydra-core and pyvirtualdisplay are not declared as dependences but they are requirements
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
hydra-core
|
|
|
|
pyvirtualdisplay
|
|
|
|
];
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
# Test suite requires hydra-submitit-launcher which is not packaged as of 2022-01-02
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "nocturne" ];
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A data-driven, fast driving simulator for multi-agent coordination under partial observability";
|
|
|
|
homepage = "https://github.com/facebookresearch/nocturne";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ samuela ];
|
|
|
|
};
|
|
|
|
}
|