-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
55 lines (48 loc) · 1.27 KB
/
flake.nix
File metadata and controls
55 lines (48 loc) · 1.27 KB
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
54
55
{
description = "Rust + Nix starter";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = {
self,
flake-utils,
nixpkgs,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
nodejs = pkgs.nodejs_20;
in {
formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.bws
pkgs.terraform
nodejs
nodejs.pkgs.typescript-language-server
];
};
packages.staticAssets = pkgs.buildNpmPackage {
pname = "dedovic.com";
version = "1.0.0";
src = ./.;
nativeBuildInputs = [pkgs.pkg-config pkgs.python310];
npmInstallFlags = ["--no-dev"];
buildInputs = [pkgs.vips];
inherit nodejs;
npmDepsHash = "sha256-hDPJtyCeiM3vMEgZg3C1jfEcJuHF4u2KltOci0ck7S4=";
buildPhase = ''
npx parcel build --dist-dir dist src/index.pug
'';
installPhase = ''
mkdir $out
cp -r dist/* $out
'';
};
}
);
}