Unverified Commit 5c8fdd31 authored by Franz Pletz's avatar Franz Pletz Committed by GitHub
Browse files

mediamtx: 1.11.3 -> 1.12.2 (#405334)

parents 388bd13f 6a70a620
Loading
Loading
Loading
Loading
+16 −16
Original line number Diff line number Diff line
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  fetchurl,
  buildGoModule,
  nixosTests,
}:

@@ -12,32 +12,32 @@ let
    hash = "sha256-0BbBIwSW7lnz9bAcFszkzAG1odPTV63sIAyQixMevkk=";
  };
in
buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "mediamtx";
  # check for hls.js version updates in internal/servers/hls/hlsjsdownloader/VERSION
  version = "1.11.3";
  version = "1.12.2";

  src = fetchFromGitHub {
    owner = "bluenviron";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-LPyyPHTdV9cUDRKSlP+XaMyb+yhSj4Jq0tnT7AnTRqw=";
    repo = "mediamtx";
    tag = "v${finalAttrs.version}";
    hash = "sha256-O3Iu9gvCiAVuoJw77MWPyCfuJVcw0E8YWcJBiJq+/Ms=";
  };

  vendorHash = "sha256-lR2GH/oEdzdnel7wUAVDUQIpKuI4WUsa75Nn44SWloY=";
  vendorHash = "sha256-0927IeFIC2rhApPVs5ZIvS3yoDN8Km3tHgrRXnP/wBc=";

  postPatch = ''
    cp ${hlsJs} internal/servers/hls/hls.min.js
    echo "v${version}" > internal/core/VERSION
    echo "v${finalAttrs.version}" > internal/core/VERSION

    # disable binary-only rpi camera support
    substituteInPlace internal/staticsources/rpicamera/camera_disabled.go \
      --replace-fail '!linux || (!arm && !arm64)' 'linux || !linux'
    substituteInPlace internal/staticsources/rpicamera/{component,camera,params_serialize,pipe}.go \
    substituteInPlace internal/staticsources/rpicamera/{camera,params_serialize,pipe}.go \
      --replace-fail '(linux && arm) || (linux && arm64)' 'linux && !linux'
    substituteInPlace internal/staticsources/rpicamera/component_32.go \
    substituteInPlace internal/staticsources/rpicamera/camera_32.go \
      --replace-fail 'linux && arm' 'linux && !linux'
    substituteInPlace internal/staticsources/rpicamera/component_64.go \
    substituteInPlace internal/staticsources/rpicamera/camera_64.go \
      --replace-fail 'linux && arm64' 'linux && !linux'
  '';

@@ -50,11 +50,11 @@ buildGoModule rec {
    inherit (nixosTests) mediamtx;
  };

  meta = with lib; {
  meta = {
    description = "SRT, WebRTC, RTSP, RTMP, LL-HLS media server and media proxy";
    inherit (src.meta) homepage;
    license = licenses.mit;
    inherit (finalAttrs.src.meta) homepage;
    license = lib.licenses.mit;
    mainProgram = "mediamtx";
    maintainers = with maintainers; [ fpletz ];
    maintainers = with lib.maintainers; [ fpletz ];
  };
}
})