diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix index 18d6df1e2727..3985f8a0c838 100644 --- a/pkgs/tools/misc/youtube-dl/default.nix +++ b/pkgs/tools/misc/youtube-dl/default.nix @@ -1,9 +1,11 @@ -{ manuals ? true -, stdenv, fetchurl, makeWrapper, python, zip, -pandoc ? null -, ffmpeg }: +{ stdenv, fetchurl, makeWrapper, python, zip, ffmpeg, pandoc ? null }: -assert manuals -> pandoc != null; +# Pandoc is required to build the package's man page. Release tarballs +# contain a formatted man page already, though, so it's fine to pass +# "pandoc = null" to this derivation; the man page will still be +# installed. We keep the pandoc argument and build input in place in +# case someone wants to use this derivation to build a Git version of +# the tool that doesn't have the formatted man page included. stdenv.mkDerivation rec { name = "youtube-dl-${version}"; @@ -14,14 +16,9 @@ stdenv.mkDerivation rec { sha256 = "0lgxir2i5ipplg57wk8gnbbsdrk7szqnyb1bxr97f3h0rbm4dfij"; }; - nativeBuildInputs = [ ] - ++ stdenv.lib.optional manuals pandoc; + buildInputs = [ python makeWrapper zip pandoc ]; - buildInputs = [ python makeWrapper zip ]; - - patchPhase = '' - rm youtube-dl - ''; + patchPhase = "rm youtube-dl"; configurePhase = '' makeFlagsArray=( PREFIX=$out SYSCONFDIR=$out/etc PYTHON=${python}/bin/python ) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 024f9cf7bcf5..a3262dc79437 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3385,8 +3385,10 @@ let yi = callPackage ../applications/editors/yi/wrapper.nix { }; youtube-dl = callPackage ../tools/misc/youtube-dl { - manuals = false; - }; + # Release versions don't need pandoc because the formatted man page + # is included in the tarball. + pandoc = null; + }; zbar = callPackage ../tools/graphics/zbar { pygtk = lib.overrideDerivation pygtk (x: {