Skip to content

Commit 54d2aee

Browse files
documentation-highlighter: move to pkgs/by-name, move source to separate directory
1 parent 316b15b commit 54d2aee

9 files changed

Lines changed: 10 additions & 25 deletions

File tree

File renamed without changes.

pkgs/misc/documentation-highlighter/default.nix renamed to pkgs/by-name/do/documentation-highlighter/package.nix

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,7 @@ runCommand "documentation-highlighter"
77
license = lib.licenses.bsd3;
88
platforms = lib.platforms.all;
99
};
10-
src = lib.sources.cleanSourceWith {
11-
src = ./.;
12-
filter =
13-
path: type:
14-
lib.elem (baseNameOf path) [
15-
"highlight.pack.js"
16-
"LICENSE"
17-
"loader.js"
18-
"mono-blue.css"
19-
"README.md"
20-
];
21-
};
10+
src = ./src;
2211
}
2312
''
2413
cp -r "$src" "$out"
File renamed without changes.

pkgs/misc/documentation-highlighter/README.md renamed to pkgs/by-name/do/documentation-highlighter/src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This file was generated with pkgs/misc/documentation-highlighter/update.sh
1+
This file was generated with pkgs/by-name/do/documentation-highlighter/update.sh
22

33
# Highlight.js CDN Assets
44

pkgs/misc/documentation-highlighter/highlight.pack.js renamed to pkgs/by-name/do/documentation-highlighter/src/highlight.pack.js

File renamed without changes.
File renamed without changes.

pkgs/misc/documentation-highlighter/mono-blue.css renamed to pkgs/by-name/do/documentation-highlighter/src/mono-blue.css

File renamed without changes.

pkgs/misc/documentation-highlighter/update.sh renamed to pkgs/by-name/do/documentation-highlighter/update.sh

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@ set -o pipefail
77
root=$(pwd)
88

99
if [ ! -f "./update.sh" ]; then
10-
echo "Please run this script from within pkgs/misc/documentation-highlighter/!"
10+
echo "Please run this script from within pkgs/by-name/do/documentation-highlighter/!"
1111
exit 1
1212
fi
1313

1414
scratch=$(mktemp -d -t tmp.XXXXXXXXXX)
1515
function finish {
16-
rm -rf "$scratch"
16+
rm -rf "$scratch"
1717
}
1818
trap finish EXIT
1919

20-
21-
mkdir $scratch/src
22-
cd $scratch/src
20+
mkdir "$scratch/src"
21+
cd "$scratch/src"
2322

2423
curl \
2524
-X POST \
@@ -28,17 +27,16 @@ curl \
2827
"api": 2,
2928
"languages": ["bash", "nix", "shell"]
3029
}' \
31-
https://highlightjs.org/api/download > $scratch/out.zip
32-
30+
https://highlightjs.org/api/download >"$scratch/out.zip"
3331

3432
unzip "$scratch/out.zip"
35-
out="$root/"
33+
out="$root/src"
3634
mkdir -p "$out"
3735
cp ./highlight.min.js "$out/highlight.pack.js"
3836
cp ./{LICENSE,styles/mono-blue.css} "$out"
3937

4038
(
41-
echo "This file was generated with pkgs/misc/documentation-highlighter/update.sh"
39+
echo "This file was generated with pkgs/by-name/do/documentation-highlighter/update.sh"
4240
echo ""
4341
cat README.md
44-
) > "$out/README.md"
42+
) >"$out/README.md"

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9636,8 +9636,6 @@ with pkgs;
96369636
docbook_xsl = docbook-xsl-nons;
96379637
docbook_xsl_ns = docbook-xsl-ns;
96389638

9639-
documentation-highlighter = callPackage ../misc/documentation-highlighter { };
9640-
96419639
moeli = eduli;
96429640

96439641
font-awesome_4 = (callPackage ../data/fonts/font-awesome { }).v4;

0 commit comments

Comments
 (0)