Loading pkgs/by-name/li/live555/package.nix +36 −8 Original line number Diff line number Diff line { lib, buildPackages, cctools, fetchpatch, fetchurl, lib, live555, openssl, runCommand, stdenv, vlc, }: let isStatic = stdenv.hostPlatform.isStatic; in stdenv.mkDerivation (finalAttrs: { pname = "live555"; Loading Loading @@ -42,8 +47,8 @@ stdenv.mkDerivation (finalAttrs: { "PREFIX=${placeholder "out"}" "C_COMPILER=$(CC)" "CPLUSPLUS_COMPILER=$(CXX)" "LIBRARY_LINK=$(AR) cr " "LINK=$(CXX) -o " "LIBRARY_LINK=${if isStatic then "$(AR) cr " else "$(CC) -o "}" ]; # Since NIX_CFLAGS_COMPILE affects both C and C++ toolchains, we set CXXFLAGS Loading Loading @@ -83,7 +88,7 @@ stdenv.mkDerivation (finalAttrs: { let platform = if stdenv.hostPlatform.isLinux then "linux" if isStatic then "linux" else "linux-with-shared-libraries" else if stdenv.hostPlatform.isDarwin then "macosx-catalina" else Loading @@ -97,9 +102,32 @@ stdenv.mkDerivation (finalAttrs: { runHook postConfigure ''; passthru.tests = { # Downstream dependency inherit vlc; doInstallCheck = true; installCheckPhase = '' if ! ($out/bin/openRTSP || :) 2>&1 | grep -q "Usage: "; then echo "Executing example program failed" >&2 exit 1 else echo "Example program executed successfully" fi ''; passthru.tests = let emulator = stdenv.hostPlatform.emulator buildPackages; in { # The installCheck phase above cannot be ran in cross-compilation scenarios, # therefore the passthru test run-test-prog = runCommand "live555-run-test-prog" { } '' if ! (${emulator} ${live555}/bin/openRTSP || :) 2>&1 | grep -q "Usage: "; then echo "Executing example program failed" >&2 exit 1 else echo "Example program executed successfully" touch $out fi ''; }; meta = { Loading Loading
pkgs/by-name/li/live555/package.nix +36 −8 Original line number Diff line number Diff line { lib, buildPackages, cctools, fetchpatch, fetchurl, lib, live555, openssl, runCommand, stdenv, vlc, }: let isStatic = stdenv.hostPlatform.isStatic; in stdenv.mkDerivation (finalAttrs: { pname = "live555"; Loading Loading @@ -42,8 +47,8 @@ stdenv.mkDerivation (finalAttrs: { "PREFIX=${placeholder "out"}" "C_COMPILER=$(CC)" "CPLUSPLUS_COMPILER=$(CXX)" "LIBRARY_LINK=$(AR) cr " "LINK=$(CXX) -o " "LIBRARY_LINK=${if isStatic then "$(AR) cr " else "$(CC) -o "}" ]; # Since NIX_CFLAGS_COMPILE affects both C and C++ toolchains, we set CXXFLAGS Loading Loading @@ -83,7 +88,7 @@ stdenv.mkDerivation (finalAttrs: { let platform = if stdenv.hostPlatform.isLinux then "linux" if isStatic then "linux" else "linux-with-shared-libraries" else if stdenv.hostPlatform.isDarwin then "macosx-catalina" else Loading @@ -97,9 +102,32 @@ stdenv.mkDerivation (finalAttrs: { runHook postConfigure ''; passthru.tests = { # Downstream dependency inherit vlc; doInstallCheck = true; installCheckPhase = '' if ! ($out/bin/openRTSP || :) 2>&1 | grep -q "Usage: "; then echo "Executing example program failed" >&2 exit 1 else echo "Example program executed successfully" fi ''; passthru.tests = let emulator = stdenv.hostPlatform.emulator buildPackages; in { # The installCheck phase above cannot be ran in cross-compilation scenarios, # therefore the passthru test run-test-prog = runCommand "live555-run-test-prog" { } '' if ! (${emulator} ${live555}/bin/openRTSP || :) 2>&1 | grep -q "Usage: "; then echo "Executing example program failed" >&2 exit 1 else echo "Example program executed successfully" touch $out fi ''; }; meta = { Loading