forked from wunderio/csi-rclone
-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
34 lines (28 loc) · 1.43 KB
/
flake.nix
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
{
description = "A basic flake with a shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils}:
flake-utils.lib.eachDefaultSystem (system:
let
# Import pkgs (for your platform) and containerPkgs (x86_64-linux) for crosscompile on MacOS
pkgs = nixpkgs.legacyPackages.${system};
containerPkgs = import nixpkgs { localSystem = system; crossSystem = "x86_64-linux"; };
goModule = import ./devenv/nix/goModule.nix { inherit pkgs; };
inherit (goModule) csiDriver csiDriverLinux;
dockerLayerdImage = import ./devenv/nix/containerImage.nix { inherit pkgs containerPkgs csiDriverLinux; };
scripts = import ./devenv/nix/scripts.nix { inherit pkgs; };
inherit (scripts) initKindCluster deleteKindCluster getKindKubeconfig localDeployScript reloadScript;
in
{
devShells.default = import ./devenv/nix/shell.nix { inherit pkgs; };
packages.csi-rclone-binary = csiDriver;
packages.csi-rclone-binary-linux = csiDriverLinux;
packages.csi-rclone-container-layerd = dockerLayerdImage;
packages.deployToKind = localDeployScript;
packages.reload = reloadScript;
packages.initKind = initKindCluster;
packages.deleteKind = deleteKindCluster;
packages.getKubeconfig = getKindKubeconfig;
});
}