48 lines
916 B
Nix
48 lines
916 B
Nix
{
|
|
description = "A devshell flake for my ft_ping project";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
nixpkgs,
|
|
self,
|
|
}:
|
|
let
|
|
supportedSystems = [ "x86_64-linux" ];
|
|
|
|
forEachSupportedSystem =
|
|
f:
|
|
nixpkgs.lib.genAttrs supportedSystems (
|
|
system:
|
|
f {
|
|
pkgs = import nixpkgs { inherit system; };
|
|
}
|
|
);
|
|
in
|
|
{
|
|
devShells = forEachSupportedSystem (
|
|
{ pkgs }:
|
|
{
|
|
default = pkgs.mkShell {
|
|
nativeBuildInputs = with pkgs; [
|
|
gcc
|
|
clang
|
|
];
|
|
hardeningDisable = [ "all" ];
|
|
packages = with pkgs; [
|
|
gdb
|
|
valgrind
|
|
compiledb
|
|
inetutils
|
|
|
|
nixfmt-rfc-style
|
|
];
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|