stage-2-init: fix false positives for RO Nix store mounts (#375257)
[NixPkgs.git] / pkgs / development / python-modules / nocturne / default.nix
blob0934e6fd2535d625f6a66b1302852bee1fb3dae1
2   buildPythonPackage,
3   cmake,
4   fetchFromGitHub,
5   gtest,
6   hydra-core,
7   lib,
8   nlohmann_json,
9   pybind11,
10   pyvirtualdisplay,
11   sfml,
12   substituteAll,
15 buildPythonPackage rec {
16   pname = "nocturne";
17   version = "unstable-2022-10-15";
18   format = "setuptools";
20   src = fetchFromGitHub {
21     owner = "facebookresearch";
22     repo = pname;
23     rev = "ae0a4e361457caf6b7e397675cc86f46161405ed";
24     hash = "sha256-pFVbl4m7qX1mJgleNabRboS9klDDsbzUa4PYL5+Jupc=";
25   };
27   # Simulate the git submodules but with nixpkgs dependencies
28   postUnpack = ''
29     rm -rf $sourceRoot/third_party/*
30     ln -s ${nlohmann_json.src} $sourceRoot/third_party/json
31     ln -s ${pybind11.src} $sourceRoot/third_party/pybind11
32   '';
34   patches = [
35     (substituteAll {
36       src = ./dependencies.patch;
37       gtest_src = gtest.src;
38     })
39   ];
41   nativeBuildInputs = [ cmake ];
42   dontUseCmakeConfigure = true;
44   buildInputs = [ sfml ];
46   # hydra-core and pyvirtualdisplay are not declared as dependences but they are requirements
47   propagatedBuildInputs = [
48     hydra-core
49     pyvirtualdisplay
50   ];
52   # Test suite requires hydra-submitit-launcher which is not packaged as of 2022-01-02
53   doCheck = false;
55   pythonImportsCheck = [ "nocturne" ];
57   meta = with lib; {
58     description = "Data-driven, fast driving simulator for multi-agent coordination under partial observability";
59     homepage = "https://github.com/facebookresearch/nocturne";
60     license = licenses.mit;
61     maintainers = with maintainers; [ samuela ];
62   };