mirror of
https://github.com/limine-bootloader/limine
synced 2024-11-29 20:03:19 +03:00
cc4695367f
This inits a flake.nix into the repository that exports a convenient Nix shell. When using `$ nix develop`, users will get a shell with all relevant tools to build the repository. If one uses a "direnv" integration into their shell, the environment is automatically loaded.
58 lines
1.6 KiB
Nix
58 lines
1.6 KiB
Nix
# 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 = "limeboot";
|
|
|
|
inputs = {
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
|
};
|
|
|
|
outputs = inputs@{ self, nixpkgs, 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 completness)
|
|
binutils
|
|
gcc
|
|
|
|
# llvm toolchain (with TOOLCHAIN_FOR_TARGET=llvm)
|
|
llvmPackages.bintools
|
|
llvmPackages.clang
|
|
llvmPackages.lld
|
|
|
|
# Nix
|
|
nixpkgs-fmt
|
|
];
|
|
};
|
|
};
|
|
|
|
# `$ nix fmt`
|
|
formatter = pkgs.nixpkgs-fmt;
|
|
};
|
|
};
|
|
}
|