···2324 preConfigure =
25 ''
26- configureFlags="${if perlSupport then "--enable-perl" else "--disable-perl"}";
27 export TERMINFO=$out/share/terminfo # without this the terminfo won't be compiled by tic, see man tic
28 NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype}/include/freetype2"
29 NIX_LDFLAGS="$NIX_LDFLAGS -lfontconfig -lXrender "
···3637 meta = {
38 description = "A clone of the well-known terminal emulator rxvt";
39- longDescription = "
40- You should put this into your ~/.bashrc:
41- export TERMINFO=~/.nix-profile/share/terminfo
42- ";
43 homepage = "http://software.schmorp.de/pkg/rxvt-unicode.html";
44 };
45})
···2324 preConfigure =
25 ''
26+ configureFlags="--with-terminfo=$out/share/terminfo ${if perlSupport then "--enable-perl" else "--disable-perl"}";
27 export TERMINFO=$out/share/terminfo # without this the terminfo won't be compiled by tic, see man tic
28 NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype}/include/freetype2"
29 NIX_LDFLAGS="$NIX_LDFLAGS -lfontconfig -lXrender "
···3637 meta = {
38 description = "A clone of the well-known terminal emulator rxvt";
000039 homepage = "http://software.schmorp.de/pkg/rxvt-unicode.html";
40 };
41})
···23cabal.mkDerivation (self: {
4 pname = "largeword";
5- version = "1.0.3";
6- sha256 = "18b6nhq1cww4wdbrfq0cb828kncxzcsibgs5dbgxa66y6iw93vkg";
7 meta = {
8- homepage = "http://trac.haskell.org/largeword/wiki";
9 description = "Provides Word128, Word192 and Word256 and a way of producing other large words if required";
10 license = self.stdenv.lib.licenses.bsd3;
11 platforms = self.ghc.meta.platforms;
···23cabal.mkDerivation (self: {
4 pname = "largeword";
5+ version = "1.0.4";
6+ sha256 = "19nrzbbbmsvxdhfhh6wc53lbk0xyjvbcwvjw0snym666j1w2b2l5";
7 meta = {
8+ homepage = "https://github.com/idontgetoutmuch/largeword";
9 description = "Provides Word128, Word192 and Word256 and a way of producing other large words if required";
10 license = self.stdenv.lib.licenses.bsd3;
11 platforms = self.ghc.meta.platforms;
···3 (http://pypi.python.org/pypi/setuptools/), which represents a large
4 number of Python packages nowadays. */
56-{ python, setuptools, wrapPython, lib }:
78{ name, namePrefix ? "python-"
910, buildInputs ? []
001112, # List of packages that should be added to the PYTHONPATH
13 # environment variable in programs built by this function. Packages
···1920, installCommand ?
21 ''
22- easy_install --prefix="$out" .
23 ''
240025, buildPhase ? "true"
2627, doCheck ? true
···4344 name = namePrefix + name;
450046 buildInputs = [ python wrapPython setuptools ] ++ buildInputs ++ pythonPath;
470000048 pythonPath = [ setuptools] ++ pythonPath;
4950- # XXX: Should we run `easy_install --always-unzip'? It doesn't seem
51- # to have a noticeable impact on small scripts.
00052 installPhase = ''
53 mkdir -p "$out/lib/${python.libPrefix}/site-packages"
54···56 export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
57 ${installCommand}
58000000000000000059 ${postInstall}
60 '';
6162 postFixup =
63 ''
64 wrapPythonPrograms
65-66 # If a user installs a Python package, she probably also wants its
67 # dependencies in the user environment (since Python modules don't
68 # have something like an RPATH, so the only way to find the
···70 if test -e $out/nix-support/propagated-build-inputs; then
71 ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
72 fi
000000073 '';
74})
···3 (http://pypi.python.org/pypi/setuptools/), which represents a large
4 number of Python packages nowadays. */
56+{ python, setuptools, wrapPython, lib, offlineDistutils, setuptoolsSite }:
78{ name, namePrefix ? "python-"
910, buildInputs ? []
11+12+, propagatedBuildInputs ? []
1314, # List of packages that should be added to the PYTHONPATH
15 # environment variable in programs built by this function. Packages
···2122, installCommand ?
23 ''
24+ easy_install --always-unzip --prefix="$out" .
25 ''
2627+, preConfigure ? "true"
28+29, buildPhase ? "true"
3031, doCheck ? true
···4748 name = namePrefix + name;
4950+ phases = "unpackPhase patchPhase configurePhase buildPhase installPhase checkPhase fixupPhase distPhase";
51+52 buildInputs = [ python wrapPython setuptools ] ++ buildInputs ++ pythonPath;
5354+ # setuptoolsSite is responsible for loading pth files
55+ propagatedBuildInputs = propagatedBuildInputs ++ [ setuptoolsSite ];
56+57+ buildInputStrings = map toString buildInputs;
58+59 pythonPath = [ setuptools] ++ pythonPath;
6061+ preConfigure = ''
62+ PYTHONPATH="${offlineDistutils}/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
63+ ${preConfigure}
64+ '';
65+66 installPhase = ''
67 mkdir -p "$out/lib/${python.libPrefix}/site-packages"
68···70 export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
71 ${installCommand}
7273+ # A pth file might have been generated to load the package from
74+ # within its own site-packages, rename this package not to
75+ # collide with others.
76+ eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth
77+ if [ -e "$eapth" ]; then
78+ # move colliding easy_install.pth to specifically named one
79+ mv "$eapth" $(dirname "$eapth")/${name}.pth
80+ fi
81+82+ # Remove any site.py files generated by easy_install as these
83+ # cause collisions. If pth files are to be processed a
84+ # corresponding site.py needs to be included in the PYTHONPATH.
85+ #
86+ # leave them until we have a better solution: see #209
87+ #rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*
88+89 ${postInstall}
90 '';
9192 postFixup =
93 ''
94 wrapPythonPrograms
95+96 # If a user installs a Python package, she probably also wants its
97 # dependencies in the user environment (since Python modules don't
98 # have something like an RPATH, so the only way to find the
···100 if test -e $out/nix-support/propagated-build-inputs; then
101 ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
102 fi
103+104+ createBuildInputsPth build-inputs "$buildInputStrings"
105+ for inputsfile in propagated-build-inputs propagated-build-native-inputs; do
106+ if test -e $out/nix-support/$inputsfile; then
107+ createBuildInputsPth $inputsfile "$(cat $out/nix-support/$inputsfile)"
108+ fi
109+ done
110 '';
111})
···45 done
46 fi
47}
48+49+createBuildInputsPth() {
50+ local category="$1"
51+ local inputs="$2"
52+ if [ foo"$inputs" != foo ]; then
53+ for x in $inputs; do
54+ if test -d "$x"/lib/@libPrefix@/site-packages; then
55+ echo $x/lib/@libPrefix@/site-packages \
56+ >> "$out"/lib/@libPrefix@/site-packages/${name}-nix-python-$category.pth
57+ fi
58+ done
59+ fi
60+}
···1+"""Recursively load pth files in site-packages of sys.path
2+3+- iterate over sys.path
4+- check for pth in dirs that end in site-packages
5+- ignore import statements in pth files
6+- add dirs listed in pth files right after current sys.path element,
7+ they will be processed in next iteration
8+"""
9+10+import os
11+import site
12+import sys
13+14+15+for path_idx, sitedir in enumerate(sys.path):
16+ # ignore non-site-packages
17+ if not sitedir.endswith('site-packages'):
18+ continue
19+20+ # find pth files
21+ try:
22+ names = os.listdir(sitedir)
23+ except os.error:
24+ continue
25+ dotpth = os.extsep + "pth"
26+ pths = [name for name in names if name.endswith(dotpth)]
27+28+ for pth in pths:
29+ fullname = os.path.join(sitedir, pth)
30+ try:
31+ f = open(fullname, "rU")
32+ except IOError:
33+ continue
34+35+ with f:
36+ for n, line in enumerate(f):
37+ if line.startswith("#"):
38+ continue
39+40+ if line.startswith(("import ", "import\t")):
41+ continue
42+43+ line = line.rstrip()
44+ dir, dircase = site.makepath(sitedir, line)
45+ if not dircase in sys.path:
46+ sys.path.insert(path_idx+1, dir)
···1+args @ { stdenv, fetchurl, extraConfig ? ""
2+, perl, mktemp, module_init_tools
3+, ... }:
4+5+let
6+ configWithPlatform = kernelPlatform :
7+ ''
8+ # Power management and debugging for powertop.
9+ DEBUG_KERNEL y
10+ PM_ADVANCED_DEBUG y
11+ PM_RUNTIME y
12+ TIMER_STATS y
13+ USB_SUSPEND y
14+ BACKTRACE_SELF_TEST n
15+ CPU_NOTIFIER_ERROR_INJECT? n
16+ DEBUG_DEVRES n
17+ DEBUG_NX_TEST n
18+ DEBUG_STACK_USAGE n
19+ DEBUG_STACKOVERFLOW n
20+ RCU_TORTURE_TEST n
21+ SCHEDSTATS n
22+23+ # Support drivers that need external firmware.
24+ STANDALONE n
25+26+ # Make /proc/config.gz available.
27+ IKCONFIG_PROC y
28+29+ # Optimize with -O2, not -Os.
30+ CC_OPTIMIZE_FOR_SIZE n
31+32+ # Enable the kernel's built-in memory tester.
33+ MEMTEST y
34+35+ # Include the CFQ I/O scheduler in the kernel, rather than as a
36+ # module, so that the initrd gets a good I/O scheduler.
37+ IOSCHED_CFQ y
38+ BLK_CGROUP y # required by CFQ
39+40+ # Enable NUMA.
41+ NUMA? y
42+43+ # Disable some expensive (?) features.
44+ FTRACE n
45+ KPROBES n
46+ PM_TRACE_RTC n
47+48+ # Enable various subsystems.
49+ ACCESSIBILITY y # Accessibility support
50+ AUXDISPLAY y # Auxiliary Display support
51+ DONGLE y # Serial dongle support
52+ HIPPI? y
53+ MTD_COMPLEX_MAPPINGS y # needed for many devices
54+ SCSI_LOWLEVEL y # enable lots of SCSI devices
55+ SCSI_LOWLEVEL_PCMCIA y
56+ SPI y # needed for many devices
57+ SPI_MASTER y
58+ WAN y
59+60+ # Networking options.
61+ IP_PNP n
62+ IPV6_PRIVACY y
63+ NETFILTER_ADVANCED y
64+ IP_VS_PROTO_TCP y
65+ IP_VS_PROTO_UDP y
66+ IP_VS_PROTO_ESP y
67+ IP_VS_PROTO_AH y
68+ IP_DCCP_CCID3 n # experimental
69+ CLS_U32_PERF y
70+ CLS_U32_MARK y
71+72+ # Wireless networking.
73+ IPW2100_MONITOR y # support promiscuous mode
74+ IPW2200_MONITOR? y # support promiscuous mode
75+ HOSTAP_FIRMWARE y # Support downloading firmware images with Host AP driver
76+ HOSTAP_FIRMWARE_NVRAM y
77+ ATH9K_PCI y # Detect Atheros AR9xxx cards on PCI(e) bus
78+ ATH9K_AHB y # Ditto, AHB bus
79+ B43_PHY_HT y
80+ BCMA_HOST_PCI y
81+82+ # Some settings to make sure that fbcondecor works - in particular,
83+ # disable tileblitting and the drivers that need it.
84+85+ # Enable various FB devices.
86+ FB y
87+ FB_EFI y
88+ FB_NVIDIA_I2C y # Enable DDC Support
89+ FB_RIVA_I2C y
90+ FB_ATY_CT y # Mach64 CT/VT/GT/LT (incl. 3D RAGE) support
91+ FB_ATY_GX y # Mach64 GX support
92+ FB_SAVAGE_I2C y
93+ FB_SAVAGE_ACCEL y
94+ FB_SIS_300 y
95+ FB_SIS_315 y
96+ FB_3DFX_ACCEL y
97+ FB_GEODE y
98+99+ # Video configuration
100+ # Enable KMS for devices whose X.org driver supports it.
101+ DRM_I915_KMS y
102+ DRM_RADEON_KMS y
103+ # Hybrid graphics support
104+ VGA_SWITCHEROO y
105+106+ # Sound.
107+ SND_AC97_POWER_SAVE y # AC97 Power-Saving Mode
108+ SND_HDA_INPUT_BEEP y # Support digital beep via input layer
109+ SND_USB_CAIAQ_INPUT y
110+ PSS_MIXER y # Enable PSS mixer (Beethoven ADSP-16 and other compatible)
111+112+ # USB serial devices.
113+ USB_SERIAL_GENERIC y # USB Generic Serial Driver
114+ USB_SERIAL_KEYSPAN_MPR y # include firmware for various USB serial devices
115+ USB_SERIAL_KEYSPAN_USA28 y
116+ USB_SERIAL_KEYSPAN_USA28X y
117+ USB_SERIAL_KEYSPAN_USA28XA y
118+ USB_SERIAL_KEYSPAN_USA28XB y
119+ USB_SERIAL_KEYSPAN_USA19 y
120+ USB_SERIAL_KEYSPAN_USA18X y
121+ USB_SERIAL_KEYSPAN_USA19W y
122+ USB_SERIAL_KEYSPAN_USA19QW y
123+ USB_SERIAL_KEYSPAN_USA19QI y
124+ USB_SERIAL_KEYSPAN_USA49W y
125+ USB_SERIAL_KEYSPAN_USA49WLC y
126+127+ # Filesystem options - in particular, enable extended attributes and
128+ # ACLs for all filesystems that support them.
129+ EXT2_FS_XATTR y # Ext2 extended attributes
130+ EXT2_FS_POSIX_ACL y # Ext2 POSIX Access Control Lists
131+ EXT2_FS_SECURITY y # Ext2 Security Labels
132+ EXT2_FS_XIP y # Ext2 execute in place support
133+ EXT4_FS_POSIX_ACL y
134+ EXT4_FS_SECURITY y
135+ REISERFS_FS_XATTR y
136+ REISERFS_FS_POSIX_ACL y
137+ REISERFS_FS_SECURITY y
138+ JFS_POSIX_ACL y
139+ JFS_SECURITY y
140+ XFS_QUOTA y
141+ XFS_POSIX_ACL y
142+ XFS_RT y # XFS Realtime subvolume support
143+ OCFS2_DEBUG_MASKLOG n
144+ BTRFS_FS_POSIX_ACL y
145+ UBIFS_FS_XATTR? y
146+ UBIFS_FS_ADVANCED_COMPR y
147+ NFSD_V2_ACL y
148+ NFSD_V3 y
149+ NFSD_V3_ACL y
150+ NFSD_V4 y
151+ CIFS_XATTR y
152+ CIFS_POSIX y
153+154+ # Security related features.
155+ STRICT_DEVMEM y # Filter access to /dev/mem
156+ SECURITY_SELINUX_BOOTPARAM_VALUE 0 # disable SELinux by default
157+158+ # Misc. options.
159+ 8139TOO_8129 y
160+ 8139TOO_PIO n # PIO is slower
161+ AIC79XX_DEBUG_ENABLE n
162+ AIC7XXX_DEBUG_ENABLE n
163+ AIC94XX_DEBUG n
164+ B43_PCMCIA y
165+ BLK_DEV_CMD640_ENHANCED y # CMD640 enhanced support
166+ BLK_DEV_IDEACPI y # IDE ACPI support
167+ BLK_DEV_INTEGRITY y
168+ BSD_PROCESS_ACCT_V3 y
169+ BT_HCIUART_BCSP y
170+ BT_HCIUART_H4 y # UART (H4) protocol support
171+ BT_HCIUART_LL y
172+ BT_RFCOMM m
173+ BT_RFCOMM_TTY y # RFCOMM TTY support
174+ CRASH_DUMP n
175+ DMAR? n # experimental
176+ DVB_DYNAMIC_MINORS? y # we use udev
177+ EFI_STUB y # EFI bootloader in the bzImage itself
178+ FUSION y # Fusion MPT device support
179+ IDE_GD_ATAPI y # ATAPI floppy support
180+ IRDA_ULTRA y # Ultra (connectionless) protocol
181+ JOYSTICK_IFORCE_232 y # I-Force Serial joysticks and wheels
182+ JOYSTICK_IFORCE_USB y # I-Force USB joysticks and wheels
183+ JOYSTICK_XPAD_FF y # X-Box gamepad rumble support
184+ JOYSTICK_XPAD_LEDS y # LED Support for Xbox360 controller 'BigX' LED
185+ LDM_PARTITION y # Windows Logical Disk Manager (Dynamic Disk) support
186+ LEDS_TRIGGER_IDE_DISK y # LED IDE Disk Trigger
187+ LOGIRUMBLEPAD2_FF y # Logitech Rumblepad 2 force feedback
188+ LOGO n # not needed
189+ MEDIA_ATTACH? y
190+ MEGARAID_NEWGEN y
191+ MICROCODE_AMD y
192+ MODVERSIONS y
193+ MOUSE_PS2_ELANTECH y # Elantech PS/2 protocol extension
194+ MTRR_SANITIZER y
195+ NET_FC y # Fibre Channel driver support
196+ PPP_MULTILINK y # PPP multilink support
197+ REGULATOR y # Voltage and Current Regulator Support
198+ SCSI_LOGGING y # SCSI logging facility
199+ SERIAL_8250 y # 8250/16550 and compatible serial support
200+ SLIP_COMPRESSED y # CSLIP compressed headers
201+ SLIP_SMART y
202+ THERMAL_HWMON y # Hardware monitoring support
203+ USB_DEBUG n
204+ USB_EHCI_ROOT_HUB_TT y # Root Hub Transaction Translators
205+ USB_EHCI_TT_NEWSCHED y # Improved transaction translator scheduling
206+ X86_CHECK_BIOS_CORRUPTION y
207+ X86_MCE y
208+ XEN_DOM0 y
209+210+ # Linux Containers
211+ RT_GROUP_SCHED? y
212+ CGROUP_DEVICE? y
213+ CGROUP_MEM_RES_CTLR? y
214+ CGROUP_MEM_RES_CTLR_SWAP? y
215+ DEVPTS_MULTIPLE_INSTANCES? y
216+217+ # Enable staging drivers. These are somewhat experimental, but
218+ # they generally don't hurt.
219+ STAGING y
220+221+ # PROC_EVENTS requires that the netlink connector is not built
222+ # as a module. This is required by libcgroup's cgrulesengd.
223+ CONNECTOR y
224+ PROC_EVENTS y
225+226+ # Tracing
227+ FTRACE y
228+ FUNCTION_TRACER y
229+ FTRACE_SYSCALLS y
230+ SCHED_TRACER y
231+232+ # Devtmpfs support.
233+ DEVTMPFS y
234+235+ # Media support
236+ MEDIA_CAMERA_SUPPORT? y
237+ MEDIA_RC_SUPPORT? y
238+239+ ${if kernelPlatform ? kernelExtraConfig then kernelPlatform.kernelExtraConfig else ""}
240+ ${extraConfig}
241+ '';
242+in
243+244+import ./generic.nix (
245+246+ rec {
247+ version = "3.7";
248+ testing = false;
249+250+ modDirVersion = "3.7.0";
251+252+ preConfigure = ''
253+ substituteInPlace scripts/depmod.sh --replace '-b "$INSTALL_MOD_PATH"' ""
254+ '';
255+256+ src = fetchurl {
257+ url = "mirror://kernel/linux/kernel/v3.x/${if testing then "testing/" else ""}linux-${version}.tar.xz";
258+ sha256 = "0n4lddghf0mvp3jrq4lckii88yvm6mwmfp0ibwsw7vkfyw5lv9k0";
259+ };
260+261+ config = configWithPlatform stdenv.platform;
262+ configCross = configWithPlatform stdenv.cross.platform;
263+264+ features.iwlwifi = true;
265+ features.efiBootStub = true;
266+ features.needsCifsUtils = true;
267+ features.canDisableNetfilterConntrackHelpers = true;
268+ features.netfilterRPFilter = true;
269+ }
270+271+ // removeAttrs args ["extraConfig"]
272+)
···1213 makeFlags = "PREFIX=$(out)";
1415+ # commented out until the patch is found
16+ # patches = if stdenv.isDarwin then [ ./darwin.patch ] else [];
17 meta = {
18 homepage = http://redis.io;
19 description = "An open source, advanced key-value store";