bitcraze / crazyflie-lib-python

Python library to communicate with Crazyflie
Other
262 stars 895 forks source link

NixOS #478

Open shot-codes opened 2 months ago

shot-codes commented 2 months ago

I'm leaving this here for anyone who is attempting to run cfclient on NixOS. The following shell.nix allows for successful launch of the application. I haven't done extensive testing but will try to come back here with any relevant updates if I come across something.

The shell assumes nix-ld is installed (programs.nix-ld.enable = true;)

with import <nixpkgs> {};
mkShell {
  NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
    stdenv.cc.cc
    zlib
    libGL
    libxkbcommon
    kdePackages.full
    kdePackages.wayland
    fontconfig
    libusb1
  ];
  NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker";
  buildInputs = [ python312 ];
  shellHook = ''
    export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
    source .venv/bin/activate
  '';
}
gemenerik commented 1 month ago

Thanks for the contribution!