Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
48 lines (45 loc) · 1.46 KB
/
Copy pathflake.nix
File metadata and controls
48 lines (45 loc) · 1.46 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
{
description = "Infrahub development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
git
gh
lychee
vale
stdenv.cc.cc.lib
nodejs_24
] ++ lib.optionals stdenv.isLinux [
# bonsai (enterprise extra) has no Linux wheel, so it compiles from
# sdist and links libldap + libsasl2. macOS uses a prebuilt wheel
# against the system OpenLDAP, so neither is needed there.
openldap
cyrus_sasl
];
shellHook = ''
echo "Infrahub development environment"
echo "Available tools:"
echo " - git: $(git --version)"
echo " - gh (GitHub CLI): $(gh --version | head -n1)"
echo " - lychee (link checker): $(lychee --version)"
echo " - vale (prose linter): $(vale --version)"
'';
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath ([
pkgs.stdenv.cc.cc.lib
] ++ pkgs.lib.optionals pkgs.stdenv.isLinux [
pkgs.openldap
pkgs.cyrus_sasl
]);
};
}
);
}