2022-09-18 18:52:01 +01:00
|
|
|
{
|
2023-01-05 02:13:13 +00:00
|
|
|
self,
|
2022-09-18 18:52:01 +01:00
|
|
|
nixpkgs,
|
|
|
|
dream2nix,
|
|
|
|
fenix,
|
|
|
|
system,
|
2023-01-05 02:13:13 +00:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (nixpkgs.legacyPackages.${system}) runCommandLocal yj;
|
|
|
|
|
|
|
|
rust-toolchain = fenix.packages.${system}.stable;
|
|
|
|
in
|
|
|
|
dream2nix.lib.makeFlakeOutputs {
|
|
|
|
systems = [system];
|
|
|
|
config.projectRoot = self;
|
|
|
|
projects = ../projects.toml;
|
|
|
|
|
|
|
|
source = runCommandLocal "source" {nativeBuildInputs = [yj];} ''
|
|
|
|
cp -r ${self} $out/
|
|
|
|
chmod -R u+w $out
|
|
|
|
yj < $out/templates/package.yaml > $out/templates/package.json
|
|
|
|
'';
|
|
|
|
|
|
|
|
packageOverrides = {
|
|
|
|
tlaternet-webserver.set-toolchain.overrideRustToolchain = old: {
|
|
|
|
cargo = rust-toolchain.minimalToolchain;
|
|
|
|
rustc = rust-toolchain.minimalToolchain;
|
2022-09-18 18:52:01 +01:00
|
|
|
};
|
|
|
|
|
2023-01-05 02:13:13 +00:00
|
|
|
tlaternet-webserver-deps.set-toolchain.overrideRustToolchain = old: {
|
|
|
|
cargo = rust-toolchain.minimalToolchain;
|
|
|
|
rustc = rust-toolchain.minimalToolchain;
|
|
|
|
};
|
2022-09-18 18:52:01 +01:00
|
|
|
|
2023-01-05 02:13:13 +00:00
|
|
|
tlaternet = {
|
|
|
|
install-only-dist = {
|
|
|
|
installPhase = ''
|
|
|
|
cp -r $nodeModules/tlaternet/dist $out
|
|
|
|
'';
|
2022-09-18 18:52:01 +01:00
|
|
|
};
|
2023-01-05 02:13:13 +00:00
|
|
|
};
|
2022-09-18 18:52:01 +01:00
|
|
|
|
2023-01-05 02:13:13 +00:00
|
|
|
sharp = {
|
|
|
|
add-libvips = {
|
|
|
|
buildInputs = old:
|
|
|
|
old
|
|
|
|
++ (with nixpkgs.legacyPackages.${system}; [
|
|
|
|
vips
|
|
|
|
pkg-config
|
|
|
|
]);
|
2022-09-18 18:52:01 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-01-05 02:13:13 +00:00
|
|
|
}
|
|
|
|
// {
|
|
|
|
inherit rust-toolchain;
|
|
|
|
}
|