13 # radicle-explorer bundles these freely available Emoji assets, but does not
15 twemojiAssets = fetchFromGitHub {
19 hash = "sha256-YoOnZ5uVukzi/6bLi22Y8U5TpplPzB7ji42l+/ys5xI=";
20 meta.license = [ lib.licenses.cc-by-40 ];
23 mkPassthru = self: args: {
24 # radicle-explorer is configured through static build time configuration.
26 # Using this function you can override the this configuration, for example,
27 # to configure alternative preferred peers (which are shown in the UI by
33 # radicle-explorer.withConfig {
35 # hostname = "seed.example.com";
44 overrides = writeText "config-overrides.json" (builtins.toJSON config);
45 newConfig = runCommand "config.json" { } ''
46 ${jq}/bin/jq -s '.[0] * .[1]' ${(self args).src}/config/default.json ${overrides} > $out
51 (self args).overrideAttrs (prev: {
53 ${prev.preBuild or ""}
54 cp ${newConfig} config/local.json
57 passthru = prev.passthru // mkPassthru final args;
61 # By default, radicle-explorer includes a dependency that sends requests
62 # to a web analytics tracking service. Using this attribute yields a
63 # version of radicle-explorer with this dependency removed.
64 withoutTrackers = self {
65 patches = [ ./0001-remove-dependency-on-plausible.patch ];
66 npmDepsHash = "sha256:1hbrzfjkfc0q8qk03yi6qb9zqm57h7hnkn7fl0yxkrzbrljaljaz";
74 npmDepsHash ? "sha256:0kw6rvqm0s21j1rss35idvgcrzzczfy6qi3323y385djw4ygk5xs",
78 pname = "radicle-explorer";
79 version = radicle-httpd.version;
80 inherit patches npmDepsHash;
82 # radicle-explorer uses the radicle-httpd API, and they are developed in the
83 # same repo. For this reason we pin the sources to each other, but due to
84 # radicle-httpd using a more limited sparse checkout we need to carry a
87 inherit (radicle-httpd.src) url rev;
88 hash = "sha256:09m13238h6j7g02r6332ihgyyzbjx90pgz14rz29pgv7936h6il8";
92 patchShebangs --build ./scripts
93 mkdir -p "public/twemoji"
94 cp -t public/twemoji -r -- ${twemojiAssets}/assets/svg/*
95 : >scripts/install-twemoji-assets
104 cp -r -t "$out" build/*
108 passthru = mkPassthru self args;
111 description = "Web frontend for Radicle";
113 Radicle Explorer is a web-frontend for Radicle which supports browsing
114 repositories, issues and patches on publicly available Radicle seeds.
116 This package builds the web interface, ready to be served by any web
120 homepage = "https://radicle.xyz";
121 license = lib.licenses.gpl3;
123 maintainers = with lib.maintainers; [