Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
51 lines (49 loc) · 1.61 KB
/
Copy pathflake.nix
File metadata and controls
51 lines (49 loc) · 1.61 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
{
description = "Accentor API";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
bundix = {
url = "github:inscapist/bundix";
inputs.nixpkgs.follows = "nixpkgs";
};
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs:
let
rubyForPkgs = pkgs: pkgs.ruby_4_0.override { jemallocSupport = true; };
gemsForPkgs = pkgs: pkgs.bundlerEnv {
name = "accentor-api-env";
ruby = rubyForPkgs pkgs;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
groups = [ "default" "development" "test" "production" ];
};
in
{
packages = builtins.mapAttrs
(system: pkgs':
let
pkgs = pkgs'.extend (self: super: { bundix = inputs.bundix; });
in
{
accentor-api = pkgs.callPackage ./default.nix { accentor-api-env = gemsForPkgs pkgs; };
default = inputs.self.packages.${system}.accentor-api;
})
inputs.nixpkgs.legacyPackages;
devShells = builtins.mapAttrs
(system: pkgs':
let
pkgs = pkgs'.appendOverlays [ (self: super: { bundix = inputs.bundix; }) inputs.devshell.overlays.default ];
in
{
accentor-api = pkgs.callPackage ./shell.nix { accentor-api-env = gemsForPkgs pkgs; };
default = inputs.self.devShells.${system}.accentor-api;
deps = pkgs.devshell.mkShell { packages = [ (rubyForPkgs pkgs) pkgs.bundix ]; };
})
inputs.nixpkgs.legacyPackages;
};
}