diff --git a/pkgs/by-name/hm/hm/package.nix b/pkgs/by-name/hm/hm/package.nix new file mode 100644 index 000000000000..4b07d5281eae --- /dev/null +++ b/pkgs/by-name/hm/hm/package.nix @@ -0,0 +1,74 @@ +{ + lib, + stdenv, + fetchFromGitLab, + fetchpatch, + gitUpdater, + cmake, + llvmPackages, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "hm"; + version = "18.0"; + + src = fetchFromGitLab { + domain = "vcgit.hhi.fraunhofer.de"; + owner = "jvet"; + repo = "HM"; + tag = "HM-${finalAttrs.version}"; + hash = "sha256-zWBwrnCNKi2sIopdu2XQj/7IoTsJQzlcIFNNKM0glDQ="; + }; + + patches = [ + (fetchpatch { + name = "fix-building-on-arm.patch"; + url = "https://vcgit.hhi.fraunhofer.de/jvet/HM/-/commit/fd37cd88f557478b591dc0b9157d027354d82e2f.patch"; + hash = "sha256-xP54lBvDabc9Dy1UklH2BJH7fUGLTA4sf9WLt7WzoU8="; + }) + ]; + + cmakeFlags = [ + (lib.cmakeBool "HIGH_BITDEPTH" true) + ]; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + llvmPackages.openmp + ]; + + env.NIX_CFLAGS_COMPILE = toString ( + [ + "-Wno-error=array-bounds" + ] + ++ lib.optionals stdenv.cc.isClang [ + "-Wno-error=bitwise-instead-of-logical" + "-Wno-error=missing-braces" + ] + ); + + installPhase = '' + runHook preInstall + + install -Dm 755 -t $out/bin ../bin/umake/*/*/release/* + + runHook postInstall + ''; + + strictDeps = true; + + passthru = { + updateScript = gitUpdater { rev-prefix = "HM-"; }; + }; + + meta = { + description = "Reference software for HEVC"; + homepage = "https://vcgit.hhi.fraunhofer.de/jvet/HM"; + license = lib.licenses.bsd3; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ jopejoe1 ]; + }; +}) diff --git a/pkgs/by-name/kv/kvazaar/package.nix b/pkgs/by-name/kv/kvazaar/package.nix index dae5ad8d19cf..c6eb811852fc 100644 --- a/pkgs/by-name/kv/kvazaar/package.nix +++ b/pkgs/by-name/kv/kvazaar/package.nix @@ -5,6 +5,9 @@ gitUpdater, testers, cmake, + libtool, + ffmpeg-headless, + hm, }: stdenv.mkDerivation (finalAttrs: { @@ -21,10 +24,19 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/ultravideo/kvazaar/pull/426 postPatch = '' substituteInPlace CMakeLists.txt --replace-fail 'NOT LINUX' 'NOT LINUX AND NOT BSD' + + substituteInPlace tests/util.sh --replace-fail '../libtool' '${lib.getExe libtool}' + substituteInPlace tests/util.sh --replace-fail 'TAppDecoderStatic' '${lib.getExe' hm "TAppDecoder"}' + + chmod +x tests/util.sh ''; nativeBuildInputs = [ cmake ]; + nativeCheckInputs = [ + ffmpeg-headless + ]; + outputs = [ "out" "lib" @@ -32,6 +44,8 @@ stdenv.mkDerivation (finalAttrs: { "man" ]; + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + passthru = { updateScript = gitUpdater { rev-prefix = "v"; }; tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;