nix-overlay/flake.nix

41 lines
1.4 KiB
Nix
Raw Normal View History

2022-12-08 20:49:53 +03:00
{
description = "Robossembler Development Environments on Nix";
2023-01-10 15:42:12 +03:00
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
ros-flake.url = "github:lopsided98/nix-ros-overlay";
};
2023-01-10 17:02:05 +03:00
outputs = { self, nixpkgs, ros-flake, flake-utils }:
2023-01-10 15:42:12 +03:00
flake-utils.lib.eachDefaultSystem
(system:
2023-01-10 17:02:05 +03:00
let
pkgs = nixpkgs.legacyPackages.${system};
ros = ros-flake.legacyPackages.${system}.rolling;
in
2023-01-10 15:42:12 +03:00
{
devShells.ros =
2023-01-10 17:02:05 +03:00
pkgs.mkShell {
buildInputs = (with ros; [ ros2run rmw-fastrtps-dynamic-cpp ]);
2023-01-10 17:02:05 +03:00
RMW_IMPLEMENTATION = "rmw_fastrtps_dynamic_cpp";
2023-01-23 01:33:57 +03:00
shellHook = ''
export LD_LIBRARY_PATH=${(with pkgs; lib.makeLibraryPath [ libsodium ])}
'';
2023-01-10 17:02:05 +03:00
};
devShells.blender =
let
bpy = pkgs.callPackage ./pkgs/bpy.nix { };
LD_LIBRARY_PATH = with pkgs;
lib.makeLibraryPath ([ libxkbcommon ] ++
(with xorg; [ libX11 libXrender libXxf86vm libXfixes libXi ])
);
in
pkgs.mkShell {
packages = [ bpy ];
shellHook = ''
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${pkgs.stdenv.cc.cc.lib}/lib/:/run/opengl-driver/lib/
'';
};
2023-01-10 15:42:12 +03:00
}
);
}