You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
773 B

  1. # Generates the documentation for library functons via nixdoc. To add
  2. # another library function file to this list, the include list in the
  3. # file `doc/functions/library.xml` must also be updated.
  4. { pkgs ? import ./.. {}, locationsXml }:
  5. with pkgs; stdenv.mkDerivation {
  6. name = "nixpkgs-lib-docs";
  7. src = ./../../lib;
  8. buildInputs = [ nixdoc ];
  9. installPhase = ''
  10. function docgen {
  11. nixdoc -c "$1" -d "$2" -f "../lib/$1.nix" > "$out/$1.xml"
  12. }
  13. mkdir -p $out
  14. ln -s ${locationsXml} $out/locations.xml
  15. docgen strings 'String manipulation functions'
  16. docgen trivial 'Miscellaneous functions'
  17. docgen lists 'List manipulation functions'
  18. docgen debug 'Debugging functions'
  19. docgen options 'NixOS / nixpkgs option handling'
  20. '';
  21. }