2024-04-21 15:54:59 +00:00
{
lib ,
fetchFromGitHub ,
stdenv ,
gitUpdater ,
2024-06-20 14:57:18 +00:00
testers ,
2024-04-21 15:54:59 +00:00
cmake ,
} :
stdenv . mkDerivation ( finalAttrs : {
pname = " x e v d " ;
2024-06-20 14:57:18 +00:00
version = " 0 . 5 . 0 " ;
2024-04-21 15:54:59 +00:00
src = fetchFromGitHub {
owner = " m p e g 5 " ;
repo = " x e v d " ;
rev = " v ${ finalAttrs . version } " ;
2024-06-20 14:57:18 +00:00
hash = " s h a 2 5 6 - D c 2 V 7 7 t + D r Z o 9 2 5 2 F A L 0 e c z r m i k r s e U 0 2 o b 2 R L B d V v U = " ;
2024-04-21 15:54:59 +00:00
} ;
postPatch = ''
echo v $ version > version . txt
'' ;
nativeBuildInputs = [ cmake ] ;
postInstall = ''
ln $ dev/include/xevd /* $ d e v / i n c l u d e /
'' ;
outputs = [
" o u t "
" l i b "
" d e v "
] ;
2024-06-20 14:57:18 +00:00
env . NIX_CFLAGS_COMPILE = toString [ " - l m " ] ;
2024-04-21 15:54:59 +00:00
passthru . updateScript = gitUpdater { rev-prefix = " v " ; } ;
2024-06-20 14:57:18 +00:00
passthru . tests . pkg-config = testers . testMetaPkgConfig finalAttrs . finalPackage ;
2024-04-21 15:54:59 +00:00
meta = {
homepage = " h t t p s : / / g i t h u b . c o m / m p e g 5 / x e v d " ;
description = " e X t r a - f a s t E s s e n t i a l V i d e o D e c o d e r , M P E G - 5 E V C " ;
license = lib . licenses . bsd3 ;
mainProgram = " x e v d _ a p p " ;
2024-06-20 14:57:18 +00:00
pkgConfigModules = [ " x e v d " ] ;
2024-04-21 15:54:59 +00:00
maintainers = with lib . maintainers ; [ jopejoe1 ] ;
platforms = lib . platforms . all ;
2024-07-27 06:49:29 +00:00
# Currently only supports gcc and msvc as compiler, the limitation for clang gets removed in the next release, but that does not fix building on darwin.
broken = ! stdenv . hostPlatform . isx86 || ! stdenv . cc . isGNU ;
2024-04-21 15:54:59 +00:00
} ;
} )