mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
Build the manual with Meson
Co-Authored-By: Qyriad <qyriad@qyriad.me> Co-Authored-By: Robert Hensing <robert@roberthensing.nl> Co-Authored-By: eldritch horrors <pennae@lix.systems> Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com> Co-authored-by: Tom Bereknyei <tomberek@gmail.com>
This commit is contained in:
parent
67a66212c3
commit
08b59aad31
24 changed files with 805 additions and 3 deletions
71
doc/manual/package.nix
Normal file
71
doc/manual/package.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{ lib
|
||||
, mkMesonDerivation
|
||||
|
||||
, meson
|
||||
, ninja
|
||||
, lowdown
|
||||
, mdbook
|
||||
, mdbook-linkcheck
|
||||
, jq
|
||||
, python3
|
||||
, rsync
|
||||
, nix-cli
|
||||
|
||||
# Configuration Options
|
||||
|
||||
, version
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) fileset;
|
||||
in
|
||||
|
||||
mkMesonDerivation (finalAttrs: {
|
||||
pname = "nix-manual";
|
||||
inherit version;
|
||||
|
||||
workDir = ./.;
|
||||
fileset = fileset.difference
|
||||
(fileset.unions [
|
||||
../../.version
|
||||
# Too many different types of files to filter for now
|
||||
../../doc/manual
|
||||
./.
|
||||
])
|
||||
# Do a blacklist instead
|
||||
../../doc/manual/package.nix;
|
||||
|
||||
# TODO the man pages should probably be separate
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
# Hack for sake of the dev shell
|
||||
passthru.externalNativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
(lib.getBin lowdown)
|
||||
mdbook
|
||||
mdbook-linkcheck
|
||||
jq
|
||||
python3
|
||||
rsync
|
||||
];
|
||||
|
||||
nativeBuildInputs = finalAttrs.passthru.externalNativeBuildInputs ++ [
|
||||
nix-cli
|
||||
];
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
chmod u+w ./.version
|
||||
echo ${finalAttrs.version} > ./.version
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p ''$out/nix-support
|
||||
echo "doc manual ''$out/share/doc/nix/manual" >> ''$out/nix-support/hydra-build-products
|
||||
'';
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue