-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
61 lines (55 loc) · 1.66 KB
/
flake.nix
File metadata and controls
61 lines (55 loc) · 1.66 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
56
57
58
59
60
61
{
description = "A codegen tool for NanoPack";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?tag=24.05";
};
outputs = { self, nixpkgs, ... }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in
{
packages = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
in
rec {
nanoc = pkgs.buildGoModule {
pname = "nanoc";
version = "0.1.0";
src = ./.;
vendorHash = "sha256-wyg35Xnw2TJirFCHX6DQY9OaeOBJf+xKnYvXk3AKzDU=";
buildInputs = [
# nanoc requires clang-format in clang-tools
pkgs.clang-tools
# nanoc uses biome to format typescript code
pkgs.biome
# nanoc uses swift-format to format swift code
pkgs.swift-format
];
};
default = nanoc;
});
devShells = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.mkShell {
packages = [
pkgs.go
pkgs.gotools
# nanoc requires clang-format in clang-tools
pkgs.clang-tools
# nanoc uses biome to format typescript code
pkgs.biome
# nanoc uses swift-format to format swift code
pkgs.swift-format
# used to build c++ examples
pkgs.cmake
];
};
});
};
}