Merge pull request #36167 from erikarvstedt/untrunc

untrunc: init at 2018.01.13
This commit is contained in:
Jörg Thalheim 2018-03-01 19:42:18 +00:00 committed by GitHub
commit fd9ce6cb74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 0 deletions

View File

@ -199,6 +199,7 @@
dzabraev = "Maksim Dzabraev <dzabraew@gmail.com>";
e-user = "Alexander Kahl <nixos@sodosopa.io>";
earldouglas = "James Earl Douglas <james@earldouglas.com>";
earvstedt = "Erik Arvstedt <erik.arvstedt@gmail.com>";
ebzzry = "Rommel Martinez <ebzzry@ebzzry.io>";
edanaher = "Evan Danaher <nixos@edanaher.net>";
edef = "edef <edef@edef.eu>";

View File

@ -0,0 +1,39 @@
{ stdenv, gcc, libav_12, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "untrunc-${version}";
version = "2018.01.13";
src = fetchFromGitHub {
owner = "ponchio";
repo = "untrunc";
rev = "3a2e6d0718faf06589f7b9d95c8f966348e537f7";
sha256 = "03ka4lr69k7mikfpcpd95smzdj62v851ididnjyps5a0j06f8087";
};
buildInputs = [ gcc libav_12 ];
# Untrunc uses the internal libav headers 'h264dec.h' and 'config.h'.
# The latter must be created through 'configure'.
libavConfiguredSrc = libav_12.overrideAttrs (oldAttrs: {
name = "libav-configured-src";
outputs = [ "out" ];
phases = [ "unpackPhase" "patchPhase" "configurePhase" "installPhase" ];
installPhase = "cp -r . $out";
});
buildCommand = ''
mkdir -p $out/bin
g++ -o $out/bin/untrunc \
-Wno-deprecated-declarations \
$src/file.cpp $src/main.cpp $src/track.cpp $src/atom.cpp $src/mp4.cpp \
-I$libavConfiguredSrc -lavformat -lavcodec -lavutil
'';
meta = with stdenv.lib; {
description = "Restore a damaged (truncated) mp4, m4v, mov, 3gp video from a similar, undamaged video";
license = licenses.gpl2;
homepage = https://github.com/ponchio/untrunc;
maintainers = [ maintainers.earvstedt ];
};
}

View File

@ -5140,6 +5140,8 @@ with pkgs;
untex = callPackage ../tools/text/untex { };
untrunc = callPackage ../tools/video/untrunc { };
upx = callPackage ../tools/compression/upx { };
uqmi = callPackage ../tools/networking/uqmi { };