2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, zlib, Cocoa }:
|
2015-03-13 23:06:37 +01:00
|
|
|
|
2020-10-24 02:24:08 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "atomicparsley";
|
2021-08-10 02:48:29 +02:00
|
|
|
version = "20210715.151551.e7ad03a";
|
2015-03-13 23:06:37 +01:00
|
|
|
|
2020-10-24 02:24:08 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wez";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-08-10 02:48:29 +02:00
|
|
|
sha256 = "sha256-77yWwfdEul4uLsUNX1dLwj8K0ilcuBaTVKMyXDvKVx4=";
|
2015-03-13 23:06:37 +01:00
|
|
|
};
|
|
|
|
|
2020-10-24 02:24:08 +02:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2018-11-05 19:12:46 +01:00
|
|
|
|
|
|
|
buildInputs = [ zlib ]
|
2021-01-15 10:19:50 +01:00
|
|
|
++ lib.optionals stdenv.isDarwin [ Cocoa ];
|
2017-03-21 23:35:54 +01:00
|
|
|
|
2020-10-24 02:24:08 +02:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -D AtomicParsley $out/bin/AtomicParsley
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2015-03-13 23:06:37 +01:00
|
|
|
|
2021-08-10 02:48:29 +02:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tests/test.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
# copying files so that we dont need to patch the test.sh
|
|
|
|
checkPhase = ''
|
|
|
|
(
|
|
|
|
cp AtomicParsley ../tests
|
|
|
|
cd ../tests
|
|
|
|
mkdir tests
|
|
|
|
mv *.mp4 tests
|
|
|
|
./test.sh
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-10-24 02:24:08 +02:00
|
|
|
description = "A CLI program for reading, parsing and setting metadata into MPEG-4 files";
|
|
|
|
homepage = "https://github.com/wez/atomicparsley";
|
|
|
|
license = licenses.gpl2Plus;
|
2015-03-13 23:06:37 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ pjones ];
|
|
|
|
};
|
|
|
|
}
|