Daniel Siepmann
de06dbcd13
The flake is very basic and encapsulates frontend compilation via node for customer projects. The flake is intended to be used by other flake.nix within the projects, which will use the defined packages to build apps outputs. They should use the packages like `writeShellApplication` itself, call it with necessary argument set in order to receive a out of the box working solution. A template is also provided which can be used like: nix flake init -t <path to this flake> `defaultTemplate` is defined in output and will be used.
35 lines
893 B
Nix
35 lines
893 B
Nix
{
|
|
description = "Concrete Flake for TYPO3 project.";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
typo3.url = "git+https://gitea.daniel-siepmann.de/danielsiepmann/nixpkgs?ref=main&dir=flakes/projects/web/typo3/wm-specific";
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
flake-utils,
|
|
typo3
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
packageJsonPath = "packages/sitepackage/Build/";
|
|
nodePkg = pkgs.nodejs-14_x;
|
|
in rec {
|
|
apps = rec {
|
|
compileAssets = typo3.lib.compileAssets {
|
|
inherit pkgs packageJsonPath nodePkg;
|
|
};
|
|
watchAssets = typo3.lib.watchAssets {
|
|
inherit pkgs compileAssets packageJsonPath nodePkg;
|
|
};
|
|
};
|
|
|
|
defaultApp = apps.compileAssets;
|
|
}
|
|
);
|
|
}
|