summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuu Yin <yuuyin@protonmail.com>2023-01-31 17:45:25 -0300
committerYuu Yin <yuuyin@protonmail.com>2023-02-01 22:24:35 -0300
commit57a9c1f8e90053fc3f74f7063571356bc5b5f45c (patch)
tree886aa7efb4ea3bb8467d098b99637c0e52985e11
parent76f4cd83583c8a3238cfd7f4e372340c74870fb2 (diff)
mdbook-epub: init at unstable-2022-12-25
-rw-r--r--pkgs/tools/text/mdbook-epub/default.nix41
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/tools/text/mdbook-epub/default.nix b/pkgs/tools/text/mdbook-epub/default.nix
new file mode 100644
index 000000000000..47c118afa43a
--- /dev/null
+++ b/pkgs/tools/text/mdbook-epub/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, bzip2
+, CoreServices
+}:
+
+let
+ pname = "mdbook-epub";
+ version = "unstable-2022-12-25";
+in rustPlatform.buildRustPackage {
+ inherit pname version;
+
+ src = fetchFromGitHub {
+ owner = "michael-f-bryan";
+ repo = pname;
+ rev = "2e1e48d0d1a1b4c1b0f866267e6666b41c598225";
+ hash = "sha256-wjn/7dv/Z2OmwvH/XaEeCz/JOvJWlMJ60q5qozzOEWY=";
+ };
+
+ cargoHash = "sha256-4oSpQUYJDK0srABZMwJ8x8jv6DOnLShXSnjLjf8c9Ac=";
+
+ nativeBuildInputs = [
+ pkg-config
+ ];
+
+ buildInputs = [
+ bzip2
+ ] ++ lib.optionals stdenv.isDarwin [
+ CoreServices
+ ];
+
+ meta = with lib; {
+ description = "mdbook backend for generating an e-book in the EPUB format";
+ homepage = "https://michael-f-bryan.github.io/mdbook-epub";
+ license = licenses.mpl20;
+ maintainers = with maintainers; [ yuu ];
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 763a6e0e62dd..16ae28f6d795 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -9018,6 +9018,10 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) CoreServices;
};
+ mdbook-epub = callPackage ../tools/text/mdbook-epub {
+ inherit (darwin.apple_sdk.frameworks) CoreServices;
+ };
+
mdbook-cmdrun = callPackage ../tools/text/mdbook-cmdrun { };
mdbook-graphviz = callPackage ../tools/text/mdbook-graphviz {