From 063f44d23cfe25fd88ed5d05dfc25828a88dd39d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Nov 2009 13:54:20 +0000 Subject: * Move classification.txt to the manual. svn path=/nixpkgs/trunk/; revision=18419 --- doc/coding-conventions.xml | 278 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 276 insertions(+), 2 deletions(-) (limited to 'doc/coding-conventions.xml') diff --git a/doc/coding-conventions.xml b/doc/coding-conventions.xml index 586fcd98f23d..b941e3ca2a6d 100644 --- a/doc/coding-conventions.xml +++ b/doc/coding-conventions.xml @@ -215,7 +215,281 @@ dashes between words — not in camel case. For instance, it should be allPackages.nix or AllPackages.nix. - +Each package should be stored in its own directory somewhere in +the pkgs/ tree, i.e. in +pkgs/category/subcategory/.../pkgname. +Below are some rules for picking the right category for a package. +Many packages fall under several categories; what matters is the +primary purpose of a package. For example, the +libxml2 package builds both a library and some +tools; but it’s a library foremost, so it goes under +pkgs/development/libraries. + +When in doubt, consider refactoring the +pkgs/ tree, e.g. creating new categories or +splitting up an existing category. + + + + If it’s used to support software development: + + + + If it’s a library used by other packages: + + development/libraries (e.g. libxml2) + + + + If it’s a compiler: + + development/compilers (e.g. gcc) + + + + If it’s an interpreter: + + development/interpreters (e.g. guile) + + + + If it’s a (set of) development tool(s): + + + + If it’s a parser generator (including lexers): + + development/tools/parsing (e.g. bison, flex) + + + + If it’s a build manager: + + development/tools/build-managers (e.g. gnumake) + + + + Else: + + development/tools/misc (e.g. binutils) + + + + + + + Else: + + development/misc + + + + + + + If it’s a (set of) tool(s): + + (A tool is a relatively small program, especially one intented + to be used non-interactively.) + + + If it’s for networking: + + tools/networking (e.g. wget) + + + + If it’s for text processing: + + tools/text (e.g. diffutils) + + + + If it’s a system utility, i.e., + something related or essential to the operation of a + system: + + tools/system (e.g. cron) + + + + If it’s an archiver (which may + include a compression function): + + tools/archivers (e.g. zip, tar) + + + + If it’s a compression program: + + tools/compression (e.g. gzip, bzip2) + + + + If it’s a security-related program: + + tools/security (e.g. nmap, gnupg) + + + + Else: + + tools/misc + + + + + + + If it’s a shell: + + shells (e.g. bash) + + + + If it’s a server: + + + + If it’s a web server: + + servers/http (e.g. apache-httpd) + + + + If it’s an implementation of the X Windowing System: + + servers/x11 (e.g. xorg — this includes the client libraries and programs) + + + + Else: + + servers/misc + + + + + + + If it’s a desktop environment + (including window managers): + + desktops (e.g. kde, gnome, enlightenment) + + + + If it’s an application: + + A (typically large) program with a distinct user + interface, primarily used interactively. + + + If it’s a version management system: + + applications/version-management (e.g. subversion) + + + + If it’s for video playback / editing: + + applications/video (e.g. vlc) + + + + If it’s for graphics viewing / editing: + + applications/graphics (e.g. gimp) + + + + If it’s for networking: + + + + If it’s a mailreader: + + applications/networking/mailreaders (e.g. thunderbird) + + + + If it’s a newsreader: + + applications/networking/newsreaders (e.g. pan) + + + + If it’s a web browser: + + applications/networking/browsers (e.g. firefox) + + + + Else: + + applications/networking/misc + + + + + + + Else: + + applications/misc + + + + + + + If it’s data (i.e., does not have a + straight-forward executable semantics): + + + + If it’s a font: + + data/fonts + + + + If it’s related to SGML/XML processing: + + + + If it’s an XML DTD: + + data/sgml+xml/schemas/xml-dtd (e.g. docbook) + + + + If it’s an XSLT stylesheet: + + (Okay, these are executable...) + data/sgml+xml/stylesheets/xslt (e.g. docbook-xsl) + + + + + + + + + + If it’s a game: + + games + + + + Else: + + misc + + + + - \ No newline at end of file + -- cgit v1.2.3