From 0722e252043fefb573edec2d25532a7a181e698c Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Thu, 23 Mar 2023 14:54:03 -0400
Subject: [PATCH] use flake-utils to define the docs package for all the
 "default" systems

---
 flake.lock | 16 ++++++++++++++++
 flake.nix  | 14 ++++++++------
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/flake.lock b/flake.lock
index ed2ccf1b..c8375b84 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,20 @@
 {
   "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"
+      }
+    },
     "nixpkgs": {
       "locked": {
         "lastModified": 1659446231,
@@ -18,6 +33,7 @@
     },
     "root": {
       "inputs": {
+        "flake-utils": "flake-utils",
         "nixpkgs": "nixpkgs"
       }
     }
diff --git a/flake.nix b/flake.nix
index e4e30d6f..0a800e17 100644
--- a/flake.nix
+++ b/flake.nix
@@ -3,12 +3,14 @@
     nixpkgs = {
       url = github:NixOS/nixpkgs?ref=nixos-21.11;
     };
-  };
-  outputs = { self, nixpkgs }: {
-    packages = {
-      x86_64-linux = {
-        docs = nixpkgs.legacyPackages.x86_64-linux.callPackage ./docs.nix { };
-      };
+    flake-utils = {
+      url = github:numtide/flake-utils;
     };
   };
+  outputs = { self, nixpkgs, flake-utils }:
+    flake-utils.lib.eachDefaultSystem (system: {
+      packages = {
+        docs = nixpkgs.legacyPackages.${system}.callPackage ./docs.nix { };
+      };
+    });
 }
-- 
GitLab