{ description = "A devshell flake for my ft_ping project"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; keyzconf = { url = "github:keyzox71/nixos-config"; }; }; outputs = inputs@{ nixpkgs, self, ... }: let inherit (self) outputs; supportedSystems = [ "x86_64-linux" ]; forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems ( system: f { pkgs = import nixpkgs { inherit system; }; system = system; } ); in { devShells = forEachSupportedSystem ( { pkgs, system }: { default = pkgs.mkShell { nativeBuildInputs = with pkgs; [ gcc clang ]; hardeningDisable = [ "all" ]; packages = with pkgs; [ gdb valgrind compiledb inetutils nixfmt-rfc-style ]; }; } ); apps = forEachSupportedSystem ( { pkgs, system }: { virtualBoyy-headless = let scriptName = "run-virtualBoyy-vm-headless"; script = pkgs.writeShellScriptBin "${scriptName}" '' ${inputs.keyzconf.packages.${system}.virtualBoyy { mount-enabled = true; }}/bin/run-virtualBoyy-vm \ -enable-kvm \ -nographic \ -m 8G \ -smp 4 \ -virtfs local,path=$(${pkgs.coreutils}/bin/pwd),mount_tag=host0,id=host0,security_model=none ''; in { type = "app"; program = "${script}/bin/${scriptName}"; }; } ); }; }