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"
79 pname = "radicle-explorer";
80 version = radicle-httpd.version;
81 inherit patches npmDepsHash;
83 # radicle-explorer uses the radicle-httpd API, and they are developed in the
84 # same repo. For this reason we pin the sources to each other, but due to
85 # radicle-httpd using a more limited sparse checkout we need to carry a
88 inherit (radicle-httpd.src) url rev;
89 hash = "sha256:09m13238h6j7g02r6332ihgyyzbjx90pgz14rz29pgv7936h6il8";
93 patchShebangs --build ./scripts
94 mkdir -p "public/twemoji"
95 cp -t public/twemoji -r -- ${twemojiAssets}/assets/svg/*
96 : >scripts/install-twemoji-assets
105 cp -r -t "$out" build/*
109 passthru = mkPassthru self args;
112 description = "Web frontend for Radicle";
114 Radicle Explorer is a web-frontend for Radicle which supports browsing
115 repositories, issues and patches on publicly available Radicle seeds.
117 This package builds the web interface, ready to be served by any web
121 homepage = "https://radicle.xyz";
122 license = lib.licenses.gpl3;
124 maintainers = with lib.maintainers; [