{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    gf.url = "github:anka-213/cclaw-nix-stuff/nix-flakes";
  };

  outputs = { self, nixpkgs, ... }@inputs:
    let
      supportedSystems = [
        "aarch64-darwin"
        "aarch64-linux"
        "x86_64-darwin"
        "x86_64-linux"
      ];

      each-system = f: nixpkgs.lib.genAttrs supportedSystems (system: f rec {
	pkgs = import nixpkgs { inherit system; };
	inherit (pkgs) lib;
        inherit system;
      });
    in {
      devShells =
	each-system ({ pkgs, system, ... }:
	  let
	    gf-lsp = import
	      (pkgs.fetchzip {
		url = "https://github.com/anka-213/gf-lsp/archive/refs/tags/1.0.6.0.tar.gz";
		hash = "sha256-UAI2qUslzLOWYjTirZJ0y4DZbkPZnVXTY0XtFO8+Rks=";
	      }) {inherit system;};
	  in {
	    default = pkgs.mkShell {
	      packages = [
		inputs.gf.packages.${system}.gf-with-rgl
		pkgs.graphviz
		gf-lsp.gf-lsp
	      ];
	    };
	  });
    };
}
