forked from scylladb/scylladb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
51 lines (44 loc) · 1.24 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
description = "Monstrously Fast + Scalable NoSQL";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }: {
overlays.default = import ./dist/nix/overlay.nix nixpkgs;
lib = {
_attrs = system: let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
repl = pkgs.writeText "repl" ''
let
self = builtins.getFlake (toString ${self.outPath});
attrs = self.lib._attrs "${system}";
in {
inherit self;
inherit (attrs) pkgs;
}
'';
args = {
flake = true;
srcPath = "${self}";
inherit pkgs repl;
};
package = import ./default.nixpkgs args;
devShell = import ./shell.nix args;
in {
inherit pkgs args package devShell;
};
};
}
// (flake-utils.lib.eachDefaultSystem (system: let
packageName = "scylla";
attrs = self.lib._attrs system;
in {
packages.${packageName} = attrs.package;
defaultPackage = self.packages.${system}.${packageName};
inherit (attrs) devShell;
}));
}