···666666 The same thing applies to `cabal configure`, of course, if you're
667667 building with `cabal-install` instead of Stack.
668668669669+## Creating statically linked binaries
670670+671671+There are two levels of static linking. The first option is to configure the
672672+build with the Cabal flag `--disable-executable-dynamic`. In Nix expressions,
673673+this can be achieved by setting the attribute:
674674+675675+ enableSharedExecutables = false;
676676+677677+That gives you a binary with statically linked Haskell libraries and
678678+dynamically linked system libraries.
679679+680680+To link both Haskell libraries and system libraries statically, the additional
681681+flags `--ghc-option=-optl=-static --ghc-option=-optl=-pthread` need to be used.
682682+In Nix, this is accomplished with:
683683+684684+ configureFlags = [ "--ghc-option=-optl=-static" "--ghc-option=-optl=-pthread" ];
685685+686686+It's important to realize, however, that most system libraries in Nix are built
687687+as shared libraries only, i.e. there is just no static library available that
688688+Cabal could link!
689689+669690670691# Other resources
671692
···245245246246 /* =============== simple script files ==================== */
247247248248- # also have a look at enblendenfuse in all-packages.nix
248248+ # also have a look at enblend-enfuse in all-packages.nix
249249 exposureBlend = scriptDerivation {
250250 name = "exposure-blend";
251251 src = fetchurl {
+2-2
pkgs/applications/graphics/hugin/default.nix
···11{ stdenv, cmake, fetchurl, gnumake, pkgconfig
22, boost, gettext, tclap, wxGTK
33, freeglut, glew, libXi, libXmu, mesa
44-, autopanosiftc, enblendenfuse, exiv2, ilmbase, lensfun, libpng, libtiff
44+, autopanosiftc, enblend-enfuse, exiv2, ilmbase, lensfun, libpng, libtiff
55, openexr, panotools, perlPackages
66}:
77···29293030 # commandline tools needed by the hugin batch processor
3131 # you may have to tell hugin (in the preferences) where these binaries reside
3232- propagatedUserEnvPackages = [ autopanosiftc enblendenfuse gnumake
3232+ propagatedUserEnvPackages = [ autopanosiftc enblend-enfuse gnumake
3333 perlPackages.ImageExifTool
3434 ];
3535
···11+{ stdenv, fetchurl, ncurses }:
22+33+stdenv.mkDerivation rec {
44+ version = "1.1.4";
55+ name = "iptraf-ng-${version}";
66+77+ src = fetchurl {
88+ url = "https://fedorahosted.org/releases/i/p/iptraf-ng/${name}.tar.gz";
99+ sha256 = "02gb8z9h2s6s1ybyikywz7jgb1mafdx88hijfasv3khcgkq0q53r";
1010+ };
1111+1212+ buildInputs = [ ncurses ];
1313+1414+ configurePhase = ''
1515+ ./configure --prefix=$out/usr --sysconfdir=$out/etc \
1616+ --localstatedir=$out/var --sbindir=$out/bin
1717+ '';
1818+1919+ meta = {
2020+ description = "A console-based network monitoring utility (fork of iptraf)";
2121+ longDescription = ''
2222+ IPTraf-ng is a console-based network monitoring utility. IPTraf-ng
2323+ gathers data like TCP connection packet and byte counts, interface
2424+ statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN
2525+ station packet and byte counts. IPTraf-ng features include an IP traffic
2626+ monitor which shows TCP flag information, packet and byte counts, ICMP
2727+ details, OSPF packet types, and oversized IP packet warnings; interface
2828+ statistics showing IP, TCP, UDP, ICMP, non-IP and other IP packet counts,
2929+ IP checksum errors, interface activity and packet size counts; a TCP and
3030+ UDP service monitor showing counts of incoming and outgoing packets for
3131+ common TCP and UDP application ports, a LAN statistics module that
3232+ discovers active hosts and displays statistics about their activity; TCP,
3333+ UDP and other protocol display filters so you can view just the traffic
3434+ you want; logging; support for Ethernet, FDDI, ISDN, SLIP, PPP, and
3535+ loopback interfaces; and utilization of the built-in raw socket interface
3636+ of the Linux kernel, so it can be used on a wide variety of supported
3737+ network cards.
3838+ '';
3939+ homepage = https://fedorahosted.org/iptraf-ng/;
4040+ license = stdenv.lib.licenses.gpl2;
4141+ platforms = stdenv.lib.platforms.linux;
4242+ maintainers = [ stdenv.lib.maintainers.devhell ];
4343+ };
4444+}
···157157 setupLibDirs = if isTargetBuild then setupLibDirs_target
158158 else setupLibDirs_multi;
159159160160+ setupIncludeDir = ''
161161+ if [ -x "${staticUsrProfileTarget}/include" ]
162162+ then
163163+ ln -s "${staticUsrProfileTarget}/include"
164164+ fi
165165+ '';
166166+160167 # the target profile is the actual profile that will be used for the chroot
161168 setupTargetProfile = ''
162169 mkdir -m0755 usr
163170 cd usr
164171 ${setupLibDirs}
172172+ ${setupIncludeDir}
165173 for i in bin sbin share include; do
166174 cp -r "${staticUsrProfileTarget}/$i" $i
167175 done
···11+diff -Naur a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
22+--- a/tools/gyp/pylib/gyp/xcode_emulation.py 2014-01-23 06:05:51.000000000 +0100
33++++ b/tools/gyp/pylib/gyp/xcode_emulation.py 2014-02-04 17:49:48.000000000 +0100
44+@@ -1018,12 +1033,16 @@
55+ # Since the value returned by this function is only used when ARCHS is not
66+ # set, then on iOS we return "i386", as the default xcode project generator
77+ # does not set ARCHS if it is not set in the .gyp file.
88+- if self.isIOS:
99++
1010++ try:
1111++ if self.isIOS:
1212++ return 'i386'
1313++ version, build = self._XcodeVersion()
1414++ if version >= '0500':
1515++ return 'x86_64'
1616+ return 'i386'
1717+- version, build = self._XcodeVersion()
1818+- if version >= '0500':
1919++ except:
2020+ return 'x86_64'
2121+- return 'i386'
2222+2323+ class MacPrefixHeader(object):
2424+ """A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature.
···70707171 def AdjustLibraries(self, libraries, config_name=None):
7272 """Transforms entries like 'Cocoa.framework' in libraries into entries like
7373-@@ -1018,12 +1033,16 @@
7474- # Since the value returned by this function is only used when ARCHS is not
7575- # set, then on iOS we return "i386", as the default xcode project generator
7676- # does not set ARCHS if it is not set in the .gyp file.
7777-- if self.isIOS:
7878-+
7979-+ try:
8080-+ if self.isIOS:
8181-+ return 'i386'
8282-+ version, build = self._XcodeVersion()
8383-+ if version >= '0500':
8484-+ return 'x86_64'
8585- return 'i386'
8686-- version, build = self._XcodeVersion()
8787-- if version >= '0500':
8888-+ except:
8989- return 'x86_64'
9090-- return 'i386'
9191-9292- class MacPrefixHeader(object):
9393- """A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature.
···11{ stdenv, fetchFromGitHub, autoreconfHook, gettext }:
2233-let version = "0.5.2"; in
33+# The last release (0.5.2) is more than 2 years old and lacks features like -D,
44+# limiting its usefulness. Upstream appears comatose if not dead.
55+let version = "2014-07-03"; in
46stdenv.mkDerivation {
57 name = "duff-${version}";
6879 src = fetchFromGitHub {
88- sha256 = "0yfm910wjj6z0f0cg68x59ykf4ql5m49apzy8sra00f8kv4lpn53";
99- rev = version;
1010+ sha256 = "1k2dx38pjzc5d624vw1cs5ipj9fprsm5vqv55agksc29m63lswnx";
1111+ rev = "f26d4837768b062a3f98fa075c791d9c8a0bb75c";
1012 repo = "duff";
1113 owner = "elmindreda";
1214 };
···1416 nativeBuildInputs = [ autoreconfHook gettext ];
15171618 preAutoreconf = ''
1717- # duff is currently badly packaged, requiring us to do extra work here that
1818- # should be done upstream. If that is ever fixed, this entire phase can be
1919- # removed along with all buildInputs.
2020-2119 # gettexttize rightly refuses to run non-interactively:
2220 cp ${gettext}/bin/gettextize .
2321 substituteInPlace gettextize \
···3028 enableParallelBuilding = true;
31293230 meta = with stdenv.lib; {
3131+ inherit version;
3332 description = "Quickly find duplicate files";
3434- homepage = http://duff.dreda.org/;
3535- license = licenses.zlib;
3633 longDescription = ''
3734 Duff is a Unix command-line utility for quickly finding duplicates in
3835 a given set of files.
3936 '';
3737+ homepage = http://duff.dreda.org/;
3838+ license = licenses.zlib;
3939+ platforms = platforms.all;
4040 maintainers = with maintainers; [ nckx ];
4141- platforms = with platforms; all;
4241 };
4342}