summary refs log tree commit diff
path: root/pkgs/tools/text
diff options
context:
space:
mode:
authorZhaofeng Li <hello@zhaofeng.li>2021-12-20 12:22:19 -0800
committerZhaofeng Li <hello@zhaofeng.li>2021-12-20 12:32:01 -0800
commit64fe70cd549854949ced8e687d8e9ea98ec6ccf7 (patch)
tree9ebd799dae4c77130e9354302d515dbb0649a30d /pkgs/tools/text
parentd86330d54e09a30de70dc04e1f97b0b90d7217bb (diff)
downloadnixpkgs-64fe70cd549854949ced8e687d8e9ea98ec6ccf7.tar
nixpkgs-64fe70cd549854949ced8e687d8e9ea98ec6ccf7.tar.gz
nixpkgs-64fe70cd549854949ced8e687d8e9ea98ec6ccf7.tar.bz2
nixpkgs-64fe70cd549854949ced8e687d8e9ea98ec6ccf7.tar.lz
nixpkgs-64fe70cd549854949ced8e687d8e9ea98ec6ccf7.tar.xz
nixpkgs-64fe70cd549854949ced8e687d8e9ea98ec6ccf7.tar.zst
nixpkgs-64fe70cd549854949ced8e687d8e9ea98ec6ccf7.zip
mdbook-linkcheck: init at 0.7.6
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r--pkgs/tools/text/mdbook-linkcheck/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/tools/text/mdbook-linkcheck/default.nix b/pkgs/tools/text/mdbook-linkcheck/default.nix
new file mode 100644
index 00000000000..b37b16876b0
--- /dev/null
+++ b/pkgs/tools/text/mdbook-linkcheck/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security
+, testVersion, mdbook-linkcheck }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "mdbook-linkcheck";
+  version = "0.7.6";
+
+  src = fetchFromGitHub {
+    owner = "Michael-F-Bryan";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-ZEOuA8W05800cnArscaGGOWTgzU6V3/wJiQcSx1MVkY=";
+  };
+
+  cargoSha256 = "sha256-EtPhbKvPHSnmPXemCzOXujlqqfdDSFaJpcZVJoHQq6U=";
+
+  buildInputs = if stdenv.isDarwin then [ Security ] else [ openssl ];
+
+  nativeBuildInputs = lib.optionals (!stdenv.isDarwin) [ pkg-config ];
+
+  OPENSSL_NO_VENDOR = 1;
+
+  doCheck = false; # tries to access network to test broken web link functionality
+
+  passthru.tests.version = testVersion { package = mdbook-linkcheck; };
+
+  meta = with lib; {
+    description = "A backend for `mdbook` which will check your links for you.";
+    homepage = "https://github.com/Michael-F-Bryan/mdbook-linkcheck";
+    license = licenses.mit;
+    maintainers = with maintainers; [ zhaofengli ];
+  };
+}