{ lib, stdenv, fetchFromGitHub, makeWrapper, file, openssl, }: stdenv.mkDerivation rec { pname = "ctpv"; version = "1.1"; src = fetchFromGitHub { owner = "NikitaIvanovV"; repo = pname; rev = "v${version}"; hash = "sha256-3BQi4m44hBmPkJBFNCg6d9YKRbDZwLxdzBb/NDWTQP4="; }; nativeBuildInputs = [makeWrapper]; buildInputs = [ file # libmagic openssl ]; patches = [ ./allow-up-to-64-types.patch ]; makeFlags = ["PREFIX=$(out)"]; preFixup = '' wrapProgram $out/bin/ctpv \ --set PATH "${lib.makeBinPath []}"; ''; meta = with lib; { description = "File previewer for a terminal"; homepage = "https://github.com/NikitaIvanovV/ctpv"; license = licenses.mit; platforms = platforms.linux; maintainers = [maintainers.wesleyjrz]; }; }