From 88322b09d2c011c8b76bd146895790157781efba Mon Sep 17 00:00:00 2001 From: Raphael Date: Sat, 29 Nov 2025 14:51:09 +0100 Subject: [PATCH] build(flake): adding the flake for this project --- flake.nix | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d84cd41 --- /dev/null +++ b/flake.nix @@ -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" + ''; + }; + } + ); +}