1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# rss-kakapo: turn Mastodon into your feed reader, for small private
# instances. A fork of RSS Parrot, maintained as its own repository:
# https://sources.profpatsch.de/rss-kakapo/
#
# This is only the build. What the service does, how it is configured and what
# its caveats are belongs to rss-kakapo(1), in the man output:
#
# man "$(nix-build . -A users.Profpatsch.rss-kakapo.man)/share/man/man1/rss-kakapo.1.gz"
#
# The source comes from the `rss-kakapo` input of //flake.nix, resolved out of
# //flake.lock the same way default.nix resolves nixpkgs, so `nix-build -A`
# and the flake build the very same revision. Updating it is `nix flake update
# rss-kakapo`, which picks up the latest *release* of the project rather than
# its latest push — see the comment on the input.
{ pkgs, ... }:
let
# The locked rss-kakapo tarball. It is a release URL, so these bytes are
# written once and never pruned; the narHash in the lock is what makes this
# reproducible without trusting the host to keep serving the same thing.
src =
let
lock = builtins.fromJSON (builtins.readFile ../../../flake.lock);
node = lock.nodes."rss-kakapo".locked;
in
builtins.fetchTree { inherit (node) type url narHash; };
in
# package.nix is a plain callPackage function on purpose, so that a consumer
# builds it against its own nixpkgs instead of evaluating the one its flake
# pins. This is that consumer.
pkgs.callPackage "${src}/package.nix" { inherit src; }
|