+1
.envrc
+1
.envrc
···
1
+
use flake
+3
.gitignore
+3
.gitignore
+35
default.nix
+35
default.nix
···
1
+
# this doesn't work lol. sad!
2
+
{
3
+
lib,
4
+
stdenv,
5
+
fetchYarnDeps,
6
+
yarnConfigHook,
7
+
yarnBuildHook,
8
+
yarnInstallHook,
9
+
nodejs,
10
+
}:
11
+
let
12
+
package_json = lib.importJSON ./package.json;
13
+
in
14
+
stdenv.mkDerivation (finalAttrs: {
15
+
pname = package_json.name;
16
+
version = package_json.version;
17
+
18
+
src = ./.;
19
+
20
+
yarnOfflineCache = fetchYarnDeps {
21
+
yarnLock = finalAttrs.src + "/yarn.lock";
22
+
hash = "sha256-nuUPWMN6FKFoHOpI/nbM9Uw3Ng6BKcjXaQ38LBAzN1A=";
23
+
};
24
+
25
+
nativeBuildInputs = [
26
+
yarnConfigHook
27
+
yarnBuildHook
28
+
yarnInstallHook
29
+
nodejs
30
+
];
31
+
32
+
meta = {
33
+
# ...
34
+
};
35
+
})
+43
flake.lock
+43
flake.lock
···
1
+
{
2
+
"nodes": {
3
+
"nixpkgs": {
4
+
"locked": {
5
+
"lastModified": 1743583204,
6
+
"narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
7
+
"owner": "NixOS",
8
+
"repo": "nixpkgs",
9
+
"rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434",
10
+
"type": "github"
11
+
},
12
+
"original": {
13
+
"owner": "NixOS",
14
+
"ref": "nixos-unstable",
15
+
"repo": "nixpkgs",
16
+
"type": "github"
17
+
}
18
+
},
19
+
"root": {
20
+
"inputs": {
21
+
"nixpkgs": "nixpkgs",
22
+
"systems": "systems"
23
+
}
24
+
},
25
+
"systems": {
26
+
"locked": {
27
+
"lastModified": 1681028828,
28
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
29
+
"owner": "nix-systems",
30
+
"repo": "default",
31
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
32
+
"type": "github"
33
+
},
34
+
"original": {
35
+
"owner": "nix-systems",
36
+
"repo": "default",
37
+
"type": "github"
38
+
}
39
+
}
40
+
},
41
+
"root": "root",
42
+
"version": 7
43
+
}
+34
flake.nix
+34
flake.nix
···
1
+
{
2
+
inputs = {
3
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4
+
systems.url = "github:nix-systems/default";
5
+
};
6
+
7
+
outputs =
8
+
{ nixpkgs, systems, ... }:
9
+
let
10
+
forAllSystems =
11
+
function: nixpkgs.lib.genAttrs (import systems) (system: function nixpkgs.legacyPackages.${system});
12
+
in
13
+
{
14
+
packages = forAllSystems (pkgs: {
15
+
default = pkgs.callPackage ./default.nix { };
16
+
});
17
+
devShells = forAllSystems (pkgs: {
18
+
default =
19
+
with pkgs;
20
+
mkShell {
21
+
packages = [
22
+
just
23
+
fastmod
24
+
nodejs
25
+
yarn
26
+
crowdin-cli
27
+
28
+
typescript
29
+
typescript-language-server
30
+
];
31
+
};
32
+
});
33
+
};
34
+
}