From 6449b80130565f4ef24fe21201b81eca2ee246fa Mon Sep 17 00:00:00 2001
From: Jens Nolte <git@queezle.net>
Date: Thu, 25 Feb 2021 21:38:05 +0100
Subject: [PATCH] Use qd and q overlays from their flakes

---
 configuration.nix  |  7 ++-----
 pkgs/q/default.nix | 11 -----------
 pkgs/q/repo.json   | 11 -----------
 pkgs/q/update      |  7 -------
 4 files changed, 2 insertions(+), 34 deletions(-)
 delete mode 100644 pkgs/q/default.nix
 delete mode 100644 pkgs/q/repo.json
 delete mode 100755 pkgs/q/update

diff --git a/configuration.nix b/configuration.nix
index 0b41b6b..ef13f94 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -58,11 +58,8 @@ in
 
   nixpkgs.overlays = [
     (import ./pkgs)
-    (self: super:
-      {
-        qd = flakeInputs.qd.packages."${system}".qd;
-      }
-    )
+    flakeInputs.qd.overlay
+    flakeInputs.q.overlay
   ];
 
   # Pin channel in nix path
diff --git a/pkgs/q/default.nix b/pkgs/q/default.nix
deleted file mode 100644
index 2b989c9..0000000
--- a/pkgs/q/default.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ haskell, fetchgit, callCabal2nix }:
-
-let
-  repo = with builtins; fromJSON ( readFile ./repo.json );
-  src = fetchgit {
-    inherit (repo) url rev sha256;
-  };
-in
-haskell.lib.generateOptparseApplicativeCompletion "q" (
-  callCabal2nix "q" src {}
-)
diff --git a/pkgs/q/repo.json b/pkgs/q/repo.json
deleted file mode 100644
index 58d01c9..0000000
--- a/pkgs/q/repo.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-  "ref": "refs/heads/master",
-  "url": "https://git.c3pb.de/jens/q.git",
-  "rev": "029d589c88c676c1e8a7e96f91f563a5a4eb5190",
-  "date": "2020-07-12T19:45:06+02:00",
-  "path": "/nix/store/1f3f7nwpcwf9yczfmam72mi65gmabbf5-q",
-  "sha256": "01j37vyjzjhs3a6661w20hhfwhacxsvfyl005zz49r9kv4618f81",
-  "fetchSubmodules": false,
-  "deepClone": false,
-  "leaveDotGit": false
-}
diff --git a/pkgs/q/update b/pkgs/q/update
deleted file mode 100755
index beea01e..0000000
--- a/pkgs/q/update
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env nix-shell
-#! nix-shell -i sh -p nix-prefetch-git jq
-
-url="https://git.c3pb.de/jens/q.git"
-ref="refs/heads/master"
-
-nix-prefetch-git --rev "$ref" --no-deepClone "$url" | jq --arg ref "$ref" '{ref: $ref} + .' > repo.json
-- 
GitLab