mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
Merge pull request #70388 from davidtwco/mdcat-init
mdcat: init at 0.13.0
This commit is contained in:
commit
e3c3b5f62f
23
pkgs/development/python-modules/ansi2html/default.nix
Normal file
23
pkgs/development/python-modules/ansi2html/default.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, isPy3k, six, mock, nose, setuptools }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ansi2html";
|
||||
version = "1.5.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1a9vihsvd03hb0a4dbiklyy686adp9q2ipl79mkxmdr6gfp8bbln";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ six setuptools ];
|
||||
|
||||
checkInputs = [ mock nose ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Convert text with ANSI color codes to HTML";
|
||||
homepage = http://github.com/ralphbean/ansi2html;
|
||||
license = licenses.lgpl3Plus;
|
||||
maintainers = with maintainers; [ davidtwco ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
32
pkgs/tools/text/mdcat/default.nix
Normal file
32
pkgs/tools/text/mdcat/default.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, Security, ansi2html }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "mdcat";
|
||||
version = "0.13.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lunaryorn";
|
||||
repo = pname;
|
||||
rev = "mdcat-${version}";
|
||||
sha256 = "0xlcpyfmil7sszv4008v4ipqswz49as4nzac0kzmzsb86np191q0";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ (stdenv.lib.optional stdenv.isDarwin Security) openssl ];
|
||||
|
||||
cargoSha256 = "16q17gm59lpjqa18q289cjmjlf2jicag12jz529x5kh11x6bjl8v";
|
||||
|
||||
checkInputs = [ ansi2html ];
|
||||
checkPhase = ''
|
||||
# Skip tests that use the network.
|
||||
cargo test -- --skip terminal::iterm2
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "cat for markdown";
|
||||
homepage = https://github.com/lunaryorn/mdcat;
|
||||
license = with licenses; [ asl20 ];
|
||||
maintainers = with maintainers; [ davidtwco ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -4343,6 +4343,11 @@ in
|
||||
inherit (darwin.apple_sdk.frameworks) CoreServices;
|
||||
};
|
||||
|
||||
mdcat = callPackage ../tools/text/mdcat {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
inherit (pythonPackages) ansi2html;
|
||||
};
|
||||
|
||||
medfile = callPackage ../development/libraries/medfile { };
|
||||
|
||||
memtester = callPackage ../tools/system/memtester { };
|
||||
|
@ -165,6 +165,8 @@ in {
|
||||
|
||||
ansicolor = callPackage ../development/python-modules/ansicolor { };
|
||||
|
||||
ansi2html = callPackage ../development/python-modules/ansi2html { };
|
||||
|
||||
anytree = callPackage ../development/python-modules/anytree {
|
||||
inherit (pkgs) graphviz;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user