mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 06:14:57 +01:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, libv4l
|
|
}:
|
|
stdenv.mkDerivation rec {
|
|
pname = "openimajgrabber";
|
|
version = "1.3.10";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "openimaj";
|
|
repo = "openimaj";
|
|
rev = "openimaj-${version}";
|
|
sha256 = "sha256-Y8707ovE7f6Fk3cJ+PtwvzNpopgH5vlF55m2Xm4hjYM=";
|
|
};
|
|
|
|
buildInputs = [ libv4l ];
|
|
|
|
# These build instructions come from build.sh
|
|
buildPhase = ''
|
|
pushd hardware/core-video-capture/src-native/linux
|
|
g++ -fPIC -g -c OpenIMAJGrabber.cpp
|
|
g++ -fPIC -g -c capture.cpp
|
|
g++ -shared -Wl,-soname,OpenIMAJGrabber.so -o OpenIMAJGrabber.so OpenIMAJGrabber.o capture.o -lv4l2 -lrt -lv4lconvert
|
|
popd
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/lib
|
|
cp hardware/core-video-capture/src-native/linux/OpenIMAJGrabber.so $out/lib
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Collection of libraries and tools for multimedia (images, text, video, audio, etc.) content analysis and content generation. This package only builds the OpenIMAJGrabber for Linux";
|
|
homepage = "http://www.openimaj.org";
|
|
license = licenses.bsd0;
|
|
maintainers = with maintainers; [ emmanuelrosa _1000101 ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|