From 3355ffcbf9a287aa29875dfc950070ec713c5393 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Wed, 10 Jul 2024 14:30:58 -0400 Subject: [PATCH] more improvements --- .gitignore | 1 + packages/md-manual/default.nix | 13 ++++++++++++- packages/nixpkgs-manual/default.nix | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1f68578..fa1a833 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ docs .cache/plugin/social mkdocs-hooks/__pycache__ public +result-doc diff --git a/packages/md-manual/default.nix b/packages/md-manual/default.nix index 662c7d7..5df2e27 100644 --- a/packages/md-manual/default.nix +++ b/packages/md-manual/default.nix @@ -1,10 +1,16 @@ -{ stdenvNoCC, pkgs }: +{ + stdenvNoCC, + pkgs, + perl, +}: stdenvNoCC.mkDerivation { pname = "md-manual"; version = "1.0.0"; src = ./.; + buildInputs = [ perl ]; + installPhase = '' mkdir $out cp index.md $out/index.md @@ -12,5 +18,10 @@ stdenvNoCC.mkDerivation { cp -r ${pkgs.amg.nixpkgs-manual} $out/Nixpkgs/ cp -r ${pkgs.amg.aux-wiki} $out/Aux cp -r ${pkgs.lix-docs.doc}/manualMD $out/Lix + chmod -R u+w $out/Lix + pushd $out/Lix + find . -type f -exec perl -pi -e 's/\
\n\n/\?\?\? bug\n\n\ \ /g' {} \; + popd + chmod -R u-w $out/Lix ''; } diff --git a/packages/nixpkgs-manual/default.nix b/packages/nixpkgs-manual/default.nix index c659d94..f609c2e 100644 --- a/packages/nixpkgs-manual/default.nix +++ b/packages/nixpkgs-manual/default.nix @@ -90,6 +90,7 @@ stdenvNoCC.mkDerivation { find . -type f -exec perl -pi -e 's/\s*:::{.tip}\n/!!! tip\n\ \ \ \ /' {} \; find . -type f -exec perl -pi -e 's/\s*:::{.example}\n/!!! example\n\ \ \ \ /' {} \; find . -type f -exec sed -i 's/\s*::://g' {} \; + find . -type f -exec sed -i 's/\n```nix/\ \ \ \ ```nix/g' {} \; popd '';