diff options
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r-- | pkgs/tools/text/mdcat/default.nix | 9 | ||||
-rw-r--r-- | pkgs/tools/text/namazu/default.nix | 26 |
2 files changed, 17 insertions, 18 deletions
diff --git a/pkgs/tools/text/mdcat/default.nix b/pkgs/tools/text/mdcat/default.nix index beedabe34ae..93f65f45d37 100644 --- a/pkgs/tools/text/mdcat/default.nix +++ b/pkgs/tools/text/mdcat/default.nix @@ -8,6 +8,7 @@ , Security , ansi2html , installShellFiles +, fetchpatch }: rustPlatform.buildRustPackage rec { @@ -21,6 +22,14 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-aJ7rL+EKa5zWmCmekVuRmdeOwTmVo0IQ+GJ8Ga4iTI0="; }; + patches = [ + # detect wezterm through TERM again which was removed in 0.23.1 + (fetchpatch { + url = "https://github.com/lunaryorn/mdcat/commit/a897b223904748a47c277f7c9a07d59e7d5c916b.patch"; + sha256 = "sha256-tSeNyrlqoGvlfQ3xMRkvqZ7HajMvPCIk7kyt/sVjmTo="; + }) + ]; + nativeBuildInputs = [ pkg-config asciidoctor installShellFiles ]; buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security; diff --git a/pkgs/tools/text/namazu/default.nix b/pkgs/tools/text/namazu/default.nix index e5b3f59db8c..e748515b051 100644 --- a/pkgs/tools/text/namazu/default.nix +++ b/pkgs/tools/text/namazu/default.nix @@ -1,30 +1,21 @@ -{ fetchurl, lib, stdenv, perl }: +{ fetchurl, lib, stdenv, perl, perlPackages, makeWrapper }: stdenv.mkDerivation rec { - name = "namazu-2.0.21"; + pname = "namazu"; + version = "2.0.21"; src = fetchurl { - url = "http://namazu.org/stable/${name}.tar.gz"; + url = "http://namazu.org/stable/${pname}-${version}.tar.gz"; sha256 = "1xvi7hrprdchdpzhg3fvk4yifaakzgydza5c0m50h1yvg6vay62w"; }; - buildInputs = [ perl ]; + buildInputs = [ perl perlPackages.FileMMagic ]; + nativeBuildInputs = [ makeWrapper ]; - # First install the `File::MMagic' Perl module. - preConfigure = '' - ( cd File-MMagic && \ - perl Makefile.PL \ - LIB="$out/${perl.libPrefix}/${perl.version}" \ - INSTALLSITEMAN3DIR="$out/man" && \ - make && make install ) - export PERL5LIB="$out/${perl.libPrefix}/${perl.version}:$PERL5LIB" + postInstall = '' + wrapProgram $out/bin/mknmz --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.FileMMagic ]} ''; - # FIXME: The `tests/namazu-6' test fails on GNU/Linux, presumably because - # phrase searching is broken somehow. However, it doesn't fail on other - # platforms. - doCheck = !stdenv.isLinux; - meta = { description = "Full-text search engine"; @@ -39,6 +30,5 @@ stdenv.mkDerivation rec { platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice maintainers = [ ]; - broken = true; # File-MMagic is not compatible with our Perl version }; } |