From 7d6a0158e5246c8024aca0ce8e8576fb59adf5da Mon Sep 17 00:00:00 2001 From: surtur Date: Tue, 26 Apr 2022 13:51:11 +0200 Subject: [PATCH] flake: fix support for Nix 2.8 and beyond --- flake.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 725c580..5f78e7c 100644 --- a/flake.nix +++ b/flake.nix @@ -29,8 +29,7 @@ packages = forAllSystems (system: let pkgs = nixpkgsFor.${system}; - in - { + in rec { go-xkcdreader = pkgs.buildGoModule { pname = "go-xkcdreader"; inherit version; @@ -57,12 +56,15 @@ # package. defaultPackage = forAllSystems (system: self.packages.${system}.go-xkcdreader); - defaultApp = forAllSystems (system: { - type = "app"; - program = "${self.packages.${system}.go-xkcdreader}/bin/go-xkcdreader"; + apps = forAllSystems (system: rec { + go-xkcdreader = { + type = "app"; + program = "${self.packages.${system}.go-xkcdreader}/bin/go-xkcdreader"; + }; + default = go-xkcdreader; }); - devShell = forAllSystems (system: + devShells= forAllSystems (system: let pkgs = nixpkgsFor.${system}; in pkgs.mkShell { buildInputs = with pkgs; [ @@ -71,6 +73,7 @@ gofumpt go-tools ]; - }); + } + ); }; }