build(flake): adding the flake for this project
This commit is contained in:
commit
88322b09d2
1 changed files with 52 additions and 0 deletions
52
flake.nix
Normal file
52
flake.nix
Normal 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"
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue