{
  bash,
  coreutils,
  ffmpeg,
  findutils,
  fzf,
  gum,
  lib,
  makeWrapper,
  stdenv,
  tree,
  ...
}:
stdenv.mkDerivation (finalAttrs: {
  name = "transcode-davinci-resolve";
  src = ./.;

  buildInputs = [
    bash
    coreutils
    ffmpeg
    findutils
    fzf
    gum
    makeWrapper
    tree
  ];

  installPhase = ''
    install -Dm755 transcode-davinci-resolve.sh $out/bin/transcode-davinci-resolve

    wrapProgram $out/bin/transcode-davinci-resolve \
      --set PATH "${lib.makeBinPath finalAttrs.buildInputs}"
  '';
})
