                     "already present"
                     nil)])))
             (:present-packages options)))
-          aggregate-repo
-          (try
-            (aggregate-repositories
-             index-strat
-             repositories
-             genrepo
-             version-comparator)
-            (catch Exception e (exit 1 (str
-                                        "Error while evaluating repositories: "
-                                        (.getMessage ^java.lang.Exception e)))))
+          query
+          (if (get-in package-systems [package-systems :query-constructor])
+            ((get-in package-systems [package-systems :query-constructor])
+             options)
+            (let [genrepo
+                  (if (get-in package-systems
+                              [package-system :repo-constructor])
+                    ((get-in package-systems
+                             [package-system :repo-constructor])
+                     options)
+                    (get-in package-systems [package-system :genrepo]))
+                  repositories (:repositories options)]
+              (try
+                (aggregate-repositories
+                  index-strat
+                  repositories
+                  genrepo
+                  version-comparator)
+                (catch Exception e
+                  (exit 1 (str
+                            "Error while evaluating repositories: "
+                            (.getMessage ^java.lang.Exception e)))))))
           result
           (resolve-dependencies-deluxe
             requirement-data
-            aggregate-repo
+            query
             {
              :present-packages present-packages
              :strategy (keyword resolve-strat)

                output-format
                package-system
                present-packages
                repositories
                requirements
                resolve-strat
                search-strat

  package-systems
  {"apt" {:genrepo apt-pkg/slurp-apt-repo
          :version-comparison "debian"}
   "git" {:query-contructor git-pkg/make-query
          :version-comparison "semver"
          {:required-arguments {:clone-folder ["-n" "--clone-folder"]}}}
   "degasolv" {:genrepo degasolv-pkg/slurp-degasolv-repo
               :version-comparison "semver"}
   "subproc" {:repo-constructor subproc-pkg/make-slurper
              :required-arguments {:subproc-exe ["-x" "--subproc-exe"]}}})

(defn command-list [commands]
