2023-08-29 22:49:16 -07:00
|
|
|
{
|
|
|
|
description = "Kucinako - Wordbook of Arzhanai languages";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
node-modules = pkgs.mkYarnPackage {
|
|
|
|
name = "node-modules";
|
|
|
|
src = ./.;
|
|
|
|
};
|
|
|
|
frontend = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "frontend";
|
|
|
|
src = ./.;
|
2023-09-15 00:50:57 -07:00
|
|
|
buildInputs = [pkgs.yarn node-modules pkgs.lmdb];
|
2023-08-29 22:49:16 -07:00
|
|
|
buildPhase = ''
|
|
|
|
ln -s ${node-modules}/libexec/kucinako/node_modules node_modules
|
|
|
|
${pkgs.yarn}/bin/yarn build
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
mv dist $out/dist
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
packages = {
|
|
|
|
node-modules = node-modules;
|
|
|
|
default = frontend;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|