-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
59 lines (54 loc) · 1.6 KB
/
flake.nix
File metadata and controls
59 lines (54 loc) · 1.6 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
{
description = "a8-scripts - Accur8 build and deployment scripts";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
a8-scripts-drv = pkgs.callPackage ./default.nix {
inherit system;
src = self;
};
a8-scripts-pkg = a8-scripts-drv.a8-scripts;
in
{
# Packages output - properly exposed when used as flake input
packages = {
default = a8-scripts-pkg;
a8-scripts = a8-scripts-pkg;
};
# Dev shell for development
devShells.default = pkgs.mkShell {
buildInputs = [ a8-scripts-pkg ];
};
# Apps if needed
apps.default = flake-utils.lib.mkApp {
drv = a8-scripts-pkg;
};
}
) // {
# System-independent outputs
# Overlay for those who prefer overlay approach
overlays.default = final: prev:
let
a8-scripts-drv = final.callPackage ./default.nix {
system = prev.system;
src = self;
};
in {
a8-scripts = a8-scripts-drv.a8-scripts;
};
# Keep backward compatibility lib function if needed
lib.mkA8Scripts = { pkgs, system ? pkgs.system }:
let
a8-scripts-drv = pkgs.callPackage ./default.nix {
inherit system;
src = self;
};
in
a8-scripts-drv.a8-scripts;
};
}