-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
37 lines (31 loc) · 1.04 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
{
description = "Use colmena to provision instances created by Terraform";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
devPackages = [
pkgs.rubyPackages_3_1.solargraph
pkgs.rubyPackages_3_1.rspec
pkgs.rubyPackages_3_1.rake
];
rubyWithGems = pkgs.ruby_3_1.withPackages (ps: with ps; [ slop ]);
in {
packages = flake-utils.lib.flattenTree {
default = pkgs.stdenv.mkDerivation {
name = "terramena";
src = self;
buildInputs = [ rubyWithGems ];
installPhase = ''
mkdir -p $out/lib $out/bin $out/share
cp bin/* $out/bin/
cp lib/* $out/lib/
cp share/* $out/share/
'';
};
};
devShells.default =
pkgs.mkShell { buildInputs = [ rubyWithGems ] ++ devPackages; };
});
}