From 483b8dfc5b464365b38773d07d8cf1cc57b8382a Mon Sep 17 00:00:00 2001 From: Johannes Maier Date: Fri, 22 Jul 2022 10:16:10 +0200 Subject: [PATCH] Update/fix flake.nix --- Development-with-nix.md | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/Development-with-nix.md b/Development-with-nix.md index 1419206..36d3ab7 100644 --- a/Development-with-nix.md +++ b/Development-with-nix.md @@ -41,28 +41,30 @@ Alternatively, you can use this sample `flake.nix`: }; }; - outputs = inputs: inputs.flake-utils.lib.eachDefaultSystem (system: + outputs = inputs@{ self, ... }: inputs.flake-utils.lib.eachDefaultSystem (system: let pkgs = inputs.nixpkgs.legacyPackages.${system}; in { - devShell.${system} = pkgs.mkShell { - nativeBuildInputs = with pkgs; [ - cmake - gdb - ninja - qemu - wasmtime - zlib - ] ++ (with llvmPackages_14; [ - clang - clang-unwrapped - lld - llvm - ]); + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + cmake + gdb + 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; } ); }