diff --git a/templates/compiler-dev/flake.nix b/templates/compiler-dev/flake.nix index d48fe65..acbb719 100644 --- a/templates/compiler-dev/flake.nix +++ b/templates/compiler-dev/flake.nix @@ -6,34 +6,45 @@ flake-utils.url = "github:numtide/flake-utils"; # Used for shell.nix - flake-compat = { url = github:edolstra/flake-compat; flake = false; }; + flake-compat = { + url = github:edolstra/flake-compat; + flake = false; + }; }; - outputs = { self, nixpkgs, flake-utils, ... }@inputs: - flake-utils.lib.eachDefaultSystem (system: - let pkgs = import nixpkgs { inherit system; }; + outputs = { + self, + nixpkgs, + flake-utils, + ... + } @ inputs: + flake-utils.lib.eachDefaultSystem ( + system: let + pkgs = import nixpkgs {inherit system;}; in { devShells.default = pkgs.mkShell { - nativeBuildInputs = with pkgs; [ - cmake - gdb - libxml2 - ninja - qemu - wasmtime - zlib - ] ++ (with llvmPackages_14; [ - clang - clang-unwrapped - lld - llvm - ]); + nativeBuildInputs = with pkgs; + [ + cmake + gdb + libxml2 + ninja + qemu + wasmtime + zlib + ] + ++ (with llvmPackages_14; [ + clang + clang-unwrapped + lld + llvm + ]); - hardeningDisable = [ "all" ]; + hardeningDisable = ["all"]; }; # For compatibility with older versions of the `nix` binary devShell = self.devShells.${system}.default; } - ); + ); } diff --git a/templates/compiler-dev/shell.nix b/templates/compiler-dev/shell.nix index 7e231b7..a15057a 100644 --- a/templates/compiler-dev/shell.nix +++ b/templates/compiler-dev/shell.nix @@ -1,9 +1,12 @@ (import ( - let flake-compat = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.flake-compat; in - fetchTarball { - url = "https://github.com/edolstra/flake-compat/archive/${flake-compat.locked.rev}.tar.gz"; - sha256 = flake-compat.locked.narHash; - } + let + flake-compat = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.flake-compat; + in + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/${flake-compat.locked.rev}.tar.gz"; + sha256 = flake-compat.locked.narHash; + } ) - { src = ./.; }).shellNix + {src = ./.;}) +.shellNix