Commit 15ee2ca4 authored by Joshua Campbell's avatar Joshua Campbell
Browse files

ndi: update src and fix lib symlink

parent 6315cf18
Loading
Loading
Loading
Loading
+7 −15
Original line number Diff line number Diff line
{ lib, stdenv, requireFile, avahi, obs-studio-plugins }:
{ lib, stdenv, fetchurl, avahi, obs-studio-plugins }:

let
  versionJSON = lib.importJSON ./version.json;
@@ -15,20 +15,10 @@ stdenv.mkDerivation rec {
  majorVersion = builtins.head (builtins.splitVersion version);
  installerName = "Install_NDI_SDK_v${majorVersion}_Linux";

  src = requireFile rec {
    name    = "${installerName}.tar.gz";
    sha256  = versionJSON.hash;
    message = ''
      In order to use NDI SDK version ${version}, you need to comply with
      NewTek's license and download the appropriate Linux tarball from:

        ${meta.homepage}

      Once you have downloaded the file, please use the following command and
      re-run the installation:

        \$ nix-prefetch-url file://\$PWD/${name}
    '';
  src = fetchurl {
    name = "${pname}-${version}.tar.gz";
    url = "https://downloads.ndi.tv/SDK/NDI_SDK_Linux/${installerName}.tar.gz";
    hash = versionJSON.hash;
  };

  buildInputs = [ avahi ];
@@ -52,6 +42,8 @@ stdenv.mkDerivation rec {
      if [ -L "$i" ]; then continue; fi
      patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" "$i"
    done
    rm $out/bin/libndi.so.${majorVersion}
    ln -s $out/lib/libndi.so.${version} $out/bin/libndi.so.${majorVersion}
    mv include examples $out/
    mkdir -p $out/share/doc/${pname}-${version}
    mv licenses $out/share/doc/${pname}-${version}/licenses