-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
39 lines (36 loc) · 1.14 KB
/
flake.nix
File metadata and controls
39 lines (36 loc) · 1.14 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
{
description = "A development shell for the GitHub Copilot CLI (Node Module)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f {inherit system;pkgs=(import nixpkgs {inherit system;});});
in {
packages = forAllSystems ({system,pkgs}: {
default = pkgs.callPackage ./package.nix {};
});
devShells = forAllSystems ({system,pkgs}:
{
updateShell = pkgs.mkShell {
packages = [
pkgs.nodejs_latest
pkgs.jq
];
};
default = pkgs.mkShell {
packages = [
pkgs.nodejs_latest
self.packages.${system}.default
];
shellHook = ''
echo ${self.packages.${system}.default}
echo "✅ 'copilot' command is now available."
'';
NIX_SHELL_PRESERVE_ENVIRONMENT = [ "HOME" ];
};
}
);
};
}