/
flake.nix
63 lines (54 loc) · 1.9 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
52
53
54
55
56
57
58
59
60
61
62
63
# This flake is supposed to enable a convenient development environment.
# It is independent of any packaging in nixpkgs.
#
# See https://github.com/limine-bootloader/limine/issues/330 for more details
# regarding the packaging in nixpkgs.
{
description = "Limine";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, flake-parts }:
flake-parts.lib.mkFlake { inherit inputs; } {
flake = { };
# Don't artificially limit users at this point. If a build fails, they
# will notice it soon enough.
systems = nixpkgs.lib.systems.flakeExposed;
perSystem = { config, pkgs, ... }:
{
devShells = {
default = pkgs.mkShell {
packages = with pkgs; [
# Dependencies for ./bootstrap
autoconf
automake
# General build dependencies
cacert
git
mtools
nasm
pkg-config # Checked for by ./configure but seems unused?
# gcc toolchain (comes as default, here only for completeness)
binutils
gcc
gnumake
# llvm toolchain (with TOOLCHAIN_FOR_TARGET=llvm)
llvmPackages.bintools
llvmPackages.clang
llvmPackages.lld
# Nix
nixpkgs-fmt
# Misc
# typos is not yet frequently updated in the stable channel
nixpkgs-unstable.legacyPackages.${pkgs.system}.typos
];
};
};
# `$ nix fmt`
formatter = pkgs.nixpkgs-fmt;
};
};
}