gues-kucinako/flake.nix
2025-04-08 00:27:32 -07:00

52 lines
1.1 KiB
Nix

{
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};
in {
packages.default = pkgs.mkYarnPackage {
name = "kucinako";
src = ./.;
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
buildPhase = ''
export HOME=$(mktemp -d)
yarn --offline build
'';
installPhase = ''
mkdir -p $out
cp -r deps/kucinako/dist/* $out/
'';
# Ensure Parcel and other build tools are available
nativeBuildInputs = with pkgs; [
nodejs
yarn
nodePackages.typescript
];
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
yarn
nodePackages.typescript
];
};
}
);
}