Yeah, wait, what? No, really! I took a look through [clojure-py](https://github.com/halgari/clojure-py), and found out something pretty rad. In order to get clojurepy scripts to load other clojurepy, it had to shim out and add a new importer for clojure scripts. What this *really* means, is that you can import Clojure from Python, which is pretty sweet. I abused the internals here, and added it to [dput-ng](http://dput-ng.debian.net) as a quick hack. Basically, I just had to `import clojure.main`, and let the main function set up the sys shim. I would set it up in dput, but I'd have to import that module anyway. Remember, when doing this, the namespace (`(ns ...)`) needs to match the filename. So, I present the first Clojure hook for dput-ng: ; Copyright (c) Paul R. Tagliamonte , 2012, under the ; terms of dput-ng itsself. (ns clojtest (:require dput.core dput.exceptions)) (defn log [x] ; for debug output (.debug dput.core/logger x)) (defn dput-checker [changes profile interface] (cond (>= (-> changes (.get "maintainer") (.find "[email protected]")) 0) (throw (dput.exceptions/HookException. "Maintainer's Arno. Aborting upload")) :else (log "Nah, it's not arno, we're good"))) This, of course, checks if the maintainer is [Arno](http://daemonkeeper.net/), and throws a fit if it is. [Gist is over on gist.github](https://gist.github.com/4281134). After, [Algernon](http://asylum.madhouse-project.org/) added his own checker, which throws a fit if you have a package in the B-Ds that you aught to not use (such as dpatch) ; Copyright (c) Gergely Nagy , 2012, under the ; terms of dput-ng itself. (ns bd-blacklist (:require dput.core dput.exceptions dput.dsc)) (defn prune-build-deps "Prune a string representation of the build-depends so that only a list of packages remain." [bd-string] (map #(first (-> % (.strip) (.split " "))) (.. bd-string (split ",")))) (defn has-blacklisted? "Given a dsc file and a blacklist, check if any of the build-depencencies are in that list. Throws an error if there are matches." [dsc-file blacklist] (let [dsc (dput.dsc/parse_dsc_file dsc-file) build-deps (prune-build-deps (.. dsc (get "build-depends")))] (if-let [bad-bd (some blacklist build-deps)] (throw (dput.exceptions/HookException. (str "Blacklisted build-dependency found: " bad-bd))) (-> dput.core/logger (.trace "Build-Dependencies do not have anything on the blacklist"))))) (defn blacklist-checker "Checks whether the dsc has blacklisted build-dependencies, ignores the check when no dsc is to be found." [changes profile interface] (if-let [dsc-file (.. changes (get_dsc))] (has-blacklisted? dsc-file (set (get profile "bd-blacklist"))) (-> dput.core/logger (.trace "No .dsc found, build-dependencies cannot be checked")))) You can check that out in the [git tree](http://anonscm.debian.org/gitweb/?p=collab-maint/dputng.git;a=blob;f=examples/hooks/bd-blacklist/code/bd-blacklist.clj;hb=HEAD) Hacks welcome!