build(flake): adding the flake for this project

This commit is contained in:
Raphael 2025-11-29 14:51:09 +01:00
commit 88322b09d2
No known key found for this signature in database

52
flake.nix Normal file
View file

@ -0,0 +1,52 @@
{
description = "Shell for libasm project";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
};
in
{
devShells.default = pkgs.mkShell {
name = "irc-42";
buildInputs =
with pkgs;
[
nasm
gcc
binutils
gnumake
lldb
coreutils
xxd
valgrind
clang-tools
]
++ (
if pkgs.stdenv.isLinux then
[
strace
valgrind
]
else
[ ]
);
shellHook = ''
printf "\n\033[0;90mASM env loaded for: \033[38;5;220m${system}\033[0m\n"
'';
};
}
);
}