From 80d9e90713737912b53a23afd7d3261207f2df57 Mon Sep 17 00:00:00 2001
From: Julien Moutinho <julm@sourcephile.fr>
Date: Fri, 8 Oct 2021 02:44:27 +0200
Subject: [PATCH] impl: add `symantic-base` dependency

---
 default.nix             |  2 +-
 flake.lock              | 37 +++++++++++++++++++++++++++++++------
 flake.nix               |  3 +++
 symantic-document.cabal |  2 ++
 4 files changed, 37 insertions(+), 7 deletions(-)

diff --git a/default.nix b/default.nix
index 002a6e2..f66bd8b 100644
--- a/default.nix
+++ b/default.nix
@@ -9,7 +9,7 @@ let
     then pkgs.haskellPackages
     else pkgs.haskell.packages.${ghc};
   hs = haskellPackages.extend (with pkgs.haskell.lib; hself: hsuper: {
-    symantic-base = buildFromSdist (hself.callCabal2nix "symantic-document" ./. {});
+    symantic-base = buildFromSdist (hself.callCabal2nix "symantic-base" inputs.symantic-base {});
   });
 in hs.symantic-document // {
   shell = hs.shellFor {
diff --git a/flake.lock b/flake.lock
index 54cb94d..0822867 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,11 +2,11 @@
   "nodes": {
     "flake-utils": {
       "locked": {
-        "lastModified": 1629481132,
-        "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
+        "lastModified": 1631561581,
+        "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=",
         "owner": "numtide",
         "repo": "flake-utils",
-        "rev": "997f7efcb746a9c140ce1f13c72263189225f482",
+        "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19",
         "type": "github"
       },
       "original": {
@@ -17,8 +17,8 @@
     },
     "nixpkgs": {
       "locked": {
-        "narHash": "sha256-hyYvlbf8iahMmCOSlsORpw+lXvXnvWslNHL6jzpiYbQ=",
-        "path": "/nix/store/04lmfms7xmp27qn7km7gzp8hjhmz5hxw-nixpkgs-patched",
+        "narHash": "sha256-OwFkUPtQmg74pta7j4kLpj1yrRZCtb9X4qJY8PAyvgw=",
+        "path": "/nix/store/vi0l5zfy1saqjcs9yipdgfgv8xli1f3f-nixpkgs-patched",
         "type": "path"
       },
       "original": {
@@ -29,7 +29,32 @@
     "root": {
       "inputs": {
         "flake-utils": "flake-utils",
-        "nixpkgs": "nixpkgs"
+        "nixpkgs": "nixpkgs",
+        "symantic-base": "symantic-base"
+      }
+    },
+    "symantic-base": {
+      "inputs": {
+        "flake-utils": [
+          "flake-utils"
+        ],
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1633651466,
+        "narHash": "sha256-vdplmNo0BIChVJtxXPH3oob6mR4C1zxpOlywORf03OY=",
+        "ref": "main",
+        "rev": "976663dccdd6807c501c35f9040325500da35e31",
+        "revCount": 45,
+        "type": "git",
+        "url": "https://git.code.sourcephile.fr/~julm/symantic-base"
+      },
+      "original": {
+        "ref": "main",
+        "type": "git",
+        "url": "https://git.code.sourcephile.fr/~julm/symantic-base"
       }
     }
   },
diff --git a/flake.nix b/flake.nix
index 9eb9306..9a80c8b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,6 +1,9 @@
 {
 inputs.nixpkgs.url = "flake:nixpkgs";
 inputs.flake-utils.url = "github:numtide/flake-utils";
+inputs.symantic-base.url = "git+https://git.code.sourcephile.fr/~julm/symantic-base?ref=main";
+inputs.symantic-base.inputs.flake-utils.follows = "flake-utils";
+inputs.symantic-base.inputs.nixpkgs.follows = "nixpkgs";
 outputs = inputs:
   inputs.flake-utils.lib.eachDefaultSystem (system: let
     pkgs = inputs.nixpkgs.legacyPackages.${system};
diff --git a/symantic-document.cabal b/symantic-document.cabal
index 5738134..2340ad5 100644
--- a/symantic-document.cabal
+++ b/symantic-document.cabal
@@ -68,6 +68,7 @@ library
   build-depends:
     ansi-terminal >= 0.7,
     base >= 4.6 && < 5,
+    symantic-base >= 0.3,
     text >= 1.2,
     transformers >= 0.5
 
@@ -104,6 +105,7 @@ test-suite symantic-document-tests
     -- -dshow-passes
   build-depends:
     symantic-document,
+    symantic-base >= 0.3,
     base >= 4.6 && < 5,
     containers >= 0.5,
     tasty >= 0.11,
-- 
2.47.2