push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
{
lib,
fetchFromGitHub,
nix-update-script,
rustPlatform,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "md-lsp";
version = "0.1.1";
src = fetchFromGitHub {
owner = "matkrin";
repo = "md-lsp";
tag = "v${finalAttrs.version}";
hash = "sha256-LUPZBDiS9jeUZ4r3BhZOK5SeOL7KuXu+Uy7CowzCdjo=";
};
cargoHash = "sha256-YS7ANZlxlRpl4ww/EJM57MTb+5WAW4mH6cQoziFCv18=";
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru = {
updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
};
};
meta = {
description = "Language server implementation for markdown files made in Rust";
homepage = "https://github.com/matkrin/md-lsp";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ mahyarmirrashed ];
mainProgram = "md-lsp";
};
})

View File

@@ -0,0 +1,35 @@
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonPackage rec {
pname = "md-tangle";
version = "1.4.4";
pyproject = true;
# By some strange reason, fetchPypi fails miserably
src = fetchFromGitHub {
owner = "joakimmj";
repo = "md-tangle";
tag = "v${version}";
hash = "sha256-PkOKSsyY8uwS4mhl0lB+KGeUvXfEc7PUDHZapHMYv4c=";
};
build-system = with python3.pkgs; [ setuptools ];
# Pure Python application, uses only standard modules and comes without
# testing suite
doCheck = false;
pythonImportsCheck = [ "md_tangle" ];
meta = with lib; {
homepage = "https://github.com/joakimmj/md-tangle/";
description = "Generates (\"tangles\") source code from Markdown documents";
mainProgram = "md-tangle";
license = licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "md-tui";
version = "0.9.1";
src = fetchFromGitHub {
owner = "henriklovhaug";
repo = "md-tui";
tag = "v${version}";
hash = "sha256-pOo+gifWomZh3hTfqaIRMPEPR5TPinzl8NgYcCit7t4=";
};
cargoHash = "sha256-07U69UdiAqdIv5JVfvbLNfQD/SfPfaiYZsMr6y/r8UY=";
nativeBuildInputs = [ pkg-config ];
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Markdown renderer in the terminal";
homepage = "https://github.com/henriklovhaug/md-tui";
changelog = "https://github.com/henriklovhaug/md-tui/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
GaetanLepage
anas
];
platforms = lib.platforms.all;
mainProgram = "mdt";
};
}

View File

@@ -0,0 +1,44 @@
From 0ab8f5a6ee305cf4edcebfdc7b9eb5f98302de75 Mon Sep 17 00:00:00 2001
From: Leif Middelschulte <Leif.Middelschulte@klsmartin.com>
Date: Fri, 17 Sep 2021 16:16:17 +0200
Subject: [PATCH] pc.in: use _FULL_ variable variants
Nix' cmake packaging handler replaces the CMAKE_INSTALL_INCLUDEDIR
with the absolute path. Which break package
portability (i.e. `prefix`-usage).
---
src/md4c-html.pc.in | 6 ++----
src/md4c.pc.in | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/md4c-html.pc.in b/src/md4c-html.pc.in
index 504bb52..fec7df4 100644
--- a/src/md4c-html.pc.in
+++ b/src/md4c-html.pc.in
@@ -1,7 +1,5 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: @PROJECT_NAME@ HTML renderer
Description: Markdown to HTML converter library.
diff --git a/src/md4c.pc.in b/src/md4c.pc.in
index cd8842d..b5d81f8 100644
--- a/src/md4c.pc.in
+++ b/src/md4c.pc.in
@@ -1,7 +1,5 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: @PROJECT_NAME@
Description: Markdown parser library with a SAX-like callback-based interface.
--
2.31.0

View File

@@ -0,0 +1,78 @@
{
lib,
cmake,
fetchFromGitHub,
pkg-config,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "md4c";
version = "0.5.2";
src = fetchFromGitHub {
owner = "mity";
repo = "md4c";
rev = "release-${finalAttrs.version}";
hash = "sha256-2/wi7nJugR8X2J9FjXJF1UDnbsozGoO7iR295/KSJng=";
};
outputs = [
"out"
"lib"
"dev"
"man"
];
patches = [
# We set CMAKE_INSTALL_LIBDIR to the absolute path in $out, so prefix and
# exec_prefix cannot be $out, too
# Use CMake's _FULL_ variables instead of `prefix` concatenation.
./0001-fix-pkgconfig.patch
];
nativeBuildInputs = [
cmake
pkg-config
];
strictDeps = true;
meta = {
homepage = "https://github.com/mity/md4c";
description = "Markdown parser made in C";
longDescription = ''
MD4C is Markdown parser implementation in C, with the following features:
- Compliance: Generally, MD4C aims to be compliant to the latest version
of CommonMark specification. Currently, we are fully compliant to
CommonMark 0.30.
- Extensions: MD4C supports some commonly requested and accepted
extensions. See below.
- Performance: MD4C is very fast.
- Compactness: MD4C parser is implemented in one source file and one
header file. There are no dependencies other than standard C library.
- Embedding: MD4C parser is easy to reuse in other projects, its API is
very straightforward: There is actually just one function, md_parse().
- Push model: MD4C parses the complete document and calls few callback
functions provided by the application to inform it about a start/end of
every block, a start/end of every span, and with any textual contents.
- Portability: MD4C builds and works on Windows and POSIX-compliant
OSes. (It should be simple to make it run also on most other platforms,
at least as long as the platform provides C standard library, including
a heap memory management.)
- Encoding: MD4C by default expects UTF-8 encoding of the input
document. But it can be compiled to recognize ASCII-only control
characters (i.e. to disable all Unicode-specific code), or (on Windows)
to expect UTF-16 (i.e. what is on Windows commonly called just
"Unicode"). See more details below.
- Permissive license: MD4C is available under the MIT license.
'';
changelog = "https://github.com/mity/md4c/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = with lib.licenses; [ mit ];
maintainers = [ ];
mainProgram = "md2html";
platforms = lib.platforms.all;
};
})
# TODO: enable tests (needs Python)

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchurl,
fftwSinglePrec,
lv2,
pkg-config,
wafHook,
python3,
}:
stdenv.mkDerivation rec {
pname = "mda-lv2";
version = "1.2.6";
src = fetchurl {
url = "https://download.drobilla.net/${pname}-${version}.tar.bz2";
sha256 = "sha256-zWYRcCSuBJzzrKg/npBKcCdyJOI6lp9yqcXQEKSYV9s=";
};
nativeBuildInputs = [
pkg-config
wafHook
python3
];
buildInputs = [
fftwSinglePrec
lv2
];
meta = with lib; {
homepage = "http://drobilla.net/software/mda-lv2.html";
description = "LV2 port of the MDA plugins by Paul Kellett";
license = licenses.gpl2Plus;
maintainers = [ ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/udev.c b/udev.c
index bc4722b0..aa2a1a24 100644
--- a/udev.c
+++ b/udev.c
@@ -167,7 +167,7 @@ enum udev_status udev_block(char *devnm)
int fd;
char *path = xcalloc(1, BUFSIZ);
- snprintf(path, BUFSIZ, "/run/mdadm/creating-%s", devnm);
+ snprintf(path, BUFSIZ, "%s/creating-%s", MAP_DIR, devnm);
fd = open(path, O_CREAT | O_RDWR, 0600);
if (!is_fd_valid(fd)) {

View File

@@ -0,0 +1,124 @@
diff --git a/Makefile b/Makefile
index 2a51d813..a31ac48a 100644
--- a/Makefile
+++ b/Makefile
@@ -63,6 +63,9 @@ endif
ifdef DEBIAN
CPPFLAGS += -DDEBIAN
endif
+ifdef NIXOS
+CPPFLAGS += -DNIXOS
+endif
ifdef DEFAULT_OLD_METADATA
CPPFLAGS += -DDEFAULT_OLD_METADATA
DEFAULT_METADATA=0.90
@@ -129,6 +132,7 @@ endif
INSTALL = /usr/bin/install
DESTDIR =
BINDIR = /sbin
+INSTALL_BINDIR = ${BINDIR}
MANDIR = /usr/share/man
MAN4DIR = $(MANDIR)/man4
MAN5DIR = $(MANDIR)/man5
@@ -253,16 +257,16 @@ sha1.o : sha1.c sha1.h md5.h
install : install-bin install-man install-udev
install-static : mdadm.static install-man
- $(INSTALL) -D $(STRIP) -m 755 mdadm.static $(DESTDIR)$(BINDIR)/mdadm
+ $(INSTALL) -D $(STRIP) -m 755 mdadm.static $(DESTDIR)$(INSTALL_BINDIR)/mdadm
install-tcc : mdadm.tcc install-man
- $(INSTALL) -D $(STRIP) -m 755 mdadm.tcc $(DESTDIR)$(BINDIR)/mdadm
+ $(INSTALL) -D $(STRIP) -m 755 mdadm.tcc $(DESTDIR)$(INSTALL_BINDIR)/mdadm
install-uclibc : mdadm.uclibc install-man
- $(INSTALL) -D $(STRIP) -m 755 mdadm.uclibc $(DESTDIR)$(BINDIR)/mdadm
+ $(INSTALL) -D $(STRIP) -m 755 mdadm.uclibc $(DESTDIR)$(INSTALL_BINDIR)/mdadm
install-klibc : mdadm.klibc install-man
- $(INSTALL) -D $(STRIP) -m 755 mdadm.klibc $(DESTDIR)$(BINDIR)/mdadm
+ $(INSTALL) -D $(STRIP) -m 755 mdadm.klibc $(DESTDIR)$(INSTALL_BINDIR)/mdadm
install-man: mdadm.8 md.4 mdadm.conf.5 mdmon.8
$(INSTALL) -D -m 644 mdadm.8 $(DESTDIR)$(MAN8DIR)/mdadm.8
@@ -305,7 +309,7 @@ install-bin: mdadm mdmon
$(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon
uninstall:
- rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(BINDIR)/mdadm
+ rm -f $(DESTDIR)$(MAN8DIR)/mdadm.8 $(DESTDIR)$(MAN8DIR)/mdmon.8 $(DESTDIR)$(MAN4DIR)/md.4 $(DESTDIR)$(MAN5DIR)/mdadm.conf.5 $(DESTDIR)$(INSTALL_BINDIR)/mdadm
test: mdadm mdmon test_stripe swap_super raid6check
@echo "Please run './test' as root"
diff --git a/policy.c b/policy.c
index eee9ef63..9f916e9d 100644
--- a/policy.c
+++ b/policy.c
@@ -817,12 +817,39 @@ char *find_rule(struct rule *rule, char *rule_type)
#define UDEV_RULE_FORMAT \
"ACTION==\"add\", SUBSYSTEM==\"block\", " \
"ENV{DEVTYPE}==\"%s\", ENV{ID_PATH}==\"%s\", " \
-"RUN+=\"" BINDIR "/mdadm --incremental $env{DEVNAME}\"\n"
+"RUN+=\"%s/mdadm --incremental $env{DEVNAME}\"\n"
#define UDEV_RULE_FORMAT_NOTYPE \
"ACTION==\"add\", SUBSYSTEM==\"block\", " \
"ENV{ID_PATH}==\"%s\", " \
-"RUN+=\"" BINDIR "/mdadm --incremental $env{DEVNAME}\"\n"
+"RUN+=\"%s/mdadm --incremental $env{DEVNAME}\"\n"
+
+#ifdef NIXOS
+const char *get_mdadm_bindir(void)
+{
+ static char *bindir = NULL;
+ if (bindir != NULL) {
+ return bindir;
+ } else {
+ int len;
+ bindir = xmalloc(1025);
+ len = readlink("/proc/self/exe", bindir, 1024);
+ if (len > 0) {
+ char *basename;
+ if ((basename = strrchr(bindir, '/')) != NULL)
+ *basename = '\0';
+ else
+ *(bindir + len) = '\0';
+ } else {
+ *bindir = '\0';
+ }
+ return bindir;
+ }
+}
+#define SELF get_mdadm_bindir()
+#else
+#define SELF BINDIR
+#endif
/* Write rule in the rule file. Use format from UDEV_RULE_FORMAT */
int write_rule(struct rule *rule, int fd, int force_part)
@@ -836,9 +863,9 @@ int write_rule(struct rule *rule, int fd, int force_part)
if (force_part)
typ = type_part;
if (typ)
- snprintf(line, sizeof(line) - 1, UDEV_RULE_FORMAT, typ, pth);
+ snprintf(line, sizeof(line) - 1, UDEV_RULE_FORMAT, typ, pth, SELF);
else
- snprintf(line, sizeof(line) - 1, UDEV_RULE_FORMAT_NOTYPE, pth);
+ snprintf(line, sizeof(line) - 1, UDEV_RULE_FORMAT_NOTYPE, pth, SELF);
return write(fd, line, strlen(line)) == (int)strlen(line);
}
diff --git a/util.c b/util.c
index 3d05d074..e004a798 100644
--- a/util.c
+++ b/util.c
@@ -1913,7 +1913,9 @@ int start_mdmon(char *devnm)
char pathbuf[1024];
char *paths[4] = {
pathbuf,
+#ifndef NIXOS
BINDIR "/mdmon",
+#endif
"./mdmon",
NULL
};

View File

@@ -0,0 +1,91 @@
{
lib,
stdenv,
util-linux,
coreutils,
fetchurl,
groff,
system-sendmail,
udev,
udevCheckHook,
}:
stdenv.mkDerivation rec {
pname = "mdadm";
version = "4.3";
src = fetchurl {
url = "mirror://kernel/linux/utils/raid/mdadm/mdadm-${version}.tar.xz";
sha256 = "sha256-QWcnrh8QgOpuMJDOo23QdoJvw2kVHjarc2VXupIZb58=";
};
patches = [
./no-self-references.patch
./fix-hardcoded-mapdir.patch
# Fixes build on musl
(fetchurl {
url = "https://raw.githubusercontent.com/void-linux/void-packages/e58d2b17d3c40faffc0d426aab00184f28d9dafa/srcpkgs/mdadm/patches/musl.patch";
hash = "sha256-TIcQs+8RM5Q6Z8MHkI50kaJd7f9WdS/EVI16F7b2+SA=";
})
# Fixes build on musl 1.2.5+
(fetchurl {
url = "https://lore.kernel.org/linux-raid/20240220165158.3521874-1-raj.khem@gmail.com/raw";
hash = "sha256-JOZ8n7zi+nq236NPpB4e2gUy8I3l3DbcoLhpeL73f98=";
})
(fetchurl {
url = "https://github.com/md-raid-utilities/mdadm/commit/9dbd11e091f84eb0bf9d717283774816c4c4453d.patch";
hash = "sha256-8GdjP1ceVwejTOFXcHXG8wkIF9/D6hOUGD6btvuqs24=";
})
];
makeFlags = [
"NIXOS=1"
"INSTALL=install"
"BINDIR=$(out)/sbin"
"SYSTEMD_DIR=$(out)/lib/systemd/system"
"MANDIR=$(out)/share/man"
"RUN_DIR=/dev/.mdadm"
"STRIP="
]
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
installFlags = [ "install-systemd" ];
enableParallelBuilding = true;
buildInputs = [ udev ];
nativeBuildInputs = [
groff
udevCheckHook
];
doInstallCheck = true;
postPatch = ''
sed -e 's@/lib/udev@''${out}/lib/udev@' \
-e 's@ -Werror @ @' \
-e 's@/usr/sbin/sendmail@${system-sendmail}/bin/sendmail@' -i Makefile
sed -i \
-e 's@/usr/bin/basename@${coreutils}/bin/basename@g' \
-e 's@BINDIR/blkid@${util-linux}/bin/blkid@g' \
*.rules
'';
# This is to avoid self-references, which causes the initrd to explode
# in size and in turn prevents mdraid systems from booting.
postFixup = ''
grep -r $out $out/bin && false || true
'';
meta = with lib; {
description = "Programs for managing RAID arrays under Linux";
homepage = "https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git";
license = licenses.gpl2Plus;
mainProgram = "mdadm";
maintainers = with maintainers; [ ekleog ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-admonish";
version = "1.20.0";
src = fetchFromGitHub {
owner = "tommilligan";
repo = "mdbook-admonish";
tag = "v${version}";
hash = "sha256-5SVYfXXY1EmEMuhPHao3w9OzSayQDOWWvhL+1JoudzA=";
};
cargoHash = "sha256-PwYtqde8ZccMqlkKy7i/qjWDYsUoxs2cMWOWrChjMM4=";
meta = {
description = "Preprocessor for mdbook to add Material Design admonishments";
mainProgram = "mdbook-admonish";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
jmgilman
Frostman
matthiasbeyer
];
homepage = "https://github.com/tommilligan/mdbook-admonish";
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-alerts";
version = "0.8.0";
src = fetchFromGitHub {
owner = "lambdalisue";
repo = "rs-mdbook-alerts";
rev = "v${version}";
hash = "sha256-82WbO/j9F0WKGkSkTf27dGdxdHF3OONFvn68ujWMwSM=";
};
cargoHash = "sha256-A+jodjynhQ6WFp/Ci5Jk0+baDx6QzJ8u+UMmLugtJUc=";
meta = {
description = "Preprocessor for mdbook to support the inclusion of Markdown alerts";
mainProgram = "mdbook-alerts";
homepage = "https://github.com/lambdalisue/rs-mdbook-alerts";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
brianmcgillion
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
mdbook,
nodePackages,
python3,
util-linux,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage {
pname = "mdbook-cmdrun";
version = "0.6.0-unstable-2024-04-15";
src = fetchFromGitHub {
owner = "FauconFan";
repo = "mdbook-cmdrun";
rev = "d1fef67f100563c2a433b1f5dd5a71810db6b90d";
hash = "sha256-Q2h64XCyDxLmmCNC3wTw81pBotaMEUjY5y0Oq6q20cQ=";
};
nativeCheckInputs = [
mdbook # used by tests/book.rs
nodePackages.nodejs # used by tests/regression/inline_call/input.md
python3 # used by tests/regression/py_*
util-linux # used by tests/regression/shell/input.md
];
cargoHash = "sha256-C3Rg+WXHBA7KyUDFdhBz4mOm8CFH/f7UVA8KOLs9ClE=";
meta = with lib; {
description = "mdbook preprocessor to run arbitrary commands";
mainProgram = "mdbook-cmdrun";
homepage = "https://github.com/FauconFan/mdbook-cmdrun";
license = licenses.mit;
maintainers = with maintainers; [
pinpox
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-d2";
version = "0.3.6";
src = fetchFromGitHub {
owner = "danieleades";
repo = "mdbook-d2";
rev = "v${version}";
hash = "sha256-2mpGufQvnIForU0X96Mi65r2xQ+bIj9MdJugMXVPcnM=";
};
cargoHash = "sha256-K4vovc78MiLkWMVS4YDuSK9L7EmwpGdZXdRqeELcPT8=";
doCheck = false;
meta = with lib; {
description = "D2 diagram generator plugin for MdBook";
mainProgram = "mdbook-d2";
homepage = "https://github.com/danieleades/mdbook-d2";
changelog = "https://github.com/danieleades/mdbook-d2/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ matthiasbeyer ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-emojicodes";
version = "0.3.0";
src = fetchFromGitHub {
owner = "blyxyas";
repo = "mdbook-emojicodes";
rev = "${version}";
hash = "sha256-dlvfY2AMBvTl0j9YaT+u4CeWQGGihFD8AZaAK4/hUWU=";
};
cargoHash = "sha256-+VVkrXvsqtizeVhfuO0U8ADfSkmovpT7DVwrz7QljU0=";
meta = {
description = "MDBook preprocessor for converting emojicodes (e.g. `: cat :`) into emojis";
mainProgram = "mdbook-emojicodes";
homepage = "https://github.com/blyxyas/mdbook-emojicodes";
changelog = "https://github.com/blyxyas/mdbook-emojicodes/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
bzip2,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-epub";
version = "0.4.37";
src = fetchFromGitHub {
owner = "michael-f-bryan";
repo = "mdbook-epub";
tag = version;
hash = "sha256-ddWClkeGabvqteVUtuwy4pWZGnarrKrIbuPEe62m6es=";
};
cargoHash = "sha256-3R81PJCOFc22QDHH2BqGB9jjvEcMc1axoySSJLJD3wI=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ bzip2 ];
meta = {
description = "mdbook backend for generating an e-book in the EPUB format";
mainProgram = "mdbook-epub";
homepage = "https://michael-f-bryan.github.io/mdbook-epub";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-footnote";
version = "0.1.1";
src = fetchFromGitHub {
owner = "daviddrysdale";
repo = "mdbook-footnote";
tag = "v${version}";
hash = "sha256-WUMgm1hwsU9BeheLfb8Di0AfvVQ6j92kXxH2SyG3ses=";
};
cargoHash = "sha256-3tuejWMZlEAOgnBKEqZP2a72a8QP1yamfE/g2BJDEbg=";
meta = {
description = "Preprocessor for mdbook to support the inclusion of automatically numbered footnotes";
mainProgram = "mdbook-footnote";
homepage = "https://github.com/daviddrysdale/mdbook-footnote";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
brianmcgillion
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
fetchFromGitHub,
rustPlatform,
graphviz,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-graphviz";
version = "0.2.1";
src = fetchFromGitHub {
owner = "dylanowen";
repo = "mdbook-graphviz";
# Upstream has rewritten tags before:
# https://github.com/dylanowen/mdbook-graphviz/issues/180
rev = "6e368ad745934fb9e10f224cfc0dc15d4f6fa114";
hash = "sha256-f02SOyU5REm+uP4/vB/1yG9M0Vg8ShF2hj5NKuh0jLU=";
};
cargoHash = "sha256-A1pFifxshWynwA88iLTMOm21NKCH8fHl5nFiV4wEG8A=";
nativeCheckInputs = [ graphviz ];
meta = {
description = "Preprocessor for mdbook, rendering Graphviz graphs to HTML at build time";
mainProgram = "mdbook-graphviz";
homepage = "https://github.com/dylanowen/mdbook-graphviz";
changelog = "https://github.com/dylanowen/mdbook-graphviz/releases/tag/v${version}";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
lovesegfault
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-i18n-helpers";
version = "0.3.6";
src = fetchFromGitHub {
owner = "google";
repo = "mdbook-i18n-helpers";
# TODO fix once upstream uses semver for tags again
tag = "mdbook-i18n-helpers-${version}";
hash = "sha256-9sJ9FK85UzY3ggh3h1fipbh0LraTvQJ0ZfhSGcahiDM=";
};
cargoHash = "sha256-ZinW9UFp03LXtk+9vuSNojVZtaA7uBlrpdapY48nZdY=";
meta = {
description = "Helpers for a mdbook i18n workflow based on Gettext";
homepage = "https://github.com/google/mdbook-i18n-helpers";
changelog = "https://github.com/google/mdbook-i18n-helpers/releases/tag/${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
teutat3s
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
rustPlatform,
fetchCrate,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-katex";
version = "0.9.4";
src = fetchCrate {
inherit pname version;
hash = "sha256-xwIW8igfxO9vsck8ktDBc7XFLuYzwqI3I4nLDTYC8JI=";
};
cargoHash = "sha256-ULcjcY+CaVSohSzlm4KbSgG27IZyxX8zp8ifZNj5c54=";
meta = {
description = "Preprocessor for mdbook, rendering LaTeX equations to HTML at build time";
mainProgram = "mdbook-katex";
homepage = "https://github.com/lzanini/${pname}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
lovesegfault
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-kroki-preprocessor";
version = "0.2.1";
src = fetchFromGitHub {
owner = "joelcourtney";
repo = "mdbook-kroki-preprocessor";
rev = "v${version}";
hash = "sha256-rTXieHa/EIg69vUQE2FOD1Xb4cUVe5CvBiv9CnhHB3I=";
};
cargoHash = "sha256-aTtjrCl13oOKqwPGiVlOfjGqAdBS94XGjcvn3bBWpa0=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
];
meta = with lib; {
description = "Render Kroki diagrams from files or code blocks in mdbook";
mainProgram = "mdbook-kroki-preprocessor";
homepage = "https://github.com/joelcourtney/mdbook-kroki-preprocessor";
license = licenses.gpl3Only;
maintainers = with maintainers; [
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
pkg-config,
openssl,
testers,
mdbook-linkcheck,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-linkcheck";
version = "0.7.7";
src = fetchFromGitHub {
owner = "Michael-F-Bryan";
repo = "mdbook-linkcheck";
rev = "v${version}";
sha256 = "sha256-ZbraChBHuKAcUA62EVHZ1RygIotNEEGv24nhSPAEj00=";
};
cargoHash = "sha256-Tt7ljjWv2CMtP/ELZNgSH/ifmBk/42+E0r9ZXQEJNP8=";
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ openssl ];
nativeBuildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ pkg-config ];
OPENSSL_NO_VENDOR = 1;
doCheck = false; # tries to access network to test broken web link functionality
passthru.tests.version = testers.testVersion { package = mdbook-linkcheck; };
meta = with lib; {
description = "Backend for `mdbook` which will check your links for you";
mainProgram = "mdbook-linkcheck";
homepage = "https://github.com/Michael-F-Bryan/mdbook-linkcheck";
license = licenses.mit;
maintainers = with maintainers; [
zhaofengli
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage {
pname = "mdbook-man";
version = "0-unstable-2022-11-05";
src = fetchFromGitHub {
owner = "vv9k";
repo = "mdbook-man";
rev = "b9537dfbb241d7456835ed7e9d27ab8c8184e5f6";
hash = "sha256-ssAk60jnwYzAjseL26/3FaDv1vBAylgdE+vLhWZ8It4=";
};
cargoHash = "sha256-+CD7+pYAoKRmkMZPpEru6lug9sBakrL0rLXs78e3tqk=";
meta = with lib; {
description = "Generate manual pages from mdBooks";
mainProgram = "mdbook-man";
homepage = "https://github.com/vv9k/mdbook-man";
license = licenses.mit;
maintainers = with maintainers; [ matthiasbeyer ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-mermaid";
version = "0.16.0";
src = fetchFromGitHub {
owner = "badboy";
repo = "mdbook-mermaid";
tag = "v${version}";
hash = "sha256-Zn8jMlohSGlQFyKCUscS/jMiOU8kVzLva0GpHCMeOXc=";
};
cargoHash = "sha256-AgFSsEDtOE4HKhJbqC0y0R5G79jHksEnhKd5/humaK0=";
meta = {
description = "Preprocessor for mdbook to add mermaid.js support";
mainProgram = "mdbook-mermaid";
homepage = "https://github.com/badboy/mdbook-mermaid";
changelog = "https://github.com/badboy/mdbook-mermaid/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
xrelkd
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-open-on-gh";
version = "2.4.3";
src = fetchFromGitHub {
owner = "badboy";
repo = "mdbook-open-on-gh";
rev = version;
hash = "sha256-73738Vei7rQ67LQIOrHPGOtsBnHClaXClRWDmA5pP58=";
};
cargoHash = "sha256-6BR/xXo5pBv7n5beqgY9kEe24o/lZl1sit0uumSEbe8=";
meta = with lib; {
description = "mdbook preprocessor to add a open-on-github link on every page";
mainProgram = "mdbook-open-on-gh";
homepage = "https://github.com/badboy/mdbook-open-on-gh";
license = [ licenses.mpl20 ];
maintainers = with maintainers; [ matthiasbeyer ];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-pagetoc";
version = "0.2.2";
src = fetchFromGitHub {
owner = "slowsage";
repo = "mdbook-pagetoc";
rev = "v${version}";
hash = "sha256-l3CR/ax1i2SJPxIubQUUJ5Hz/8uNl383YeHs8XZ8WGI=";
};
cargoHash = "sha256-Ktui+bA1r1M1IfqWwMRAEF4JKEWmLN7Cx3AbRmv6RVc=";
meta = with lib; {
description = "Table of contents for mdbook (in sidebar)";
mainProgram = "mdbook-pagetoc";
homepage = "https://github.com/slowsage/mdbook-pagetoc";
license = licenses.mit;
maintainers = with maintainers; [
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
callPackage,
fetchFromGitHub,
stdenv,
makeWrapper,
pandoc,
rustPlatform,
texliveSmall,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-pandoc";
version = "0.10.5";
src = fetchFromGitHub {
owner = "max-heller";
repo = "mdbook-pandoc";
tag = "v${version}";
hash = "sha256-ihKju9XXJy4JciuMLw4EcKhqSQjrBiUJDG0Rd5DbFdk=";
};
cargoHash = "sha256-SXXzGOBvfyLYhed5EMFUCzkFWoGEMM73PD3uWjkUcic=";
nativeBuildInputs = [ makeWrapper ];
nativeCheckInputs = [
pandoc
# some tests require pdflatex
texliveSmall
];
checkFlags =
let
skippedTests = [
# failing subtly
"tests::html::rust_reference_regression_nested_elements"
"tests::css::css"
"tests::definition_lists::dt_attributes"
"tests::html::attach_id_to_div_of_stripped_html_elements"
"tests::html::link_to_element_by_id"
"tests::images::images"
]
++ lib.optional stdenv.buildPlatform.isDarwin "pandoc::tests::five_item_deep_list";
in
builtins.map (x: "--skip " + x) skippedTests;
passthru = {
wrapper = callPackage ./wrapper.nix { };
};
meta = {
homepage = "https://github.com/max-heller/mdbook-pandoc";
description = "A mdbook backend powered by Pandoc";
changelog = "https://github.com/max-heller/mdbook-pandoc/releases/tag/${src.tag}";
license = with lib.licenses; [
asl20
# or
mit
];
maintainers = with lib.maintainers; [
astro
];
};
}

View File

@@ -0,0 +1,14 @@
{
mdbook-pandoc,
pandoc,
symlinkJoin,
}:
symlinkJoin {
name = "mdbook-pandoc-wrapped-${mdbook-pandoc.version}";
paths = [
mdbook-pandoc
pandoc
];
}

View File

@@ -0,0 +1,33 @@
{
lib,
python3Packages,
fetchPypi,
}:
python3Packages.buildPythonApplication rec {
pname = "mdbook-pdf-outline";
version = "0.1.6";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "mdbook_pdf_outline";
hash = "sha256-GPTDlgYpfPtcq+rJCjxgexfViYiqHoVZ8iQkyWXNogw=";
};
nativeBuildInputs = [
python3Packages.setuptools
];
propagatedBuildInputs = [
python3Packages.lxml
python3Packages.pypdf
];
meta = with lib; {
homepage = "https://github.com/HollowMan6/mdbook-pdf";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ hollowman6 ];
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
fetchCrate,
rustPlatform,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-pdf";
version = "0.1.11";
src = fetchCrate {
inherit pname version;
hash = "sha256-1VMVobiRCCUv8aWLxNbaDSvNs1Pt2jlsVPzfrieOudc=";
};
cargoHash = "sha256-t3dlmeJNaHySIhJdJmSaeS0mXM7TgAUa/0hcG06lHvo=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
# Stop downloading from the Internet to
# generate the Chrome Devtools Protocol
env.DOCS_RS = true;
# Stop formatting with rustfmt
env.DO_NOT_FORMAT = true;
# No test.
doCheck = false;
meta = {
description = "Backend for mdBook written in Rust for generating PDF";
mainProgram = "mdbook-pdf";
homepage = "https://github.com/HollowMan6/mdbook-pdf";
changelog = "https://github.com/HollowMan6/mdbook-pdf/releases/tag/v${version}";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
hollowman6
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage {
pname = "mdbook-plantuml";
version = "0.8.0-unstable-2022-12-28";
src = fetchFromGitHub {
owner = "sytsereitsma";
repo = "mdbook-plantuml";
rev = "c156b53aad6d7bce8479e5406a4a3465c12714ef";
hash = "sha256-5/6NQO++MsV7GS69jGkdpkiRhadtQyYZeHreft4h6hQ=";
};
cargoHash = "sha256-LzzAaWLDODbqGNVeEULLOgrpyLGKzaknIbLjKyF2zBw=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
meta = {
description = "mdBook preprocessor to render PlantUML diagrams to png images in the book output directory";
mainProgram = "mdbook-plantuml";
homepage = "https://github.com/sytsereitsma/mdbook-plantuml";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
jcouyang
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-toc";
version = "0.14.2";
src = fetchFromGitHub {
owner = "badboy";
repo = "mdbook-toc";
tag = version;
sha256 = "sha256-OFNp+kFDafYbzqb7xfPTO885cAjgWfNeDvUPDKq5GJU=";
};
cargoHash = "sha256-0x/x3TRwRinQ/uLCQoRrJOE/mc2snkL/MCz76nQqb5E=";
meta = {
description = "Preprocessor for mdbook to add inline Table of Contents support";
mainProgram = "mdbook-toc";
homepage = "https://github.com/badboy/mdbook-toc";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ matthiasbeyer ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
rustPlatform,
fetchFromGitLab,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-variables";
version = "0.2.4";
src = fetchFromGitLab {
owner = "tglman";
repo = "mdbook-variables";
rev = version;
hash = "sha256-whvRCV1g2avKegfQpMgYi+E6ETxT2tQqVS2SWRpAqF8=";
};
cargoHash = "sha256-WLHXeYNfALa7GfFAHEO9PAlFKB2lbDefgAYCn6G0U6Y=";
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
meta = {
description = "mdBook preprocessor to replace values with env variables";
mainProgram = "mdbook-variables";
homepage = "https://gitlab.com/tglman/mdbook-variables";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ kraftnix ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
rustPlatform,
fetchCrate,
nix-update-script,
}:
let
pname = "mdbook-yml-header";
version = "0.1.4";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchCrate {
inherit pname version;
hash = "sha256-qRAqZUKOiXTh4cJjczBQ9zAL6voaDvko7elfE6eB2jA=";
};
cargoHash = "sha256-C8M2Y7igeDmi337GXWmLcwNTGr1/CTHWWTuMPDtkqxs=";
passthru.updateScript = nix-update-script { };
meta = {
description = "MdBook preprocessor for removing yml header within --- (front-matter)";
homepage = "https://github.com/dvogt23/mdbook-yml-header";
license = lib.licenses.mpl20;
sourceProvenance = [ lib.sourceTypes.fromSource ];
mainProgram = "mdbook-yml-header";
maintainers = [ lib.maintainers.pinage404 ];
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
nix,
rustPlatform,
installShellFiles,
}:
let
version = "0.4.52";
in
rustPlatform.buildRustPackage rec {
inherit version;
pname = "mdbook";
src = fetchFromGitHub {
owner = "rust-lang";
repo = "mdBook";
tag = "v${version}";
hash = "sha256-a3GSMz1+8Ve5cp4x1NjBlsCU/wMC4Jl3/H9qx7+1XlI=";
};
cargoHash = "sha256-wvTixSVHXglJM+nBMulZNZKF8pZfNd2G8Z+1PlAWmpk=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd mdbook \
--bash <($out/bin/mdbook completions bash) \
--fish <($out/bin/mdbook completions fish) \
--zsh <($out/bin/mdbook completions zsh )
'';
passthru = {
tests = {
inherit nix;
};
};
meta = {
description = "Create books from MarkDown";
mainProgram = "mdbook";
homepage = "https://github.com/rust-lang/mdBook";
changelog = "https://github.com/rust-lang/mdBook/blob/v${version}/CHANGELOG.md";
license = [ lib.licenses.mpl20 ];
maintainers = with lib.maintainers; [
havvy
Frostman
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,70 @@
{
stdenv,
lib,
fetchFromGitHub,
glib,
readline,
bison,
flex,
pkg-config,
autoreconfHook,
txt2man,
which,
gettext,
nix-update-script,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mdbtools";
version = "1.0.1";
src = fetchFromGitHub {
owner = "mdbtools";
repo = "mdbtools";
tag = "v${finalAttrs.version}";
hash = "sha256-XWkFgQZKx9/pjVNEqfp9BwgR7w3fVxQ/bkJEYUvCXPs=";
};
configureFlags = [ "--disable-scrollkeeper" ];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=unused-but-set-variable";
nativeBuildInputs = [
pkg-config
bison
flex
autoreconfHook
txt2man
which
];
buildInputs = [
glib
readline
];
postUnpack = ''
cp -v ${gettext}/share/gettext/m4/lib-{link,prefix,ld}.m4 source/m4
'';
enableParallelBuilding = true;
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/mdb-ver";
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://github.com/mdbtools/mdbtools/releases/tag/v${finalAttrs.version}";
description = ".mdb (MS Access) format tools";
homepage = "https://mdbtools.github.io/";
license = with lib.licenses; [
gpl2Plus
lgpl2
];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,27 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage {
pname = "mdctags";
version = "unstable-2020-06-11"; # v0.1.0 does not build with our rust version
src = fetchFromGitHub {
owner = "wsdjeg";
repo = "mdctags.rs";
rev = "0ed9736ea0c77e6ff5b560dda46f5ed0a983ed82";
sha256 = "14gryhgh9czlkfk75ml0620c6v8r74i6h3ykkkmc7gx2z8h1jxrb";
};
cargoHash = "sha256-xg9tBBo3Al8x0HkgRnfdZybcjaHsNMv/Ot3NwGiHkBg=";
meta = {
description = "Tags for markdown file";
homepage = "https://github.com/wsdjeg/mdctags.rs";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ euxane ];
mainProgram = "mdctags";
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchFromGitLab,
autoreconfHook,
boost,
llvmPackages,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mdds";
version = "2.1.1";
src = fetchFromGitLab {
owner = "mdds";
repo = "mdds";
rev = finalAttrs.version;
hash = "sha256-a412LpgDiYM8TMToaUrTlHtblYS1HehzrDOwvIAAxiA=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ];
nativeCheckInputs = [ boost ];
postInstall = ''
mkdir -p $out/lib/
mv $out/share/pkgconfig $out/lib/
'';
meta = with lib; {
homepage = "https://gitlab.com/mdds/mdds";
description = "Collection of multi-dimensional data structure and indexing algorithms";
changelog = "https://gitlab.com/mdds/mdds/-/blob/${finalAttrs.version}/CHANGELOG";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.unix;
};
})
# TODO: multi-output

View File

@@ -0,0 +1,52 @@
{
lib,
rustPlatform,
fetchCrate,
docutils,
installShellFiles,
udevCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "mdevctl";
version = "1.4.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-Zh+Dj3X87tTpqT/weZMpf7f3obqikjPy9pi50ifp6wQ=";
};
# https://github.com/mdevctl/mdevctl/issues/111
patches = [
./script-dir.patch
];
cargoHash = "sha256-LG5UaSUTF6pVx7BBLiZ/OmAZNCKswFlTqHymg3bDkuc=";
nativeBuildInputs = [
docutils
installShellFiles
udevCheckHook
];
doInstallCheck = true;
postInstall = ''
ln -s mdevctl $out/bin/lsmdev
install -Dm444 60-mdevctl.rules -t $out/lib/udev/rules.d
installManPage $releaseDir/build/mdevctl-*/out/mdevctl.8
ln -s mdevctl.8 $out/share/man/man8/lsmdev.8
installShellCompletion $releaseDir/build/mdevctl-*/out/{lsmdev,mdevctl}.bash
'';
meta = with lib; {
homepage = "https://github.com/mdevctl/mdevctl";
description = "Mediated device management utility for linux";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ edwtjo ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/src/environment.rs b/src/environment.rs
index 3db5933..f6da56c 100644
--- a/src/environment.rs
+++ b/src/environment.rs
@@ -35,7 +35,7 @@ pub trait Environment {
}
fn scripts_base(&self) -> PathBuf {
- self.root().join("usr/lib/mdevctl/scripts.d")
+ self.root().join("etc/mdevctl/scripts.d")
}
fn callout_dir(&self) -> PathBuf {

View File

@@ -0,0 +1,25 @@
{
lib,
stdenv,
fetchgit,
}:
stdenv.mkDerivation rec {
pname = "mdf2iso";
version = "0.3.1";
src = fetchgit {
url = "https://salsa.debian.org/debian/mdf2iso";
rev = "c6a5b588318d43bc8af986bbe48d0a06e92f4280";
sha256 = "0xg43jlvrk8adfjgbjir15nxwcj0nhz4gxpqx7jdfvhg0kwliq0n";
};
meta = with lib; {
description = "Small utility that converts MDF images to ISO format";
homepage = src.url;
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = [ maintainers.oxij ];
mainProgram = "mdf2iso";
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
python3,
runCommand,
}:
let
python = python3;
# selector is a function mapping pythonPackages to a list of plugins
# e.g. `mdformat.withPlugins (ps: with ps; [ mdformat-footnote ])`
withPlugins =
selector:
runCommand "mdformat-wrapped"
{
inherit (python.pkgs.mdformat) pname version meta;
nativeBuildInputs = [
python.pkgs.wrapPython
];
plugins = selector python.pkgs;
passthru = {
inherit withPlugins;
};
}
''
buildPythonPath "$plugins"
makeWrapper ${lib.getExe python.pkgs.mdformat} $out/bin/mdformat \
--suffix PYTHONPATH : "$program_PYTHONPATH"
'';
in
withPlugins (ps: [ ])

View File

@@ -0,0 +1,30 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "mdfried";
version = "0.12.6";
src = fetchFromGitHub {
owner = "benjajaja";
repo = "mdfried";
tag = "v${finalAttrs.version}";
hash = "sha256-0xfdVZLqjlBvlpQYAYVTR2tAn6IjD0rgEBScYe5L4g4=";
};
cargoHash = "sha256-jDv6H846Po4Q4ungaC7e/311dgQ8M1L/bQayR5NgZv4=";
doCheck = true;
meta = {
description = "Markdown viewer TUI for the terminal, with big text and image rendering";
homepage = "https://github.com/benjajaja/mdfried";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ benjajaja ];
platforms = lib.platforms.unix;
mainProgram = "mdfried";
};
})

View File

@@ -0,0 +1,29 @@
{
lib,
buildGoModule,
fetchFromGitea,
}:
buildGoModule rec {
pname = "mdhtml";
version = "1.0";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "Tomkoid";
repo = "mdhtml";
rev = version;
hash = "sha256-Fv5XpWA2ebqXdA+46gZQouuZ3XxH4WDj/W6xJ0ETg8E=";
};
vendorHash = null;
meta = with lib; {
description = "Really simple CLI Markdown to HTML converter with styling support";
homepage = "https://codeberg.org/Tomkoid/mdhtml";
license = licenses.mit;
changelog = "https://codeberg.org/Tomkoid/mdhtml/releases";
maintainers = with maintainers; [ tomkoid ];
mainProgram = "mdhtml";
};
}

View File

@@ -0,0 +1,92 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
alsa-lib,
gcc-unwrapped,
libX11,
libcxx,
libdrm,
libgbm,
libglvnd,
libpulseaudio,
libxcb,
wayland,
xz,
zlib,
libva,
libvdpau,
addDriverRunpath,
freetype,
harfbuzz,
fontconfig,
fribidi,
}:
let
arch =
{
aarch64-linux = "arm64";
x86_64-linux = "amd64";
}
.${stdenv.hostPlatform.system};
in
stdenv.mkDerivation rec {
pname = "mdk-sdk";
version = "0.34.0";
src = fetchurl {
url = "https://github.com/wang-bin/mdk-sdk/releases/download/v${version}/mdk-sdk-linux.tar.xz";
hash = "sha256-qt17xZKuZIWmD8ck1IrHXa5i5tKElTYmbGQvqJTtTsY=";
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
alsa-lib
gcc-unwrapped
libX11
libcxx
libdrm
libgbm
libglvnd
libpulseaudio
libxcb
wayland
xz
zlib
freetype
harfbuzz
fontconfig
fribidi
];
appendRunpaths = lib.makeLibraryPath [
libva
libvdpau
addDriverRunpath.driverLink
];
installPhase = ''
runHook preInstall
mkdir $out
cp -r include $out/include
cp -r lib/${arch} $out/lib
cp -r lib/cmake $out/lib/cmake
ln -s . $out/lib/${arch}
runHook postInstall
'';
meta = {
description = "Multimedia development kit";
homepage = "https://github.com/wang-bin/mdk-sdk";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ orivej ];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchurl,
intltool,
pkg-config,
glib,
}:
stdenv.mkDerivation rec {
pname = "gnu-mdk";
version = "1.3.0";
src = fetchurl {
url = "mirror://gnu/mdk/v${version}/mdk-${version}.tar.gz";
sha256 = "0bhk3c82kyp8167h71vdpbcr852h5blpnwggcswqqwvvykbms7lb";
};
nativeBuildInputs = [
pkg-config
intltool
];
buildInputs = [ glib ];
postInstall = ''
mkdir -p $out/share/emacs/site-lisp/
cp -v ./misc/*.el $out/share/emacs/site-lisp
'';
meta = {
description = "GNU MIX Development Kit (MDK)";
homepage = "https://www.gnu.org/software/mdk/";
license = lib.licenses.gpl3;
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchFromGitHub,
wirelesstools,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mdk3-master";
version = "6-unstable-2015-05-24";
src = fetchFromGitHub {
owner = "charlesxsh";
repo = "mdk3-master";
rev = "1bf2bd31b79560aa99fc42123f70f36a03154b9e";
hash = "sha256-Jxyv7aoL8l9M7JheazJ+/YqfkDcSNx3ARNhx3G5Y+cM=";
};
runtimeDependencies = [ wirelesstools ];
# fix
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
installPhase = ''
runHook preInstall
make -C osdep install
mkdir -p $out/bin
install -D -m 0755 mdk3 $out/bin/
runHook postInstall
'';
meta = {
description = "MDK3 fork able to force reboot Access Points";
homepage = "https://github.com/charlesxsh/mdk3-master";
changelog = "https://github.com/charlesxsh/mdk3-master/blob/${finalAttrs.src.rev}/CHANGELOG";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ pinpox ];
mainProgram = "mdk3";
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
libnl,
libpcap,
pkg-config,
}:
stdenv.mkDerivation {
pname = "mdk4";
version = "4.2-unstable-2024-08-16";
src = fetchFromGitHub {
owner = "aircrack-ng";
repo = "mdk4";
rev = "36ca143a2e6c0b75b5ec60143b0c5eddd3d2970c";
hash = "sha256-iwESQgvt9gLQeDKVkf9KcztQmjdCLOE0+Q0FlfbbjEU=";
};
preBuild = ''
mkdir -p $out/bin
mkdir -p $out/share/man
substituteInPlace src/Makefile --replace '/usr/local/src/mdk4' '$out'
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libnl
libpcap
];
makeFlags = [
"PREFIX=$(out)"
"SBINDIR=$(PREFIX)/bin"
];
enableParallelBuilding = true;
meta = {
description = "Tool that injects data into wireless networks";
homepage = "https://github.com/aircrack-ng/mdk4";
maintainers = with lib.maintainers; [ moni ];
license = lib.licenses.gpl3Plus;
mainProgram = "mdk4";
};
}

View File

@@ -0,0 +1,3 @@
source "https://rubygems.org"
gem "mdl"

View File

@@ -0,0 +1,32 @@
GEM
remote: https://rubygems.org/
specs:
chef-utils (18.1.0)
concurrent-ruby
concurrent-ruby (1.2.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
mdl (0.13.0)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.1)
mixlib-cli (~> 2.1, >= 2.1.1)
mixlib-config (>= 2.2.1, < 4)
mixlib-shellout
mixlib-cli (2.1.8)
mixlib-config (3.0.27)
tomlrb
mixlib-shellout (3.2.7)
chef-utils
rexml (3.2.5)
tomlrb (2.0.3)
PLATFORMS
ruby
DEPENDENCIES
mdl
BUNDLED WITH
2.4.6

View File

@@ -0,0 +1,114 @@
{
chef-utils = {
dependencies = [ "concurrent-ruby" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0ckbnra3cs71syrvfhgcrg1icqxh6pj21by2f9sy6r6kbr19g4w3";
type = "gem";
};
version = "18.1.0";
};
concurrent-ruby = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1qnsflsbjj38im8xq35g0vihlz96h09wjn2dad5g543l3vvrkrx5";
type = "gem";
};
version = "1.2.0";
};
kramdown = {
dependencies = [ "rexml" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1ic14hdcqxn821dvzki99zhmcy130yhv5fqfffkcf87asv5mnbmn";
type = "gem";
};
version = "2.4.0";
};
kramdown-parser-gfm = {
dependencies = [ "kramdown" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv";
type = "gem";
};
version = "1.1.0";
};
mdl = {
dependencies = [
"kramdown"
"kramdown-parser-gfm"
"mixlib-cli"
"mixlib-config"
"mixlib-shellout"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1a463jx8v4a3lgmmfalq73c337d66hc21q4vnfar1qf4lhk5wyi0";
type = "gem";
};
version = "0.13.0";
};
mixlib-cli = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1ydxlfgd7nnj3rp1y70k4yk96xz5cywldjii2zbnw3sq9pippwp6";
type = "gem";
};
version = "2.1.8";
};
mixlib-config = {
dependencies = [ "tomlrb" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0j0122lv2qgccl61njqi0pj6sp6nb85y07gcmw16bwg4k0c8nx6p";
type = "gem";
};
version = "3.0.27";
};
mixlib-shellout = {
dependencies = [ "chef-utils" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0zkwg76y96nkh1mv0k92ybq46cr06v1wmic16129ls3yqzwx3xj6";
type = "gem";
};
version = "3.2.7";
};
rexml = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "08ximcyfjy94pm1rhcx04ny1vx2sk0x4y185gzn86yfsbzwkng53";
type = "gem";
};
version = "3.2.5";
};
tomlrb = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1xyl2nlfm39lklyaf0p7zj9psr60jvrlyfh26hrpk7wi4k7nlwy2";
type = "gem";
};
version = "2.0.3";
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
bundlerApp,
bundlerUpdateScript,
}:
bundlerApp {
pname = "mdl";
gemdir = ./.;
exes = [ "mdl" ];
passthru.updateScript = bundlerUpdateScript "mdl";
meta = with lib; {
description = "Tool to check markdown files and flag style issues";
homepage = "https://github.com/markdownlint/markdownlint";
license = licenses.mit;
maintainers = with maintainers; [
gerschtli
manveru
nicknovitski
totoroot
];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "mdns-scanner";
version = "0.24.0";
src = fetchFromGitHub {
owner = "CramBL";
repo = "mdns-scanner";
tag = "v${finalAttrs.version}";
hash = "sha256-0MHt/kSR6JvfCk08WIDPz6R9YYzDJ9RRTM6MU6sEwHk=";
};
cargoHash = "sha256-oJSsuU1vkisDISnp+/jFs1cWEVxr586l8yHbG6fkPjQ=";
meta = {
homepage = "https://github.com/CramBL/mdns-scanner";
description = "Scan a network and create a list of IPs and associated hostnames, including mDNS hostnames and other aliases";
changelog = "https://github.com/CramBL/mdns-scanner/releases/tag/${finalAttrs.src.tag}";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [ Cameo007 ];
mainProgram = "mdns-scanner";
};
})

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "mdns";
version = "1.4.3";
src = fetchFromGitHub {
owner = "mjansson";
repo = "mdns";
rev = version;
hash = "sha256-2uv+Ibnbl6hsdjFqPhcHXbv+nIEIT4+tgtwGndpZCqo=";
};
nativeBuildInputs = [
cmake
];
cmakeFlags = [
# Fix configure with cmake4
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.10")
];
meta = with lib; {
description = "Public domain mDNS/DNS-SD library in C";
homepage = "https://github.com/mjansson/mdns";
changelog = "https://github.com/mjansson/mdns/blob/${src.rev}/CHANGELOG";
license = licenses.unlicense;
maintainers = with maintainers; [ hexa ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchFromGitHub,
ncurses,
}:
stdenv.mkDerivation rec {
version = "1.0.18";
pname = "mdp";
src = fetchFromGitHub {
owner = "visit1985";
repo = "mdp";
rev = version;
sha256 = "sha256-7ltqnvNzdr+sJiiiCQpp25dzhOrcUCOAgMTt1RIgVTw=";
};
makeFlags = [ "PREFIX=$(out)" ];
buildInputs = [ ncurses ];
meta = with lib; {
homepage = "https://github.com/visit1985/mdp";
description = "Command-line based markdown presentation tool";
maintainers = with maintainers; [ matthiasbeyer ];
license = licenses.gpl3;
platforms = with platforms; unix;
mainProgram = "mdp";
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "mdq";
version = "0.9.0";
src = fetchFromGitHub {
owner = "yshavit";
repo = "mdq";
tag = "v${finalAttrs.version}";
hash = "sha256-Ys5Ol/j4IZ4SNp6TjryfHCIgWoEu3ToNp7ffiTZp5BE=";
};
cargoHash = "sha256-fwFi/OYlTqRuDDE2TKuvf9T7u0hLyrDejhOwjFDYHAk=";
passthru.updateScript = nix-update-script { };
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
description = "Like jq but for Markdown: find specific elements in a md doc";
homepage = "https://github.com/yshavit/mdq";
changelog = "https://github.com/yshavit/mdq/releases/tag/v${finalAttrs.version}";
license = with lib.licenses; [
mit
asl20
];
maintainers = with lib.maintainers; [ DimitarNestorov ];
mainProgram = "mdq";
};
})

View File

@@ -0,0 +1,35 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "mdr";
version = "0.2.5";
src = fetchFromGitHub {
owner = "MichaelMure";
repo = "mdr";
rev = "v${version}";
sha256 = "sha256-ibM3303pXnseAFP9qFTOzj0G/SxRPX+UeRfbJ+MCABk=";
};
vendorHash = "sha256-5jzU4EybEGKoEXCFhnu7z4tFRS9fgf2wJXhkvigRM0E=";
ldflags = [
"-s"
"-w"
"-X main.GitCommit=${src.rev}"
"-X main.GitLastTag=${version}"
"-X main.GitExactTag=${version}"
];
meta = with lib; {
description = "MarkDown Renderer for the terminal";
homepage = "https://github.com/MichaelMure/mdr";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "mdr";
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "mdserve";
version = "0.4.1";
src = fetchFromGitHub {
owner = "jfernandez";
repo = "mdserve";
tag = "v${finalAttrs.version}";
hash = "sha256-C9D6tr88EROo2rzu7t9HAeyKAxFOCZyN+sl7QpFgmI8=";
};
cargoHash = "sha256-RFCGb7wjO8/RsOlsABem5dy+ZfheZNihktqUCX3oDZo=";
__darwinAllowLocalNetworking = true;
nativeInstallCheckInputs = [ versionCheckHook ];
checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
# times out on darwin during nixpkgs-review
"--skip test_file_modification_updates_via_websocket"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Fast markdown preview server with live reload and theme support";
homepage = "https://github.com/jfernandez/mdserve";
changelog = "https://github.com/jfernandez/mdserve/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
vinnymeller
matthiasbeyer
];
mainProgram = "mdserve";
};
})

View File

@@ -0,0 +1,39 @@
{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
let
pname = "mdsf";
version = "0.10.7";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "hougesen";
repo = "mdsf";
tag = "v${version}";
hash = "sha256-DAniTRqFf+NNHPmmMWjBQN3M/quGDdjFMBezKcqVPnM=";
};
cargoHash = "sha256-h2D6FwI8YoCSp7UYy+4+TFt1JLCWoE5RZKmFfndsSHM=";
# many tests fail for various reasons of which most depend on the build sandbox
doCheck = false;
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Format markdown code blocks using your favorite tools";
homepage = "https://github.com/hougesen/mdsf";
changelog = "https://github.com/hougesen/mdsf/releases";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
mainProgram = "mdsf";
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "mdsh";
version = "0.9.2";
src = fetchFromGitHub {
owner = "zimbatm";
repo = "mdsh";
rev = "v${version}";
hash = "sha256-DQdm6911SNzVxUXpZ4mMumjonThhhEJnM/3GjbCjyuY=";
};
cargoHash = "sha256-JhrELBMGVtxJjyfPGcM6v8h1XJjdD+vOsYNfZ86Ras0=";
meta = with lib; {
description = "Markdown shell pre-processor";
homepage = "https://github.com/zimbatm/mdsh";
license = with licenses; [ mit ];
maintainers = with maintainers; [ zimbatm ];
mainProgram = "mdsh";
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonApplication {
pname = "mdslides";
version = "0-unstable-2022-12-15";
pyproject = true;
src = fetchFromGitHub {
owner = "dadoomer";
repo = "markdown-slides";
rev = "fd27dd09cf90f00093a393338e08953c8d65d68e";
sha256 = "sha256-31ALsy1P/vfI+H6Onmg4TXLeKbVAQ1FlnFs4k6ZOgHQ=";
};
build-system = with python3Packages; [ setuptools ];
doCheck = false;
pythonImportsCheck = [ "mdslides" ];
meta = with lib; {
longDescription = "Using markdown, write simple but beautiful presentations with math, animations and media, which can be visualized in a web browser or exported to PDF.";
homepage = "https://github.com/dadoomer/markdown-slides";
license = licenses.mit;
maintainers = [ maintainers.qjoly ];
mainProgram = "mdslides";
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
buildPackages,
nix-update-script,
}:
buildGoModule rec {
pname = "mdtsql";
version = "0.1.0";
src = fetchFromGitHub {
owner = "noborus";
repo = "mdtsql";
tag = "v${version}";
hash = "sha256-D9suWLrVQOztz0rRjEo+pjxQlGWOOsk3EUbkN9yuriY=";
};
vendorHash = "sha256-psXnLMhrApyBjDY/S4WwIM1GLczyn4dUmX2fWSTq7mQ=";
nativeBuildInputs = [
installShellFiles
];
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
let
emulator = stdenv.hostPlatform.emulator buildPackages;
in
''
installShellCompletion --cmd mdtsql \
--bash <(${emulator} $out/bin/mdtsql completion bash) \
--fish <(${emulator} $out/bin/mdtsql completion fish) \
--zsh <(${emulator} $out/bin/mdtsql completion zsh)
''
);
passthru.updateScript = nix-update-script { };
meta = {
description = "Execute SQL to markdown table and convert to other format";
homepage = "https://github.com/noborus/mdtsql";
changelog = "https://github.com/noborus/mdtsql/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ xiaoxiangmoe ];
mainProgram = "mdtsql";
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "mdwatch";
version = "0.1.15";
src = fetchFromGitHub {
owner = "santoshxshrestha";
repo = "mdwatch";
tag = "v${finalAttrs.version}";
hash = "sha256-zwlbWxvdtZJuz7gFdgmny6s1FsoxoBXkP4s7vF77oEo=";
};
cargoHash = "sha256-9XD8HbgnXhGsg1iZ/zYlk5080AhKqb8JxKKx5bxFE8M=";
updateScript = nix-update-script { };
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
meta = {
description = "Simple CLI tool to live-preview Markdown files in your browser";
homepage = "https://github.com/santoshxshrestha/mdwatch";
changelog = "https://github.com/santoshxshrestha/mdwatch/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ x123 ];
mainProgram = "mdwatch";
};
})

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,33 @@
{
lib,
fetchurl,
nodejs,
buildNpmPackage,
}:
buildNpmPackage rec {
pname = "mdx-language-server";
version = "0.5.2";
src = fetchurl {
url = "https://registry.npmjs.org/@mdx-js/language-server/-/language-server-${version}.tgz";
hash = "sha256-8ef9dVVsH5yTva9ymY+EAZTz6FOZ7Zgu9kOv1wLaK4w=";
};
postPatch = ''
ln -s ${./package-lock.json} package-lock.json
'';
npmDepsHash = "sha256-IONV1wxETazDaXzYfqiYrM+A8c36VcnlzTj3lmxA9ug=";
dontNpmBuild = true;
meta = {
description = "Language server for MDX";
homepage = "https://github.com/mdx-js/mdx-analyzer/tree/main/packages/language-server";
changelog = "https://github.com/mdx-js/mdx-analyzer/blob/@mdx-js/language-server@${version}/packages/language-server/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ThaoTranLePhuong ];
mainProgram = "mdx-language-server";
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "mdzk";
version = "0.5.2";
src = fetchFromGitHub {
owner = "mdzk-rs";
repo = "mdzk";
rev = version;
hash = "sha256-V//tVcIzhCh03VjwMC+R2ynaOFm+dp6qxa0oqBfvGUs=";
};
cargoPatches = [
# Remove when new version of mdzk is released.
./update-mdbook-for-rust-1.64.patch
];
cargoHash = "sha256-+x4pOtszvdzI/zR55ezcxlS52GrWQTuBn7vbnqDTVac=";
meta = with lib; {
description = "Plain text Zettelkasten based on mdBook";
homepage = "https://github.com/mdzk-rs/mdzk/";
changelog = "https://github.com/mdzk-rs/mdzk/blob/main/CHANGELOG.md";
license = licenses.mpl20;
maintainers = with maintainers; [
bryanasdev000
ratsclub
];
mainProgram = "mdzk";
};
}

View File

@@ -0,0 +1,246 @@
diff --git a/Cargo.lock b/Cargo.lock
index ae63793..4068e02 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -162,12 +162,46 @@ dependencies = [
"ansi_term",
"atty",
"bitflags",
- "strsim",
- "textwrap",
+ "strsim 0.8.0",
+ "textwrap 0.11.0",
"unicode-width",
"vec_map",
]
+[[package]]
+name = "clap"
+version = "3.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e538f9ee5aa3b3963f09a997035f883677966ed50fce0292611927ce6f6d8c6"
+dependencies = [
+ "atty",
+ "bitflags",
+ "clap_lex",
+ "indexmap",
+ "lazy_static",
+ "strsim 0.10.0",
+ "termcolor",
+ "textwrap 0.15.1",
+]
+
+[[package]]
+name = "clap_complete"
+version = "3.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f7a2e0a962c45ce25afce14220bc24f9dade0a1787f185cecf96bfba7847cd8"
+dependencies = [
+ "clap 3.2.2",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
+dependencies = [
+ "os_str_bytes",
+]
+
[[package]]
name = "cpufeatures"
version = "0.2.1"
@@ -222,9 +256,9 @@ dependencies = [
[[package]]
name = "env_logger"
-version = "0.7.1"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
+checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272"
dependencies = [
"atty",
"humantime",
@@ -385,15 +419,6 @@ dependencies = [
"version_check",
]
-[[package]]
-name = "getopts"
-version = "0.2.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
-dependencies = [
- "unicode-width",
-]
-
[[package]]
name = "getrandom"
version = "0.1.16"
@@ -471,7 +496,7 @@ dependencies = [
"log",
"pest",
"pest_derive",
- "quick-error 2.0.1",
+ "quick-error",
"serde",
"serde_json",
]
@@ -575,12 +600,9 @@ checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440"
[[package]]
name = "humantime"
-version = "1.3.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
-dependencies = [
- "quick-error 1.2.3",
-]
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
@@ -822,13 +844,14 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
[[package]]
name = "mdbook"
-version = "0.4.15"
+version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "241f10687eb3b4e0634b3b4e423f97c5f1efbd69dc9522e24a8b94583eeec3c6"
+checksum = "23f3e133c6d515528745ffd3b9f0c7d975ae039f0b6abb099f2168daa2afb4f9"
dependencies = [
"anyhow",
"chrono",
- "clap",
+ "clap 3.2.2",
+ "clap_complete",
"env_logger",
"handlebars",
"lazy_static",
@@ -838,7 +861,6 @@ dependencies = [
"pulldown-cmark",
"regex",
"serde",
- "serde_derive",
"serde_json",
"shlex",
"tempfile",
@@ -1062,6 +1084,12 @@ dependencies = [
"winapi 0.3.9",
]
+[[package]]
+name = "os_str_bytes"
+version = "6.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"
+
[[package]]
name = "parking_lot"
version = "0.11.2"
@@ -1258,17 +1286,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34f197a544b0c9ab3ae46c359a7ec9cbbb5c7bf97054266fecb7ead794a181d6"
dependencies = [
"bitflags",
- "getopts",
"memchr",
"unicase",
]
-[[package]]
-name = "quick-error"
-version = "1.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
-
[[package]]
name = "quick-error"
version = "2.0.1"
@@ -1386,9 +1407,9 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.5.4"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
+checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"
dependencies = [
"aho-corasick",
"memchr",
@@ -1403,9 +1424,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
[[package]]
name = "regex-syntax"
-version = "0.6.25"
+version = "0.6.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
+checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
[[package]]
name = "remove_dir_all"
@@ -1577,13 +1598,19 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
[[package]]
name = "structopt"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
dependencies = [
- "clap",
+ "clap 2.33.3",
"lazy_static",
"structopt-derive",
]
@@ -1673,6 +1700,12 @@ dependencies = [
"unicode-width",
]
+[[package]]
+name = "textwrap"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16"
+
[[package]]
name = "thiserror"
version = "1.0.30"
diff --git a/Cargo.toml b/Cargo.toml
index dfeeb45..8b1e4e5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,7 +38,7 @@ handlebars = "4.2.1"
ignore = "0.4.18"
lazy_static = "1.4.0"
lazy-regex = "2.2.2"
-mdbook = { version = "0.4.15", default-features = false }
+mdbook = { version = "0.4.21", default-features = false }
notify = "4.0.17"
pest = "2.1.3"
pest_derive = "2.1.0"
diff --git a/src/renderer/mdzk_renderer.rs b/src/renderer/mdzk_renderer.rs
index 55b2423..f8480ca 100644
--- a/src/renderer/mdzk_renderer.rs
+++ b/src/renderer/mdzk_renderer.rs
@@ -92,7 +92,7 @@ impl Renderer for HtmlMdzk {
"description",
json!(ctx.config.book.description.clone().unwrap_or_default()),
);
- if let Some(ref livereload) = html_config.livereload_url {
+ if let Some(ref livereload) = html_config.live_reload_endpoint {
data.insert("livereload", json!(livereload));
}
data.insert("fold_enable", json!(html_config.fold.enable));