feat: Add flake and ragenix package generation and dev environment
This commit is contained in:
44
camera-sdk.nix
Normal file
44
camera-sdk.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, makeWrapper
|
||||
, libusb1
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "mindvision-camera-sdk";
|
||||
version = "2.1.0.49";
|
||||
|
||||
# Use the camera_sdk directory as source
|
||||
src = ./camera-management-api/camera_sdk;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ libusb1 ];
|
||||
|
||||
unpackPhase = ''
|
||||
cp -r $src/* .
|
||||
tar xzf "linuxSDK_V2.1.0.49(250108).tar.gz"
|
||||
cd "linuxSDK_V2.1.0.49(250108)"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib $out/include
|
||||
|
||||
# Copy x64 library files (SDK has arch-specific subdirs)
|
||||
if [ -d lib/x64 ]; then
|
||||
cp -r lib/x64/* $out/lib/ || true
|
||||
fi
|
||||
|
||||
# Copy header files
|
||||
if [ -d include ]; then
|
||||
cp -r include/* $out/include/ || true
|
||||
fi
|
||||
|
||||
# Make libraries executable
|
||||
chmod +x $out/lib/*.so* 2>/dev/null || true
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "MindVision Camera SDK";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user