diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,11 @@
+0.10.3.0:
+
+  We can now compile with GHC 9.4.4, so support for base 4.17
+  has been added. Swish will not build with earlier versions of
+  GHC 9.4, but I don't know how best to mark these as "do not
+  install". Added autogen-modules fields for Paths_swish to
+  appease Stack's sdist check.
+
 0.10.2.0:
 
   Check we can build with stack lts-19 (GHC 9.0) and spaces
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -44,7 +44,7 @@
     (c) 2003, 2004 G. Klyne
     (c) 2009 Vasili I Galchin
     (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
-	    2020, 2021 Doug Burke
+	    2020, 2021, 2022 Doug Burke
 
 All rights reserved.
 
@@ -83,6 +83,7 @@
 
     % cd swish
     % stack install
+    % STACK_YAML=stack-9.2.yaml stack install
     % STACK_YAML=stack-9.0.yaml stack install
     % STACK_YAML=stack-8.10.yaml stack install
     % STACK_YAML=stack-8.8.yaml stack install
@@ -106,3 +107,10 @@
     % nix-shell --argstr compiler ghc921
 	...
 	nix-shell% cabal test
+
+or, with a flake, either of
+
+    % nix build
+
+    % nix develop
+    dev[swish] > cabal test
diff --git a/default.nix b/default.nix
--- a/default.nix
+++ b/default.nix
@@ -1,4 +1,4 @@
-{ compiler ? "ghc8107"
+{ compiler ? "ghc902"
 }:
 
 (import ./release.nix { compiler = compiler; }).exe
diff --git a/flake.lock b/flake.lock
new file mode 100644
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,25 @@
+{
+  "nodes": {
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1662096612,
+        "narHash": "sha256-R+Q8l5JuyJryRPdiIaYpO5O3A55rT+/pItBrKcy7LM4=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "21de2b973f9fee595a7a1ac4693efff791245c34",
+        "type": "github"
+      },
+      "original": {
+        "id": "nixpkgs",
+        "type": "indirect"
+      }
+    },
+    "root": {
+      "inputs": {
+        "nixpkgs": "nixpkgs"
+      }
+    }
+  },
+  "root": "root",
+  "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,37 @@
+{
+  # inspired by: https://serokell.io/blog/practical-nix-flakes#packaging-existing-applications
+  description = "Swish: a semantic web toolkit for Haskell (experimantal)";
+  inputs.nixpkgs.url = "nixpkgs";
+  outputs = { self, nixpkgs }:
+    let
+      supportedSystems = [ "x86_64-linux" "x86_64-darwin" ];
+      # supportedSystems = [ "x86_64-linux" ];
+      forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
+      nixpkgsFor = forAllSystems (system: import nixpkgs {
+        inherit system;
+        overlays = [ self.overlay ];
+      });
+    in
+    {
+      overlay = (final: prev: {
+        swish = final.haskellPackages.callCabal2nix "swish" ./. {};
+      });
+      packages = forAllSystems (system: {
+         swish = nixpkgsFor.${system}.swish;
+      });
+      defaultPackage = forAllSystems (system: self.packages.${system}.swish);
+      checks = self.packages;
+      devShell = forAllSystems (system: let haskellPackages = nixpkgsFor.${system}.haskellPackages;
+        in haskellPackages.shellFor {
+          packages = p: [self.packages.${system}.swish];
+          withHoogle = true;
+          buildInputs = with haskellPackages; [
+            haskell-language-server
+            hlint
+            cabal-install
+          ];
+        # Change the prompt to show that you are in a devShell
+        shellHook = "export PS1='\\e[1;34mdev[swish] > \\e[0m'";
+        });
+  };
+}
diff --git a/shell.nix b/shell.nix
--- a/shell.nix
+++ b/shell.nix
@@ -1,4 +1,4 @@
-{ compiler ? "ghc8107"
+{ compiler ? "ghc902"
 }:
 
 (import ./release.nix { compiler = compiler; }).shell
diff --git a/stack.yaml b/stack.yaml
--- a/stack.yaml
+++ b/stack.yaml
@@ -2,4 +2,4 @@
 packages:
 - '.'
 # Match the version used in .gitlab-ci.yml
-resolver: lts-18.28
+resolver: lts-19.19
diff --git a/swish.cabal b/swish.cabal
--- a/swish.cabal
+++ b/swish.cabal
@@ -1,7 +1,9 @@
+Cabal-Version:      2.4
+
 Name:               swish
-Version:            0.10.2.0
+Version:            0.10.3.0
 Stability:          experimental
-License:            LGPL-2.1
+License:            LGPL-2.1-or-later
 License-file:       LICENSE 
 Author:             Graham Klyne - GK@ninebynine.org
 Copyright:          (c) 2003, 2004 G. Klyne; 2009 Vasili I Galchin; 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Doug Burke; All rights reserved.
@@ -9,8 +11,7 @@
 Category:           Semantic Web
 Synopsis:           A semantic web toolkit. 
 
-Tested-With:        GHC==8.10.7
-Cabal-Version:      1.18
+Tested-With:        GHC==9.0.2
 Homepage:           https://gitlab.com/dburke/swish
 Bug-reports:        https://gitlab.com/dburke/swish/issues
 
@@ -61,6 +62,8 @@
                     stack.yaml
                     default.nix
                     shell.nix
+                    flake.nix
+                    flake.lock
                     .hlint.yaml
 Data-Files:         scripts/*.ss
 
@@ -94,7 +97,7 @@
 Library
    Default-Language:    Haskell2010
    Build-Depends:
-      base >= 4.8 && < 4.17,
+      base >= 4.8 && < 4.18,
       containers >= 0.5 && < 0.7,
       directory >= 1.0 && < 1.4,
       filepath >= 1.1 && < 1.5,
@@ -578,6 +581,7 @@
    Default-Language:    Haskell2010
    Hs-Source-Dirs: app/ 
    Other-Modules:  Paths_swish
+   Autogen-Modules: Paths_swish
 
    ghc-options:
       -Wall -fno-warn-orphans
@@ -595,6 +599,7 @@
    Default-Language:    Haskell2010
    Hs-Source-Dirs: app/ 
    Other-Modules:  Paths_swish
+   Autogen-Modules: Paths_swish
 
    ghc-options:
       -Wall -fno-warn-orphans
