gues-kucinako/flake.nix

52 lines
1.1 KiB
Nix
Raw Normal View History

2023-08-29 22:49:16 -07:00
{
description = "Kucinako Wordbook of Arzhanai languages";
2023-08-29 22:49:16 -07:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
2025-04-07 19:34:09 -07:00
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system: let
2023-08-29 22:49:16 -07:00
pkgs = nixpkgs.legacyPackages.${system};
2025-04-08 00:27:32 -07:00
in {
packages.default = pkgs.mkYarnPackage {
name = "kucinako";
2023-08-29 22:49:16 -07:00
src = ./.;
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
2025-04-08 00:03:41 -07:00
2025-04-08 00:27:32 -07:00
buildPhase = ''
export HOME=$(mktemp -d)
yarn --offline build
2023-08-29 22:49:16 -07:00
'';
2025-04-08 00:27:32 -07:00
installPhase = ''
mkdir -p $out
2025-04-08 00:27:32 -07:00
cp -r deps/kucinako/dist/* $out/
2023-08-29 22:49:16 -07:00
'';
2025-04-07 19:34:09 -07:00
2025-04-08 00:27:32 -07:00
# Ensure Parcel and other build tools are available
nativeBuildInputs = with pkgs; [
nodejs
yarn
nodePackages.typescript
];
2025-04-07 19:34:09 -07:00
};
devShells.default = pkgs.mkShell {
2025-04-08 00:27:32 -07:00
buildInputs = with pkgs; [
nodejs
yarn
nodePackages.typescript
2025-04-07 19:34:09 -07:00
];
};
}
2023-08-29 22:49:16 -07:00
);
}