Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
81 lines (73 loc) · 2.01 KB
/
Copy pathflake.nix
File metadata and controls
81 lines (73 loc) · 2.01 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
description = "actrun – Run GitHub Actions locally";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
moonbit-overlay.url = "github:moonbit-community/moonbit-overlay";
moon-registry = {
url = "git+https://mooncakes.io/git/index";
flake = false;
};
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
flake = {
overlays.default = _final: prev: {
actrun = prev.callPackage ./package.nix {
moonRegistryIndex = inputs.moon-registry;
};
};
};
perSystem =
{ system, ... }:
let
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.moonbit-overlay.overlays.default ];
config.allowBroken = true;
};
actrun = pkgs.callPackage ./package.nix {
moonRegistryIndex = inputs.moon-registry;
};
moonHome = pkgs.moonPlatform.bundleWithRegistry {
cachedRegistry = pkgs.moonPlatform.buildCachedRegistry {
moonModJson = ./nix/moon.mod.json;
registryIndexSrc = inputs.moon-registry;
};
};
in
{
packages = {
default = actrun;
inherit actrun;
};
apps = {
default = {
type = "app";
program = "${actrun}/bin/actrun";
};
actrun = {
type = "app";
program = "${actrun}/bin/actrun";
};
};
devShells.default = pkgs.mkShellNoCC {
packages = [
moonHome
pkgs.git
pkgs.just
pkgs.pnpm
pkgs.nodejs
];
env.MOON_HOME = "${moonHome}";
};
};
};
}