I’ve come across a problem posted on #bsdports
channel few days ago, how to download a port (FreeBSD) and its dependencies without checking out complete ports tree. So, I hacked a solution for this in Haskell to celebrate my recently attained bliss moment:
λ ghci GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> :load download-portstree.hs [1 of 1] Compiling Main ( download-portstree.hs, interpreted ) Ok, modules loaded: Main. *Main> downloadPortsTree "editors/emacs-nox11" Loading package transformers-0.3.0.0 ... linking ... done. Loading package mtl-2.1.2 ... linking ... done. Loading package array-0.4.0.1 ... linking ... done. Loading package deepseq-1.3.0.1 ... linking ... done. Loading package containers-0.5.0.0 ... linking ... done. Loading package bytestring-0.10.0.2 ... linking ... done. Loading package old-locale-1.0.0.5 ... linking ... done. Loading package time-1.4.0.1 ... linking ... done. Loading package unix-2.6.0.1 ... linking ... done. Loading package filepath-1.3.0.1 ... linking ... done. Loading package directory-1.2.0.1 ... linking ... done. Loading package process-1.1.0.2 ... linking ... done. PortsList {portsSeen = fromList ["converters/libiconv","devel/gettext","devel/gmake","devel/libffi","devel/ncurses","devel/pkgconf","editors/emacs-nox11","lang/perl5.16","math/gmp","print/indexinfo","security/ca_root_nss","security/gnutls","security/libgpg-error","security/libtasn1","security/nettle","security/openssl","security/p11-kit","textproc/libxml2"], portsNew = fromList []} Checking out port editors/emacs-nox11 Checking out port devel/gmake Checking out port converters/libiconv Checking out port devel/gettext Checking out port devel/ncurses Checking out port devel/pkgconf Checking out port print/indexinfo Checking out port security/gnutls Checking out port lang/perl5.16 Checking out port security/libgpg-error Checking out port security/libtasn1 Checking out port security/nettle Checking out port math/gmp Checking out port security/openssl Checking out port security/p11-kit Checking out port devel/libffi Checking out port security/ca_root_nss Checking out port textproc/libxml2
Happy hacking lambdas… 😉