{ description = "a very simple and friendly flake"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs"; 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 = rec { default = pkgs.mkShell { packages = [ pkgs.cowsay ]; }; }; packages = rec { hello = pkgs.writeShellApplication { name = "hello-cow"; runtimeInputs = [ pkgs.cowsay ]; text = '' cowsay "hello"; ''; }; default = hello; }; apps = rec { hello = flake-utils.lib.mkApp { drv = self.packages.${system}.hello; }; default = hello; }; } ); }