From d2e3e2aef9a13d504336b1545aa8362e30fa9853 Mon Sep 17 00:00:00 2001 From: Joscha Date: Fri, 14 Apr 2023 22:18:39 +0200 Subject: [PATCH] Remove flake-utils dependency See also: https://github.com/NixOS/nixpkgs/blob/4f399bd5c47c267a86ea998e35404f0a2661ee9b/flake.nix#L14 https://github.com/nix-community/home-manager/commit/17198cf5ae27af5b647c7dac58d935a7d0dbd189 --- CHANGELOG.md | 3 +++ flake.lock | 16 ---------------- flake.nix | 23 +++++++++++++---------- 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05f2a03..d93ddc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ Procedure when bumping the version number: ## Unreleased +### Changed +- Simplified flake dependencies + ## v0.6.1 - 2023-04-10 ### Changed diff --git a/flake.lock b/flake.lock index 7196112..bc5ec53 100644 --- a/flake.lock +++ b/flake.lock @@ -1,20 +1,5 @@ { "nodes": { - "flake-utils": { - "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "naersk": { "inputs": { "nixpkgs": [ @@ -52,7 +37,6 @@ }, "root": { "inputs": { - "flake-utils": "flake-utils", "naersk": "naersk", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index 17b2241..68a8c1a 100644 --- a/flake.nix +++ b/flake.nix @@ -3,19 +3,22 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs"; - flake-utils.url = "github:numtide/flake-utils"; naersk.url = "github:nix-community/naersk"; naersk.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { self, nixpkgs, flake-utils, naersk }: flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { inherit system; }; - naersk' = pkgs.callPackage naersk { }; - in - rec { - packages.default = naersk'.buildPackage { src = ./.; }; - } - ); + outputs = { self, nixpkgs, naersk }: + let forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; + in { + packages = forAllSystems (system: + let + pkgs = import nixpkgs { inherit system; }; + naersk' = pkgs.callPackage naersk { }; + in + { + default = naersk'.buildPackage { src = ./.; }; + } + ); + }; }