summary refs log tree commit diff
path: root/pkgs/tools/networking/p2p/bittorrent/builder.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/networking/p2p/bittorrent/builder.sh')
-rw-r--r--pkgs/tools/networking/p2p/bittorrent/builder.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkgs/tools/networking/p2p/bittorrent/builder.sh b/pkgs/tools/networking/p2p/bittorrent/builder.sh
new file mode 100644
index 00000000000..7b93d5db8ba
--- /dev/null
+++ b/pkgs/tools/networking/p2p/bittorrent/builder.sh
@@ -0,0 +1,23 @@
+source $stdenv/setup
+source $makeWrapper
+
+buildPhase=buildPhase
+buildPhase() {
+    python setup.py build
+}
+
+installPhase=installPhase
+installPhase() {
+    python setup.py install --prefix=$out
+
+    # Create wrappers that set the environment correctly.
+    for i in $(cd $out/bin && ls); do
+        # Note: the GUI apps except to be in a directory called `bin',
+        # so don't move them. 
+        mv $out/bin/$i $out/bin/.orig-$i
+        makeWrapper $out/bin/.orig-$i $out/bin/$i \
+            --set PYTHONPATH "$out/lib/python2.4/site-packages:$pygtk/lib/python2.4/site-packages/gtk-2.0"
+    done
+}
+
+genericBuild
\ No newline at end of file