style: Switch to nixfmt from nixpkgs-fmt
Most of the ecosystem has moved to this formatter, and many people configured their editors to autoformat it with this formatter. Closes: https://git.snix.dev/snix/snix/issues/62 Change-Id: Icf39e7836c91fc2ae49fbe22a40a639105bfb0bd Reviewed-on: https://cl.snix.dev/c/snix/+/30671 Reviewed-by: Florian Klink <flokli@flokli.de> Tested-by: besadii Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
This commit is contained in:
parent
3443e6bd08
commit
91d02d8c84
136 changed files with 39952 additions and 11007 deletions
92
third_party/radicle-explorer/default.nix
vendored
92
third_party/radicle-explorer/default.nix
vendored
|
|
@ -14,53 +14,57 @@ let
|
|||
|
||||
httpdSrc = pkgs.radicle-httpd.src;
|
||||
in
|
||||
lib.fix (self: pkgs.buildNpmPackage rec {
|
||||
pname = "radicle-explorer";
|
||||
version = (builtins.fromJSON (builtins.readFile "${src}/package.json")).version;
|
||||
lib.fix (
|
||||
self:
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "radicle-explorer";
|
||||
version = (builtins.fromJSON (builtins.readFile "${src}/package.json")).version;
|
||||
|
||||
# source should be synced with the httpd, which is already in nixpkgs
|
||||
src = pkgs.fetchgit {
|
||||
inherit (httpdSrc) url rev;
|
||||
hash = "sha256:09m13238h6j7g02r6332ihgyyzbjx90pgz14rz29pgv7936h6il8";
|
||||
};
|
||||
# source should be synced with the httpd, which is already in nixpkgs
|
||||
src = pkgs.fetchgit {
|
||||
inherit (httpdSrc) url rev;
|
||||
hash = "sha256:09m13238h6j7g02r6332ihgyyzbjx90pgz14rz29pgv7936h6il8";
|
||||
};
|
||||
|
||||
# This might change during nixpkgs bumps and will need updating. Need to fix
|
||||
# upstream so that there is a normal, callable derivation.
|
||||
npmDepsHash = "sha256:1hbrzfjkfc0q8qk03yi6qb9zqm57h7hnkn7fl0yxkrzbrljaljaz";
|
||||
# This might change during nixpkgs bumps and will need updating. Need to fix
|
||||
# upstream so that there is a normal, callable derivation.
|
||||
npmDepsHash = "sha256:1hbrzfjkfc0q8qk03yi6qb9zqm57h7hnkn7fl0yxkrzbrljaljaz";
|
||||
|
||||
patches = [
|
||||
./0001-remove-dependency-on-plausible.patch
|
||||
];
|
||||
patches = [
|
||||
./0001-remove-dependency-on-plausible.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs --build ./scripts
|
||||
mkdir -p "public/twemoji"
|
||||
cp -t public/twemoji -r -- ${twemoji-assets}/assets/svg/*
|
||||
: >scripts/install-twemoji-assets
|
||||
'';
|
||||
dontConfigure = true;
|
||||
doCheck = false;
|
||||
postPatch = ''
|
||||
patchShebangs --build ./scripts
|
||||
mkdir -p "public/twemoji"
|
||||
cp -t public/twemoji -r -- ${twemoji-assets}/assets/svg/*
|
||||
: >scripts/install-twemoji-assets
|
||||
'';
|
||||
dontConfigure = true;
|
||||
doCheck = false;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out"
|
||||
cp -r -t "$out" build/*
|
||||
runHook postInstall
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out"
|
||||
cp -r -t "$out" build/*
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# Override the build-time configuration with other preferred seeds which are
|
||||
# displayed on the landing page.
|
||||
passthru.withPreferredSeeds = seeds:
|
||||
let
|
||||
originalConfig = builtins.fromJSON (builtins.readFile "${src}/config/default.json");
|
||||
config = originalConfig // {
|
||||
preferredSeeds = seeds;
|
||||
};
|
||||
newConfig = pkgs.writeText "local.json" (builtins.toJSON config);
|
||||
in
|
||||
self.overrideAttrs (_: {
|
||||
preBuild = ''
|
||||
cp ${newConfig} config/local.json
|
||||
'';
|
||||
});
|
||||
})
|
||||
# Override the build-time configuration with other preferred seeds which are
|
||||
# displayed on the landing page.
|
||||
passthru.withPreferredSeeds =
|
||||
seeds:
|
||||
let
|
||||
originalConfig = builtins.fromJSON (builtins.readFile "${src}/config/default.json");
|
||||
config = originalConfig // {
|
||||
preferredSeeds = seeds;
|
||||
};
|
||||
newConfig = pkgs.writeText "local.json" (builtins.toJSON config);
|
||||
in
|
||||
self.overrideAttrs (_: {
|
||||
preBuild = ''
|
||||
cp ${newConfig} config/local.json
|
||||
'';
|
||||
});
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue