about summary refs log tree commit diff
path: root/pkgs/tools/video/untrunc-anthwlock/default.nix
blob: 6ec52db7ebfde600c9d1b9be36d100424ef7b0d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ lib, stdenv, fetchFromGitHub, ffmpeg_4, libui, unstableGitUpdater, wrapGAppsHook }:

stdenv.mkDerivation {
  pname = "untrunc-anthwlock";
  version = "unstable-2021-11-21";

  src = fetchFromGitHub {
    owner = "anthwlock";
    repo = "untrunc";
    rev = "d72ec324fbc29eb00b53c7dafeef09f92308962b";
    hash = "sha256-h+aFPhlbEM6EfCKbsJPelBY5ys7kv5K4rbK/HTHeEcw=";
  };

  nativeBuildInputs = [ wrapGAppsHook ];

  buildInputs = [ ffmpeg_4 libui ];

  buildPhase = ''
    runHook preBuild
    make IS_RELEASE=1 untrunc
    make IS_RELEASE=1 untrunc-gui
    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall
    install -D -t $out/bin untrunc untrunc-gui
    runHook postInstall
  '';

  enableParallelBuilding = true;

  passthru.updateScript = unstableGitUpdater { };

  meta = with lib; {
    description = "Restore a truncated mp4/mov (improved version of ponchio/untrunc)";
    homepage = "https://github.com/anthwlock/untrunc";
    license = licenses.gpl2;
    platforms = platforms.all;
    maintainers = [ maintainers.romildo ];
  };
}