push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
nlohmann_json,
pybind11,
replaceVars,
gtest,
setuptools,
cmake,
sfml_2,
hydra-core,
pyvirtualdisplay,
}:
buildPythonPackage {
pname = "nocturne";
version = "0-unstable-2024-06-19";
pyproject = true;
src = fetchFromGitHub {
owner = "facebookresearch";
repo = "nocturne";
rev = "6d1e0f329f7acbed01c934842b269333540af6d2";
hash = "sha256-Ufhvc+IZUrn8i6Fmu6o81LPjY1Jo0vzsso+eLbI1F2s=";
};
# 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 = [
(replaceVars ./dependencies.patch {
gtest_src = gtest.src;
})
];
build-system = [
setuptools
];
nativeBuildInputs = [ cmake ];
dontUseCmakeConfigure = true;
buildInputs = [ sfml_2 ];
# hydra-core and pyvirtualdisplay are not declared as dependences but they are requirements
dependencies = [
hydra-core
pyvirtualdisplay
];
# Test suite requires hydra-submitit-launcher which is not packaged as of 2022-01-02
doCheck = false;
pythonImportsCheck = [ "nocturne" ];
meta = {
description = "Data-driven, fast driving simulator for multi-agent coordination under partial observability";
homepage = "https://github.com/facebookresearch/nocturne";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ samuela ];
};
}

View File

@@ -0,0 +1,27 @@
diff --git a/nocturne/cpp/CMakeLists.txt b/nocturne/cpp/CMakeLists.txt
index c67815f..e1f825b 100644
--- a/nocturne/cpp/CMakeLists.txt
+++ b/nocturne/cpp/CMakeLists.txt
@@ -62,8 +62,7 @@ include(FetchContent)
FetchContent_Declare(
googletest
- GIT_REPOSITORY https://github.com/google/googletest.git
- GIT_TAG main
+ SOURCE_DIR @gtest_src@
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
diff --git a/setup.py b/setup.py
index 4863ae6..b5d3545 100644
--- a/setup.py
+++ b/setup.py
@@ -92,6 +92,8 @@ def main():
# with open("./requirements.txt", "r") as f:
# requires = f.read().splitlines()
setup(
+ # Adding `packages=` is necessary to get `python setup.py install` to work
+ packages=["nocturne", "cfgs"],
ext_modules=[CMakeExtension("nocturne", "./nocturne")],
cmdclass=dict(build_ext=CMakeBuild),
)