diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000000000000000000000000000000000000..b85d62e83a778cc4c209c043c0ee915422b2a791
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,55 @@
+{
+  lib,
+  cddlib,
+  clp,
+  cmake,
+  glpk,
+  hpp-centroidal-dynamics,
+  ndcurves,
+  python3Packages,
+  qpoases,
+}:
+
+python3Packages.buildPythonPackage {
+  pname = "hpp-bezier-com-traj";
+  version = "5.0.0";
+  pyproject = false;
+
+  src = lib.fileset.toSource {
+    root = ./.;
+    fileset = lib.fileset.unions [
+      ./CMakeLists.txt
+      ./include
+      ./package.xml
+      ./python
+      ./src
+      ./tests
+    ];
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ cmake ];
+
+  propagatedBuildInputs = [
+    cddlib
+    clp
+    glpk
+    hpp-centroidal-dynamics
+    ndcurves
+    qpoases
+  ];
+
+  cmakeFlags = [ "-DUSE_GLPK=ON" ];
+
+  doCheck = true;
+
+  pythonImportsCheck = [ "hpp_bezier_com_traj" ];
+
+  meta = {
+    description = "Multi contact trajectory generation for the COM using Bezier curves";
+    homepage = "https://github.com/humanoid-path-planner/hpp-bezier-com-traj";
+    license = lib.licenses.bsd2;
+    maintainers = [ lib.maintainers.nim65s ];
+  };
+}
diff --git a/flake.lock b/flake.lock
index 5ac9fdc5b77421ee9346ea4d8d5d2403c6fd4b09..fbb94dd242ba16bcdbf82d93f4dca2b7671ced2a 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,7 +2,9 @@
   "nodes": {
     "flake-parts": {
       "inputs": {
-        "nixpkgs-lib": "nixpkgs-lib"
+        "nixpkgs-lib": [
+          "nixpkgs"
+        ]
       },
       "locked": {
         "lastModified": 1717285511,
@@ -18,6 +20,54 @@
         "type": "github"
       }
     },
+    "hpp-centroidal-dynamics": {
+      "inputs": {
+        "flake-parts": [
+          "flake-parts"
+        ],
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1719580311,
+        "narHash": "sha256-t4xi0DRyB2IXNenwRaibKN0VRqpKgCcOqNhg0utTeqc=",
+        "owner": "humanoid-path-planner",
+        "repo": "hpp-centroidal-dynamics",
+        "rev": "f544bb342f55964b3c35eff32be78eb9ac2aebd1",
+        "type": "github"
+      },
+      "original": {
+        "owner": "humanoid-path-planner",
+        "ref": "release/5.1.0",
+        "repo": "hpp-centroidal-dynamics",
+        "type": "github"
+      }
+    },
+    "ndcurves": {
+      "inputs": {
+        "flake-parts": [
+          "flake-parts"
+        ],
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1719583351,
+        "narHash": "sha256-N0XZQGm4uNArzPHbSl9bBM0kTwi7cCDOzPCM3lJ98Gk=",
+        "owner": "loco-3d",
+        "repo": "ndcurves",
+        "rev": "e84762286a356e185f38c9846ee8a9c4c49be43b",
+        "type": "github"
+      },
+      "original": {
+        "owner": "loco-3d",
+        "ref": "release/1.5.0",
+        "repo": "ndcurves",
+        "type": "github"
+      }
+    },
     "nixpkgs": {
       "locked": {
         "lastModified": 1719575122,
@@ -34,21 +84,11 @@
         "type": "github"
       }
     },
-    "nixpkgs-lib": {
-      "locked": {
-        "lastModified": 1717284937,
-        "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
-        "type": "tarball",
-        "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
-      },
-      "original": {
-        "type": "tarball",
-        "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
-      }
-    },
     "root": {
       "inputs": {
         "flake-parts": "flake-parts",
+        "hpp-centroidal-dynamics": "hpp-centroidal-dynamics",
+        "ndcurves": "ndcurves",
         "nixpkgs": "nixpkgs"
       }
     }
diff --git a/flake.nix b/flake.nix
index 94c479c56943fcf3cafaeca64c7ce4ed9a0cd09b..51f799ffdb2e45793e54338e7e5cb432232d3458 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,21 +1,28 @@
 {
-  description = "Description for the project";
+  description = "Multi contact trajectory generation for the COM using Bezier curves";
 
   inputs = {
-    flake-parts.url = "github:hercules-ci/flake-parts";
     nixpkgs.url = "github:nim65s/nixpkgs/gepetto";
+    flake-parts = {
+      url = "github:hercules-ci/flake-parts";
+      inputs.nixpkgs-lib.follows = "nixpkgs";
+    };
+    hpp-centroidal-dynamics = {
+      url = "github:humanoid-path-planner/hpp-centroidal-dynamics/release/5.1.0";
+      inputs.nixpkgs.follows = "nixpkgs";
+      inputs.flake-parts.follows = "flake-parts";
+    };
+    ndcurves = {
+      url = "github:loco-3d/ndcurves/release/1.5.0";
+      inputs.nixpkgs.follows = "nixpkgs";
+      inputs.flake-parts.follows = "flake-parts";
+    };
   };
 
   outputs =
     inputs@{ flake-parts, ... }:
     flake-parts.lib.mkFlake { inherit inputs; } {
-      imports = [
-        # To import a flake module
-        # 1. Add foo to inputs
-        # 2. Add foo as a parameter to the outputs function
-        # 3. Add here: foo.flakeModule
-
-      ];
+      imports = [ ];
       systems = [
         "x86_64-linux"
         "aarch64-linux"
@@ -24,26 +31,17 @@
       ];
       perSystem =
         {
-          config,
           self',
-          inputs',
           pkgs,
           system,
           ...
         }:
         {
-          # Per-system attributes can be defined here. The self' and inputs'
-          # module parameters provide easy access to attributes of the same
-          # system.
-
-          # Equivalent to  inputs'.nixpkgs.legacyPackages.hello;
-          packages.default = pkgs.hello;
+          packages.default = pkgs.callPackage ./. {
+            hpp-centroidal-dynamics = inputs.hpp-centroidal-dynamics.packages.${system}.default;
+            ndcurves = inputs.ndcurves.packages.${system}.default;
+          };
+          devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
         };
-      flake = {
-        # The usual flake attributes can be defined here, including system-
-        # agnostic ones like nixosModule and system-enumerating ones, although
-        # those are more easily expressed in perSystem.
-
-      };
     };
 }