Rename the program to katex-html
This commit is contained in:
parent
0caba82b7c
commit
fc26bcf07b
12
default.nix
12
default.nix
|
@ -11,21 +11,21 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "katex-converter";
|
name = "katex-html";
|
||||||
src = ./convert.rb;
|
src = ./convert.rb;
|
||||||
buildInputs = [ katex-server gems ruby ];
|
buildInputs = [ katex-server gems ruby ];
|
||||||
unpackPhase = "echo 'Skipping unpack phase (nothing to unpack)'";
|
unpackPhase = "echo 'Skipping unpack phase (nothing to unpack)'";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/{bin,share/katex-converter}
|
mkdir -p $out/{bin,share/katex-html}
|
||||||
cp $src $out/share/katex-converter/convert.rb
|
cp $src $out/share/katex-html/convert.rb
|
||||||
cat > $out/bin/katex-converter <<EOF
|
cat > $out/bin/katex-html <<EOF
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
${katex-server}/bin/katex-server &
|
${katex-server}/bin/katex-server &
|
||||||
server_pid=\$!
|
server_pid=\$!
|
||||||
sleep 1
|
sleep 1
|
||||||
${gems}/bin/bundle exec ${ruby}/bin/ruby $out/share/katex-converter/convert.rb \$@
|
${gems}/bin/bundle exec ${ruby}/bin/ruby $out/share/katex-html/convert.rb \$@
|
||||||
kill -KILL \$server_pid
|
kill -KILL \$server_pid
|
||||||
EOF
|
EOF
|
||||||
chmod +x $out/bin/katex-converter
|
chmod +x $out/bin/katex-html
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue
Block a user