Compare commits
No commits in common. "a17d82f9961be678784262a92c50cac11b66dae6" and "4ee5913bd0b3347d3a129f3bf853747c6724724c" have entirely different histories.
a17d82f996
...
4ee5913bd0
6 changed files with 25 additions and 30 deletions
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
alterName=$1
|
alterName=$1
|
||||||
message=$(<"/dev/stdin")
|
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
<div class="alter alter-${alterName}">
|
<div class="alter alter-${alterName}">
|
||||||
|
@ -9,7 +8,7 @@ cat << EOF
|
||||||
${alterName}@41666$>
|
${alterName}@41666$>
|
||||||
</span>
|
</span>
|
||||||
<span class="message">
|
<span class="message">
|
||||||
${message}
|
$(<"/dev/stdin")
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
EOF
|
EOF
|
|
@ -12,7 +12,6 @@
|
||||||
# can do an [invoke(plural)(...):yay!] type thing
|
# can do an [invoke(plural)(...):yay!] type thing
|
||||||
# one can invoke stuff inline too without doing this.
|
# one can invoke stuff inline too without doing this.
|
||||||
markdollPlugins = [
|
markdollPlugins = [
|
||||||
(mkMarkdollPlugin "plural" ./plugins/plural.sh)
|
(mkMarkdollPlugin "plural" ../plugins/plural.sh)
|
||||||
((mkMarkdollPlugin "tools" ./plugins/tools.py).override { buildInputs = [ pkgs.python3 ]; })
|
|
||||||
];
|
];
|
||||||
}
|
}
|
|
@ -4,9 +4,4 @@ title: plugin tests
|
||||||
|
|
||||||
&plural plugin
|
&plural plugin
|
||||||
[invoke(plural)(aki):hi this one is aki]
|
[invoke(plural)(aki):hi this one is aki]
|
||||||
|
|
||||||
[invoke(plural)(noe):hi this one is noe]
|
[invoke(plural)(noe):hi this one is noe]
|
||||||
|
|
||||||
hellorld [invoke(tools)(flip):hellorld]
|
|
||||||
|
|
||||||
dolldolldoll|llodllodllod [invoke(tools)(flip):dolldolldoll|llodllodllod]
|
|
13
examples/quickstart/plugins/inline-example.sh
Executable file
13
examples/quickstart/plugins/inline-example.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
flip() {
|
||||||
|
LC_ALL=C LC_ALL=en_US.UTF-8 rev <"/dev/stdin"
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
case $1 in
|
||||||
|
flip) flip;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
main $1
|
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
if sys.argv[1] == "flip":
|
|
||||||
stdin = sys.stdin.read()
|
|
||||||
print(stdin[::-1], flush=True)
|
|
|
@ -1,13 +1,9 @@
|
||||||
{ pkgs }: name: src: let
|
{ pkgs }: name: src: pkgs.stdenvNoCC.mkDerivation {
|
||||||
drv = { buildInputs ? [], }: pkgs.stdenvNoCC.mkDerivation {
|
inherit name src;
|
||||||
inherit name src buildInputs;
|
|
||||||
|
|
||||||
version = "0.0.0";
|
version = "0.0.0";
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
|
||||||
installPhase = "
|
installPhase = "
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp $src $out/bin/${name}
|
cp $src $out/bin/${name}
|
||||||
";
|
";
|
||||||
};
|
}
|
||||||
in pkgs.lib.customisation.makeOverridable drv { buildInputs = []; }
|
|
Loading…
Add table
Reference in a new issue