about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/smpeg2
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/smpeg2')
-rw-r--r--nixpkgs/pkgs/development/libraries/smpeg2/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/smpeg2/default.nix b/nixpkgs/pkgs/development/libraries/smpeg2/default.nix
new file mode 100644
index 000000000000..48281ba04ec1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/smpeg2/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv
+, autoconf
+, automake
+, darwin
+, fetchFromGitHub
+, makeWrapper
+, pkg-config
+, SDL2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "smpeg2";
+  version = "unstable-2022-05-26";
+
+  src = fetchFromGitHub {
+    owner = "icculus";
+    repo = "smpeg";
+    rev = "c5793e5f3f2765fc09c24380d7e92136a0e33d3b";
+    sha256 = "sha256-Z0u83K1GIXd0jUYo5ZyWUH2Zt7Hn8z+yr06DAtAEukw=";
+  };
+
+  nativeBuildInputs = [ autoconf automake makeWrapper pkg-config ];
+
+  buildInputs = [ SDL2 ]
+    ++ lib.optional stdenv.isDarwin darwin.libobjc;
+
+  preConfigure = ''
+    sh autogen.sh
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/smpeg2-config \
+      --prefix PATH ":" "${pkg-config}/bin" \
+      --prefix PKG_CONFIG_PATH ":" "${SDL2.dev}/lib/pkgconfig"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://icculus.org/smpeg/";
+    description = "SDL2 MPEG Player Library";
+    license = licenses.lgpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej ];
+  };
+}