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
|
||||
|
||||
alterName=$1
|
||||
message=$(<"/dev/stdin")
|
||||
|
||||
cat << EOF
|
||||
<div class="alter alter-${alterName}">
|
||||
|
@ -9,7 +8,7 @@ cat << EOF
|
|||
${alterName}@41666$>
|
||||
</span>
|
||||
<span class="message">
|
||||
${message}
|
||||
$(<"/dev/stdin")
|
||||
</span>
|
||||
</div>
|
||||
EOF
|
|
@ -12,7 +12,6 @@
|
|||
# can do an [invoke(plural)(...):yay!] type thing
|
||||
# one can invoke stuff inline too without doing this.
|
||||
markdollPlugins = [
|
||||
(mkMarkdollPlugin "plural" ./plugins/plural.sh)
|
||||
((mkMarkdollPlugin "tools" ./plugins/tools.py).override { buildInputs = [ pkgs.python3 ]; })
|
||||
(mkMarkdollPlugin "plural" ../plugins/plural.sh)
|
||||
];
|
||||
}
|
|
@ -4,9 +4,4 @@ title: plugin tests
|
|||
|
||||
&plural plugin
|
||||
[invoke(plural)(aki):hi this one is aki]
|
||||
|
||||
[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
|
||||
drv = { buildInputs ? [], }: pkgs.stdenvNoCC.mkDerivation {
|
||||
inherit name src buildInputs;
|
||||
|
||||
{ pkgs }: name: src: pkgs.stdenvNoCC.mkDerivation {
|
||||
inherit name src;
|
||||
version = "0.0.0";
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = "
|
||||
mkdir -p $out/bin
|
||||
cp $src $out/bin/${name}
|
||||
";
|
||||
};
|
||||
in pkgs.lib.customisation.makeOverridable drv { buildInputs = []; }
|
||||
}
|
Loading…
Add table
Reference in a new issue