summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorSigmanificient <edhyjox@gmail.com>2024-05-20 09:34:17 +0200
committerSigmanificient <edhyjox@gmail.com>2024-05-21 15:48:03 +0200
commitddd0c8f0e140af21a779ffb818e2657f1aae34c0 (patch)
tree1b2b81bb6f1cc7e96b3b74f452044e4f5adb688e /pkgs
parent05b0c4973fe19e0da13d520dbc930424ef26ec89 (diff)
liblapin: init at 0-unstable-2024-05-20
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/by-name/li/liblapin/package.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/by-name/li/liblapin/package.nix b/pkgs/by-name/li/liblapin/package.nix
new file mode 100644
index 000000000000..97bcb1d1e181
--- /dev/null
+++ b/pkgs/by-name/li/liblapin/package.nix
@@ -0,0 +1,59 @@
+{
+ stdenv,
+ lib,
+ fetchFromGitHub,
+ sfml,
+ libffcall,
+ libusb-compat-0_1,
+ libudev-zero,
+}:
+
+stdenv.mkDerivation {
+ name = "liblapin";
+ version = "0-unstable-2024-05-20";
+
+ src = fetchFromGitHub {
+ owner = "Damdoshi";
+ repo = "LibLapin";
+ rev = "27955d24f3efd10fe4f556a4f292d731813d3de3";
+ hash = "sha256-h8LuhTgFOFnyDeFeoEanD64/nmDyLeh6R9tw9X6GP8g=";
+ };
+
+ prePatch = ''
+ # camera module fails to build with opencv, due to missing V4L2 support
+ rm -rf src/camera
+
+ substituteInPlace Makefile \
+ --replace-fail "/bin/echo" "echo"
+ '';
+
+ enableParallelBuilding = true;
+
+ installPhase = ''
+ runHook preInstall
+
+ install -Dm644 liblapin.a $out/lib/liblapin.a
+
+ rm -rf include/private
+ cp -r include $out
+
+ runHook postInstall
+ '';
+
+ buildInputs = [
+ sfml
+ libffcall
+ libusb-compat-0_1
+ libudev-zero
+ ];
+
+ outputs = [ "out" "dev" ];
+
+ meta = {
+ description = "Multimedia library for rookies and prototyping";
+ homepage = "https://liblapin.org?lan=en";
+ platforms = lib.platforms.unix;
+ license = lib.licenses.bsd3;
+ maintainers = with lib.maintainers; [ sigmanificient ];
+ };
+}