Compare commits
5 Commits
cc8920ef25
...
151824233b
Author | SHA1 | Date | |
---|---|---|---|
|
151824233b | ||
|
fa77f6364c | ||
|
b8265ae360 | ||
|
fc1b37333b | ||
|
c59e0a0324 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,3 +9,4 @@ node_modules/
|
|||||||
!.yarn/versions
|
!.yarn/versions
|
||||||
|
|
||||||
.parcel-cache
|
.parcel-cache
|
||||||
|
.aider*
|
||||||
|
12
flake.lock
generated
12
flake.lock
generated
@ -5,11 +5,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1692799911,
|
"lastModified": 1731533236,
|
||||||
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1693250523,
|
"lastModified": 1743964447,
|
||||||
"narHash": "sha256-y3up5gXMTbnCsXrNEB5j+7TVantDLUYyQLu/ueiXuyg=",
|
"narHash": "sha256-nEo1t3Q0F+0jQ36HJfbJtiRU4OI+/0jX/iITURKe3EE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3efb0f6f404ec8dae31bdb1a9b17705ce0d6986e",
|
"rev": "063dece00c5a77e4a0ea24e5e5a5bd75232806f8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
60
flake.nix
60
flake.nix
@ -1,40 +1,64 @@
|
|||||||
{
|
{
|
||||||
description = "Kucinako - Wordbook of Arzhanai languages";
|
description = "Kucinako — Wordbook of Arzhanai languages";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = {
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
self,
|
||||||
let
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (
|
||||||
|
system: let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
node-modules = pkgs.mkYarnPackage {
|
node-modules = pkgs.mkYarnPackage {
|
||||||
name = "node-modules";
|
name = "node-modules";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
packageJSON = ./package.json;
|
||||||
|
yarnLock = ./yarn.lock;
|
||||||
};
|
};
|
||||||
frontend = pkgs.stdenv.mkDerivation {
|
frontend = pkgs.stdenv.mkDerivation {
|
||||||
name = "frontend";
|
name = "frontend";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
buildInputs = [pkgs.yarn node-modules pkgs.lmdb];
|
buildInputs = [pkgs.yarn node-modules pkgs.nodejs];
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
ln -s ${node-modules}/libexec/kucinako/node_modules node_modules
|
ln -sf ${node-modules}/libexec/kucinako/node_modules node_modules
|
||||||
${pkgs.yarn}/bin/yarn build
|
${pkgs.yarn}/bin/yarn build
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir $out
|
mkdir -p $out
|
||||||
mv dist $out/dist
|
cp -r dist/* $out/
|
||||||
'';
|
|
||||||
|
|
||||||
|
# Create a bin directory with a wrapper script
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cat > $out/bin/frontend <<EOF
|
||||||
|
#!/bin/sh
|
||||||
|
${pkgs.python3}/bin/python -m http.server --directory $out 8000
|
||||||
|
EOF
|
||||||
|
chmod +x $out/bin/frontend
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
packages = {
|
||||||
packages = {
|
node-modules = node-modules;
|
||||||
node-modules = node-modules;
|
default = frontend;
|
||||||
default = frontend;
|
};
|
||||||
};
|
|
||||||
}
|
apps.default = {
|
||||||
|
type = "app";
|
||||||
|
program = "${frontend}/bin/frontend";
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.nodejs
|
||||||
|
pkgs.yarn
|
||||||
|
pkgs.nodePackages.typescript
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ const App = (_props) => {
|
|||||||
<PasswordDialog />
|
<PasswordDialog />
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<div className="search">
|
<div className="search">
|
||||||
<h1>Kucinako - Wordbook of Arzhanai languages</h1>
|
<h1>Kucinako — Wordbook of Arzhanai languages</h1>
|
||||||
<p><b>Kucinako</b> (<i>Saimiar</i> "word-book") is a dictionary of words in various languages of the world Arzhanø, and their English
|
<p><b>Kucinako</b> (<i>Saimiar</i> "word-book") is a dictionary of words in various languages of the world Arzhanø, and their English
|
||||||
equivalents.</p>
|
equivalents.</p>
|
||||||
<div className="textInput">
|
<div className="textInput">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user