mirror of
https://github.com/nix-community/noogle.git
synced 2024-11-26 10:24:25 +03:00
40 lines
1005 B
Nix
40 lines
1005 B
Nix
{
|
|
inputs.dream2nix.url = "github:nix-community/dream2nix";
|
|
inputs.nixdoc-fork.url = "github:hsjobeki/nixdoc";
|
|
outputs = inp:
|
|
let
|
|
system = "x86_64-linux";
|
|
inherit (builtins.fromJSON (builtins.readFile ./package.json)) name;
|
|
in
|
|
(inp.dream2nix.lib.makeFlakeOutputs {
|
|
systemsFromFile = ./nix_systems;
|
|
config.projectRoot = ./.;
|
|
source = ./.;
|
|
settings = [
|
|
{
|
|
subsystemInfo.nodejs = 18;
|
|
}
|
|
];
|
|
packageOverrides = {
|
|
${name}.staticPage = {
|
|
preBuild = ''
|
|
cp ${inp.nixdoc-fork.packages.${system}.data} ./models/data.json
|
|
'';
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
npm run export
|
|
mkdir -p $out/static
|
|
cp -r ./out/* $out/static/
|
|
|
|
runHook postInstall
|
|
'';
|
|
};
|
|
};
|
|
});
|
|
# // {
|
|
# packages.${system}.nixi = inp.nixdoc-fork.packages.${system}.data;
|
|
# };
|
|
|
|
}
|