INN (InterNetNews), a Usenet news server, packaged for Nix
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jeffrey C. Ollie e196577f57
Package INN 2.7.4 as a Nix flake
Build INN (InterNetNews) from the upstream release tarball rather than the
Git tag: the tarball already ships the generated configure script, the
innfeed lexer and parser, and the POD-derived man pages, so the tree needs
no autoconf/bison/flex/libtool bootstrap.

State that cannot live in the Nix store is compiled in as absolute paths
(/etc/news, /var/lib/news, /var/log/news, /run/news, /var/spool/news), all
exposed as derivation arguments alongside the news user/group and the
sendmail path.  `make install` writes $out, $sysconfdir and the state
directories in one pass, so it is redirected through DESTDIR and split
afterwards, with the sample config and seed database kept under share/inn.

Helper programs are pinned to absolute store paths via configure variables,
since autoconf otherwise leaves AWK as a bare "gawk" for $PATH to resolve at
runtime.  OWNER/ROWNER are cleared because install-sh would otherwise chown
to news:news, which fails for an unprivileged builder.

Optional support for Berkeley DB, Kerberos, OpenSSL, PAM, Perl, Python,
SASL, SQLite, systemd and zlib is on by default and individually
toggleable.  Cancel-Lock is off because libcanlock is not in nixpkgs.

powerpc64le-linux and x86_64-freebsd are filtered out of the system list:
nixpkgs cannot evaluate the dependency closure there (GnuPG reaches pandoc
and GHC has no bootstrap compiler on the former, CPython hits an infinite
recursion on the latter).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_014HXGpcMTjxCDuPmjEc5U6h
2026-08-30 21:04:41 -05:00
LICENSES Package INN 2.7.4 as a Nix flake 2026-08-30 21:04:41 -05:00
.gitignore Package INN 2.7.4 as a Nix flake 2026-08-30 21:04:41 -05:00
flake.lock Package INN 2.7.4 as a Nix flake 2026-08-30 21:04:41 -05:00
flake.nix Package INN 2.7.4 as a Nix flake 2026-08-30 21:04:41 -05:00
package.nix Package INN 2.7.4 as a Nix flake 2026-08-30 21:04:41 -05:00
README.md Package INN 2.7.4 as a Nix flake 2026-08-30 21:04:41 -05:00
REUSE.toml Package INN 2.7.4 as a Nix flake 2026-08-30 21:04:41 -05:00

nix-inn

A Nix flake packaging INN (InterNetNews), the Usenet news server maintained by ISC.

Canonical repository: https://git.ocjtech.us/jeff/nix-inn.git

Usage

nix build .#inn
./result/bin/innconfval -v

Or from another flake:

{
  inputs.inn.url = "git+https://git.ocjtech.us/jeff/nix-inn.git";

  # ...

  environment.systemPackages = [ inn.packages.${system}.inn ];
}

The flake exposes only packages.<system>.inn (and default, an alias). It covers every system in lib.systems.flakeExposed except powerpc64le-linux and x86_64-freebsd, where nixpkgs cannot evaluate INN's dependency closure — GnuPG reaches pandoc and GHC has no bootstrap compiler on the former, and the CPython expression hits an infinite recursion on the latter. Only x86_64-linux is built and tested regularly.

Source

The derivation builds the upstream release tarball (https://github.com/InterNetNews/inn/releases/download/2.7.4/inn-2.7.4.tar.gz), not the Git tag. The tarball is already bootstrapped: it ships the generated configure script, the innfeed lexer and parser, and the POD-derived man pages, so autoconf, bison, flex and libtool are not needed to build it.

What gets installed

Path Contents
bin/ 76 programs — innd, nnrpd, innfeed, ctlinnd, the expiry and overview tools — plus the auth/, control/, filter/ and rnews.libexec/ subdirectories
lib/ libinn, libinnhist, libinnstorage, innshellvars and the INN:: Perl modules
include/inn/ Public headers
share/man/ 126 man pages in sections 1, 3, 5 and 8
share/doc/inn/ Upstream documentation, including INSTALL and HACKING
share/inn/conf/ The 35 sample configuration files that upstream would install into /etc/news
share/inn/db/ The minimal active, active.times, history and newsgroups that make install seeds

Optional support is compiled in for Berkeley DB, Kerberos, OpenSSL, PAM, Perl, Python, SASL, SQLite, systemd and zlib. Cancel-Lock is disabled because libcanlock is not in nixpkgs.

Configuration

INN cannot keep its state in the Nix store, so the state locations are compiled in as absolute paths and all of them are derivation arguments:

Argument Default
confDir /etc/news
dbDir /var/lib/news
logDir /var/log/news
runDir /run/news
spoolDir /var/spool/news
sendmailPath /run/wrappers/bin/sendmail
newsUser / newsGroup news
newsMaster usenet

The optional dependencies are toggled with withBerkeleyDB, withKerberos, withOpenSSL, withPAM, withPerl, withPython, withSASL, withSQLite, withSystemd and withZlib, all on by default (withPAM and withSystemd only on Linux). Override them the usual way:

pkgs.inn.override {
  withPython = false;
  spoolDir = "/srv/news";
}

Deploying

The package is only the binaries; it does not set a system up. Running INN still requires that you:

  • create the news user and group;
  • create confDir and the state directories, owned by that user;
  • copy share/inn/conf into /etc/news and edit it — in particular inn.conf, newsfeeds and incoming.conf;
  • seed /var/lib/news from share/inn/db on a first install;
  • arrange for innd to be started and for news.daily to run from cron.

Upstream ships no systemd units, so there is nothing to enable; you have to write your own. share/doc/inn/INSTALL covers the rest.

Licensing

The packaging in this repository is MIT. INN itself is ISC-licensed as a whole, with a few files under GPL-2.0-or-later and a handful in the public domain; see share/doc/inn/LICENSE. The repository is REUSE compliant.