srt-vtt: init at 2019-01-03 (#70885)

* srt-vtt: init at 2019-01-03

* Append 'unstable' to pname

Co-Authored-By: Marek Mahut <marek.mahut@gmail.com>

* Fix version

* Remove which validation

* Add support to linux only

Co-Authored-By: Evils-Devils <30512529+Evils-Devils@users.noreply.github.com>
This commit is contained in:
Eric Dallo 2019-11-07 19:21:47 -03:00 committed by Matthew Bauer
parent 5076d18d60
commit ccc13c2e53
3 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,32 @@
{ stdenv, fetchFromGitHub, substituteAll }:
stdenv.mkDerivation rec {
pname = "srt-to-vtt-cl";
version = "unstable-2019-01-03";
src = fetchFromGitHub {
owner = "nwoltman";
repo = pname;
rev = "ce3d0776906eb847c129d99a85077b5082f74724";
sha256 = "0qxysj08gjr6npyvg148llmwmjl2n9cyqjllfnf3gxb841dy370n";
};
patches = [
(substituteAll {
src = ./fix-validation.patch;
})
];
installPhase = ''
mkdir -p $out/bin
cp bin/$(uname -s)/$(uname -m)/srt-vtt $out/bin
'';
meta = with stdenv.lib; {
description = "Convert SRT files to VTT";
license = licenses.mit;
maintainers = with maintainers; [ ericdallo ];
homepage = https://github.com/nwoltman/srt-to-vtt-cl;
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,13 @@
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,4 @@
-ERR = $(shell which clang++ >/dev/null; echo $$?)
-ifeq "$(ERR)" "0"
- CXX ?= clang++
-else
- CXX ?= g++
-endif
+CXX ?= g++
CXXFLAGS = -std=c++11 -O2 -MMD -I ./deps
OBJECTS := src/text_encoding_detect.o src/Utils.o src/Converter.o src/main.o
DEPENDS := $(OBJECTS:.o=.d)

View File

@ -6384,6 +6384,8 @@ in
srcml = callPackage ../applications/version-management/srcml { };
srt-to-vtt-cl = callPackage ../tools/cd-dvd/srt-to-vtt-cl { };
sourcehut = callPackage ../applications/version-management/sourcehut { };
sshfs-fuse = callPackage ../tools/filesystems/sshfs-fuse { };