-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
53 lines (50 loc) · 1.3 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
description = "Shardus archive server";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
utils,
}: let
appName = "shardus-archive-server";
out =
utils.lib.eachDefaultSystem
(system: let
pkgs = import nixpkgs {
inherit system;
};
buildNodeJs = pkgs.callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" {python = pkgs.python3;};
custom-nodejs = buildNodeJs {
enableNpm = true;
version = "18.16.1";
sha256 = "0wp2xyz5yqcvb6949xaqpan73rfhdc3cdfsvx7vzvzc9in64yh78";
};
nativeBuildInputs = with pkgs; [
pkg-config
custom-nodejs
];
buildInputs = with pkgs; [];
in {
# `nix develop` or direnv
devShell = pkgs.mkShell {
packages =
nativeBuildInputs
++ buildInputs
++ (with pkgs; [
nodePackages.typescript-language-server
nodePackages.vscode-langservers-extracted
nodePackages.prettier
]);
};
});
in
out
// {
overlay = final: prev: {
${appName} = self.defaultPackage.${prev.system};
};
};
}