Unverified Commit 0b1a6c8b authored by tomberek's avatar tomberek Committed by GitHub
Browse files

Merge pull request #331558 from emilazy/push-xlsnptznlrsl

harvid: 0.9.0 -> 0.9.1; tidy up
parents e51ab66f 0793d3ec
Loading
Loading
Loading
Loading
+68 −0
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, fetchpatch, ffmpeg_4, libjpeg, libpng, pkg-config }:
{
  lib,
  stdenv,
  fetchFromGitHub,
  pkg-config,
  which,
  unixtools,
  cctools,
  ffmpeg,
  libjpeg,
  libpng,
  nix-update-script,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "harvid";
  version = "0.9.0";
  version = "0.9.1";

  src = fetchFromGitHub {
    owner = "x42";
    repo = "harvid";
    rev = "v${version}";
    sha256 = "sha256-qt6aep7iMF8/lnlT2wLqu6LkFDqzdfsGLZvrOlXttG8=";
    rev = "v${finalAttrs.version}";
    sha256 = "sha256-p0W+rKHH/iuGOcRjl6b4s6jQYkm7bqWCz849SDI/7fQ=";
  };

  patches = [
    # Fix pending upstream inclusion to support parallel builds:
    #   https://github.com/x42/harvid/pull/10
    (fetchpatch {
      name = "parallel-build.patch";
      url = "https://github.com/x42/harvid/commit/a3f85c57ad2559558706d9b22989de36452704d9.patch";
      sha256 = "sha256-0aBfM/4XEqM7C1nFw996IVwaeL0tNgMUQ1C3kblOobI=";
    })
  nativeBuildInputs =
    [ pkg-config ]
    ++ lib.optionals stdenv.isDarwin [
      which
      unixtools.xxd
    ];

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [
    ffmpeg
    libjpeg
    libpng
  ];

  buildInputs = [ ffmpeg_4 libjpeg libpng ];
  postPatch = lib.optionalString stdenv.isDarwin ''
    substituteInPlace libharvid/Makefile \
      --replace-fail /usr/bin/libtool ${cctools}/bin/libtool
  '';

  makeFlags = [ "DESTDIR=$(out)" "libdir=\"/lib\"" ];
  makeFlags = [
    "PREFIX=$(out)"
    "VERSION=v${finalAttrs.version}"
  ];

  postInstall = ''
    mkdir -p $out/bin
    mv $out/usr/local/bin/* $out/bin
    mv $out/usr/local/share $out/
    rm -r $out/usr
  '';
  enableParallelBuilding = true;

  passthru.updateScript = nix-update-script { };

  meta = with lib; {
    description =
      "Decodes still images from movie files and serves them via HTTP";
  meta = {
    description = "Decodes still images from movie files and serves them via HTTP";
    longDescription = ''
      harvid's intended use-case is to efficiently provide frame-accurate data
      and act as second level cache for rendering the video-timeline in Ardour,
@@ -45,9 +60,9 @@ stdenv.mkDerivation rec {
      processor.
    '';
    homepage = "http://x42.github.io/harvid";
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ mitchmindtree ];
    license = lib.licenses.gpl2Plus;
    platforms = lib.platforms.unix;
    maintainers = [ lib.maintainers.mitchmindtree ];
    mainProgram = "harvid";
  };
}
})
+0 −2
Original line number Diff line number Diff line
@@ -3812,8 +3812,6 @@ with pkgs;
  harsh = callPackage ../applications/misc/harsh { };
  harvid = callPackage ../tools/video/harvid { };
  headset = callPackage ../applications/audio/headset { };
  hilbish = callPackage ../shells/hilbish { };