depot/third_party/nixpkgs/pkgs/tools/video/atomicparsley/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

50 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, zlib, Cocoa }:
stdenv.mkDerivation rec {
pname = "atomicparsley";
version = "20221229.172126.d813aa6";
src = fetchFromGitHub {
owner = "wez";
repo = pname;
rev = version;
sha256 = "sha256-3otyOpDdiltZ0SR1hImfIDBi53PKuAvh93yq1X3Xkmo=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib ]
++ lib.optionals stdenv.isDarwin [ Cocoa ];
installPhase = ''
runHook preInstall
install -D AtomicParsley $out/bin/AtomicParsley
runHook postInstall
'';
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
)
'';
meta = with lib; {
description = "CLI program for reading, parsing and setting metadata into MPEG-4 files";
homepage = "https://github.com/wez/atomicparsley";
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ pjones ];
mainProgram = "AtomicParsley";
};
}