forked from auxolotl/docs
This is dfh@ playing with jj
These are some more descriptions.
This commit is contained in:
parent
c7dc1fdcec
commit
d2fed9c4d0
23
flake.lock
23
flake.lock
|
@ -89,7 +89,8 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"aux-wiki": "aux-wiki",
|
"aux-wiki": "aux-wiki",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"snowfall-lib": "snowfall-lib"
|
"snowfall-lib": "snowfall-lib",
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"snowfall-lib": {
|
"snowfall-lib": {
|
||||||
|
@ -128,6 +129,26 @@
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"treefmt-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725271838,
|
||||||
|
"narHash": "sha256-VcqxWT0O/gMaeWTTjf1r4MOyG49NaNxW4GHTO3xuThE=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "9fb342d14b69aefdf46187f6bb80a4a0d97007cd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
25
flake.nix
25
flake.nix
|
@ -9,6 +9,11 @@
|
||||||
inputs.aux-wiki.url = "git+https://git.auxolotl.org/auxolotl/wiki";
|
inputs.aux-wiki.url = "git+https://git.auxolotl.org/auxolotl/wiki";
|
||||||
inputs.aux-wiki.flake = false;
|
inputs.aux-wiki.flake = false;
|
||||||
|
|
||||||
|
inputs.treefmt-nix = {
|
||||||
|
url = "github:numtide/treefmt-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs:
|
inputs:
|
||||||
inputs.snowfall-lib.mkFlake {
|
inputs.snowfall-lib.mkFlake {
|
||||||
|
@ -21,11 +26,19 @@
|
||||||
title = "Aux Manual Generator";
|
title = "Aux Manual Generator";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs-builder = channels: {
|
outputs-builder =
|
||||||
checks."//tmp/this-is-path-traversal" = inputs.self.packages.${channels.nixpkgs.system}.aux-wiki;
|
channels:
|
||||||
checks."/aux-wiki/path-traversal-2" = inputs.self.packages.${channels.nixpkgs.system}.aux-wiki;
|
let
|
||||||
checks."aux-wiki/all-good" = inputs.self.packages.${channels.nixpkgs.system}.aux-wiki;
|
treefmt = inputs.treefmt-nix.lib.evalModule channels.nixpkgs ./treefmt.nix;
|
||||||
};
|
in
|
||||||
|
{
|
||||||
|
checks."//tmp/this-is-path-traversal" = inputs.self.packages.${channels.nixpkgs.system}.aux-wiki;
|
||||||
|
checks."/aux-wiki/path-traversal-2" = inputs.self.packages.${channels.nixpkgs.system}.aux-wiki;
|
||||||
|
checks."aux-wiki/all-good" = inputs.self.packages.${channels.nixpkgs.system}.aux-wiki;
|
||||||
|
|
||||||
|
formatter = treefmt.config.build.wrapper;
|
||||||
|
checks.formatting = treefmt.config.build.check inputs.self;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ channels, ... }:
|
{ channels, ... }:
|
||||||
final: prev: {
|
_final: _prev: {
|
||||||
lix-docs = channels.nixpkgs.lix.overrideAttrs {
|
lix-docs = channels.nixpkgs.lix.overrideAttrs {
|
||||||
pname = "lix-docs";
|
pname = "lix-docs";
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
cp -r community $out/community
|
cp -r community $out/community
|
||||||
cp -r contributing $out/contributing
|
cp -r contributing $out/contributing
|
||||||
cp -r docs $out/docs
|
cp -r docs $out/docs
|
||||||
|
|
||||||
# foo, bar, baz, qux, quxx
|
# foo, bar, baz, qux, quxx
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ stdenv.mkDerivation {
|
||||||
inherit (lix-docs) version;
|
inherit (lix-docs) version;
|
||||||
pname = "lix-docs-md";
|
pname = "lix-docs-md";
|
||||||
|
|
||||||
src = lix-docs.src;
|
inherit (lix-docs) src;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
vim
|
vim
|
||||||
|
|
|
@ -40,7 +40,7 @@ let
|
||||||
);
|
);
|
||||||
|
|
||||||
options =
|
options =
|
||||||
(buildFromConfig ({ ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux;
|
(buildFromConfig (_: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux;
|
||||||
|
|
||||||
customPython = pkgs.python312.withPackages (ps: [
|
customPython = pkgs.python312.withPackages (ps: [
|
||||||
ps.jq
|
ps.jq
|
||||||
|
|
|
@ -20,7 +20,7 @@ let
|
||||||
libset =
|
libset =
|
||||||
toplib:
|
toplib:
|
||||||
builtins.map (subsetname: {
|
builtins.map (subsetname: {
|
||||||
subsetname = subsetname;
|
inherit subsetname;
|
||||||
functions = libDefPos [ ] toplib.${subsetname};
|
functions = libDefPos [ ] toplib.${subsetname};
|
||||||
}) (builtins.map (x: x.name) lib.amg.libsets);
|
}) (builtins.map (x: x.name) lib.amg.libsets);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
relativeLocs = (builtins.map fnLocationRelative liblocations);
|
relativeLocs = builtins.map fnLocationRelative liblocations;
|
||||||
sanitizeId = builtins.replaceStrings [ "'" ] [ "-prime" ];
|
sanitizeId = builtins.replaceStrings [ "'" ] [ "-prime" ];
|
||||||
|
|
||||||
urlPrefix = "https://github.com/NixOS/nixpkgs/blob/${revision}";
|
urlPrefix = "https://github.com/NixOS/nixpkgs/blob/${revision}";
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
),
|
),
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
lib = pkgs.lib;
|
inherit (pkgs) lib;
|
||||||
inherit (lib.attrsets) attrNames filterAttrs;
|
inherit (lib.attrsets) attrNames filterAttrs;
|
||||||
inherit (lib.lists)
|
inherit (lib.lists)
|
||||||
filter
|
filter
|
||||||
|
|
24
treefmt.nix
Normal file
24
treefmt.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
_: {
|
||||||
|
# Used to find the project root
|
||||||
|
projectRootFile = "flake.nix";
|
||||||
|
|
||||||
|
# Files not to format.
|
||||||
|
settings.global.excludes = [
|
||||||
|
".editorconfig"
|
||||||
|
".jj/**"
|
||||||
|
"LICENSE"
|
||||||
|
];
|
||||||
|
|
||||||
|
# nix
|
||||||
|
programs.nixfmt-rfc-style.enable = true;
|
||||||
|
programs.statix.enable = true;
|
||||||
|
programs.deadnix.enable = true;
|
||||||
|
|
||||||
|
# markdown
|
||||||
|
programs.prettier = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
editorconfig = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue