+75
-91
flake.lock
+75
-91
flake.lock
···
1
1
{
2
-
"nodes": {
3
-
"naked-shell": {
4
-
"locked": {
5
-
"lastModified": 1681286841,
6
-
"narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=",
7
-
"owner": "90-008",
8
-
"repo": "mk-naked-shell",
9
-
"rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd",
10
-
"type": "github"
11
-
},
12
-
"original": {
13
-
"owner": "90-008",
14
-
"repo": "mk-naked-shell",
15
-
"type": "github"
16
-
}
17
-
},
18
-
"nixpkgs": {
19
-
"locked": {
20
-
"lastModified": 1744932701,
21
-
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
22
-
"owner": "nixos",
23
-
"repo": "nixpkgs",
24
-
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
25
-
"type": "github"
26
-
},
27
-
"original": {
28
-
"owner": "nixos",
29
-
"ref": "nixos-unstable",
30
-
"repo": "nixpkgs",
31
-
"type": "github"
32
-
}
33
-
},
34
-
"nixpkgs-lib": {
35
-
"locked": {
36
-
"lastModified": 1743296961,
37
-
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
38
-
"owner": "nix-community",
39
-
"repo": "nixpkgs.lib",
40
-
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
41
-
"type": "github"
42
-
},
43
-
"original": {
44
-
"owner": "nix-community",
45
-
"repo": "nixpkgs.lib",
46
-
"type": "github"
47
-
}
48
-
},
49
-
"parts": {
50
-
"inputs": {
51
-
"nixpkgs-lib": "nixpkgs-lib"
52
-
},
53
-
"locked": {
54
-
"lastModified": 1743550720,
55
-
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
56
-
"owner": "hercules-ci",
57
-
"repo": "flake-parts",
58
-
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
59
-
"type": "github"
60
-
},
61
-
"original": {
62
-
"owner": "hercules-ci",
63
-
"repo": "flake-parts",
64
-
"type": "github"
65
-
}
66
-
},
67
-
"root": {
68
-
"inputs": {
69
-
"naked-shell": "naked-shell",
70
-
"nixpkgs": "nixpkgs",
71
-
"parts": "parts",
72
-
"systems": "systems"
73
-
}
74
-
},
75
-
"systems": {
76
-
"locked": {
77
-
"lastModified": 1680978846,
78
-
"narHash": "sha256-Gtqg8b/v49BFDpDetjclCYXm8mAnTrUzR0JnE2nv5aw=",
79
-
"owner": "nix-systems",
80
-
"repo": "x86_64-linux",
81
-
"rev": "2ecfcac5e15790ba6ce360ceccddb15ad16d08a8",
82
-
"type": "github"
83
-
},
84
-
"original": {
85
-
"owner": "nix-systems",
86
-
"repo": "x86_64-linux",
87
-
"type": "github"
88
-
}
89
-
}
90
-
},
91
-
"root": "root",
92
-
"version": 7
2
+
"nodes": {
3
+
"naked-shell": {
4
+
"locked": {
5
+
"lastModified": 1681286841,
6
+
"narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=",
7
+
"owner": "90-008",
8
+
"repo": "mk-naked-shell",
9
+
"rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd",
10
+
"type": "github"
11
+
},
12
+
"original": {
13
+
"owner": "90-008",
14
+
"repo": "mk-naked-shell",
15
+
"type": "github"
16
+
}
17
+
},
18
+
"nixpkgs": {
19
+
"locked": {
20
+
"lastModified": 1752950548,
21
+
"narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=",
22
+
"owner": "nixos",
23
+
"repo": "nixpkgs",
24
+
"rev": "c87b95e25065c028d31a94f06a62927d18763fdf",
25
+
"type": "github"
26
+
},
27
+
"original": {
28
+
"owner": "nixos",
29
+
"ref": "nixos-unstable",
30
+
"repo": "nixpkgs",
31
+
"type": "github"
32
+
}
33
+
},
34
+
"nixpkgs-lib": {
35
+
"locked": {
36
+
"lastModified": 1751159883,
37
+
"narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=",
38
+
"owner": "nix-community",
39
+
"repo": "nixpkgs.lib",
40
+
"rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab",
41
+
"type": "github"
42
+
},
43
+
"original": {
44
+
"owner": "nix-community",
45
+
"repo": "nixpkgs.lib",
46
+
"type": "github"
47
+
}
48
+
},
49
+
"parts": {
50
+
"inputs": {
51
+
"nixpkgs-lib": "nixpkgs-lib"
52
+
},
53
+
"locked": {
54
+
"lastModified": 1753121425,
55
+
"narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=",
56
+
"owner": "hercules-ci",
57
+
"repo": "flake-parts",
58
+
"rev": "644e0fc48951a860279da645ba77fe4a6e814c5e",
59
+
"type": "github"
60
+
},
61
+
"original": {
62
+
"owner": "hercules-ci",
63
+
"repo": "flake-parts",
64
+
"type": "github"
65
+
}
66
+
},
67
+
"root": {
68
+
"inputs": {
69
+
"naked-shell": "naked-shell",
70
+
"nixpkgs": "nixpkgs",
71
+
"parts": "parts"
72
+
}
73
+
}
74
+
},
75
+
"root": "root",
76
+
"version": 7
93
77
}
+12
-18
flake.nix
+12
-18
flake.nix
···
1
1
{
2
2
inputs.parts.url = "github:hercules-ci/flake-parts";
3
3
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
4
-
inputs.systems.url = "github:nix-systems/x86_64-linux";
5
4
inputs.naked-shell.url = "github:90-008/mk-naked-shell";
6
5
7
6
outputs = inp:
8
7
inp.parts.lib.mkFlake {inputs = inp;} {
9
-
systems = import inp.systems;
8
+
systems = ["x86_64-linux"];
10
9
imports = [
11
10
inp.naked-shell.flakeModule
12
11
];
···
16
15
...
17
16
}: let
18
17
pkgs = inp.nixpkgs.legacyPackages.${system};
19
-
packageJson = builtins.fromJSON (builtins.readFile ./package.json);
20
18
in {
21
19
devShells.default = config.mk-naked-shell.lib.mkNakedShell {
22
20
name = "gazesys-devshell";
···
30
28
'';
31
29
};
32
30
packages.gazesys-modules = pkgs.stdenv.mkDerivation {
33
-
pname = "${packageJson.name}-modules";
34
-
version = packageJson.version;
31
+
name = "gazesys-modules";
35
32
36
33
src = ./.;
37
34
···
39
36
outputHashAlgo = "sha256";
40
37
outputHashMode = "recursive";
41
38
42
-
nativeBuildInputs = with pkgs; [bun];
39
+
nativeBuildInputs = [pkgs.bun];
43
40
44
41
dontConfigure = true;
45
-
# impureEnvVars = pkgs.lib.fetchers.proxyImpureEnvVars
46
-
# ++ [ "GIT_PROXY_COMMAND" "SOCKS_SERVER" ];
42
+
dontCheck = true;
43
+
dontFixup = true;
44
+
dontPatchShebangs = true;
47
45
48
46
buildPhase = "bun install --no-cache --no-progress --frozen-lockfile";
49
47
installPhase = ''
50
48
mkdir -p $out
51
49
52
-
# Do not copy .cache or .bin
53
50
cp -R ./node_modules/* $out
54
51
cp -R ./node_modules/.bin $out
55
52
ls -la $out
56
53
'';
57
-
dontFixup = true;
58
-
dontPatchShebangs = true;
59
54
};
60
55
packages.gazesys = pkgs.stdenv.mkDerivation {
61
-
pname = packageJson.name;
62
-
version = packageJson.version;
56
+
name = "gazesys-website";
63
57
64
58
src = ./.;
65
59
66
-
nativeBuildInputs = [pkgs.makeBinaryWrapper pkgs.rsync];
60
+
nativeBuildInputs = [pkgs.makeBinaryWrapper];
67
61
buildInputs = [pkgs.bun];
68
62
69
63
PUBLIC_BASE_URL="http://localhost:5173";
70
-
GUESTBOOK_BASE_URL="http://localhost:8080";
64
+
65
+
dontCheck = true;
71
66
72
-
# dontConfigure = true;
73
67
configurePhase = ''
74
68
runHook preConfigure
75
69
cp -R --no-preserve=ownership ${config.packages.gazesys-modules} node_modules
76
70
find node_modules -type d -exec chmod 755 {} \;
77
71
substituteInPlace node_modules/.bin/vite \
78
-
--replace-fail "/usr/bin/env node" "${pkgs.nodejs-slim_latest}/bin/node"
72
+
--replace-fail "/usr/bin/env node" "${pkgs.bun}/bin/bun --bun"
79
73
runHook postConfigure
80
74
'';
81
75
buildPhase = ''
···
89
83
mkdir -p $out/bin
90
84
cp -R ./build/* $out
91
85
92
-
makeBinaryWrapper ${pkgs.bun}/bin/bun $out/bin/${packageJson.name} \
86
+
makeBinaryWrapper ${pkgs.bun}/bin/bun $out/bin/website \
93
87
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.bun ]} \
94
88
--add-flags "run --bun --no-install --cwd $out start"
95
89