undate to latest flake

This commit is contained in:
zimbatm 2020-07-07 14:01:39 +02:00
parent 400fa6d9af
commit 590d6d1bad
No known key found for this signature in database
GPG Key ID: 71BAF6D40C1D63D7
2 changed files with 8 additions and 11 deletions

View File

@ -43,19 +43,16 @@ Here is how it looks like in practice:
```nix ```nix
{ {
description = "Flake utils demo"; description = "Flake utils demo";
edition = 201909;
inputs.utils = { inputs.flake-utils.url = "github:numtide/flake-utils";
uri = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }: outputs = { self, nixpkgs, flake-utils }:
utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in let pkgs = nixpkgs.legacyPackages.${system}; in
rec { rec {
packages.hello = pkgs.hello; packages.hello = pkgs.hello;
defaultPackage = packages.hello; defaultPackage = packages.hello;
apps.hello = utils.lib.mkApp { drv = packages.hello; }; apps.hello = flake-utils.lib.mkApp { drv = packages.hello; };
defaultApp = apps.hello; defaultApp = apps.hello;
} }
); );

View File

@ -1,15 +1,15 @@
{ {
description = "Flake utils demo"; description = "Flake utils demo";
inputs.utils.uri = "github:numtide/flake-utils"; inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, utils }: outputs = { self, nixpkgs, flake-utils }:
utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in let pkgs = nixpkgs.legacyPackages.${system}; in
rec { rec {
packages.hello = pkgs.hello; packages.hello = pkgs.hello;
defaultPackage = packages.hello; defaultPackage = packages.hello;
apps.hello = utils.lib.mkApp { drv = packages.hello; }; apps.hello = flake-utils.lib.mkApp { drv = packages.hello; };
defaultApp = apps.hello; defaultApp = apps.hello;
} }
); );