···243244</section>
245246+<section xml:id="sec-declarative-package-management">
247+ <title>Declarative Package Management</title>
248+249+ <section xml:id="sec-building-environment">
250+ <title>Build an environment</title>
251+252+ <para>
253+ Using <literal>packageOverrides</literal>, it is possible to manage
254+ packages declaratively. This means that we can list all of our desired
255+ packages within a declarative Nix expression. For example, to have
256+ <literal>aspell</literal>, <literal>bc</literal>,
257+ <literal>ffmpeg</literal>, <literal>coreutils</literal>,
258+ <literal>gdb</literal>, <literal>nixUnstable</literal>,
259+ <literal>emscripten</literal>, <literal>jq</literal>,
260+ <literal>nox</literal>, and <literal>silver-searcher</literal>, we could
261+ use the following in <filename>~/.config/nixpkgs/config.nix</filename>:
262+ </para>
263+264+ <screen>
265+{
266+ packageOverrides = pkgs: with pkgs; {
267+ myPackages = pkgs.buildEnv {
268+ name = "my-packages";
269+ paths = [ aspell bc coreutils gdb ffmpeg nixUnstable emscripten jq nox silver-searcher ];
270+ };
271+ };
272+}
273+ </screen>
274+275+ <para>
276+ To install it into our environment, you can just run <literal>nix-env -iA
277+ nixpkgs.myPackages</literal>. If you want to load the packages to be built
278+ from a working copy of <literal>nixpkgs</literal> you just run
279+ <literal>nix-env -f. -iA myPackages</literal>. To explore what's been
280+ installed, just look through <filename>~/.nix-profile/</filename>. You can
281+ see that a lot of stuff has been installed. Some of this stuff is useful
282+ some of it isn't. Let's tell Nixpkgs to only link the stuff that we want:
283+ </para>
284+285+ <screen>
286+{
287+ packageOverrides = pkgs: with pkgs; {
288+ myPackages = pkgs.buildEnv {
289+ name = "my-packages";
290+ paths = [ aspell bc coreutils gdb ffmpeg nixUnstable emscripten jq nox silver-searcher ];
291+ pathsToLink = [ "/share" "/bin" ];
292+ };
293+ };
294+}
295+ </screen>
296+297+ <para>
298+ <literal>pathsToLink</literal> tells Nixpkgs to only link the paths listed
299+ which gets rid of the extra stuff in the profile.
300+ <filename>/bin</filename> and <filename>/share</filename> are good
301+ defaults for a user environment, getting rid of the clutter. If you are
302+ running on Nix on MacOS, you may want to add another path as well,
303+ <filename>/Applications</filename>, that makes GUI apps available.
304+ </para>
305+306+ </section>
307+308+ <section xml:id="sec-getting-documentation">
309+ <title>Getting documentation</title>
310+311+ <para>
312+ After building that new environment, look through
313+ <filename>~/.nix-profile</filename> to make sure everything is there that
314+ we wanted. Discerning readers will note that some files are missing. Look
315+ inside <filename>~/.nix-profile/share/man/man1/</filename> to verify this.
316+ There are no man pages for any of the Nix tools! This is because some
317+ packages like Nix have multiple outputs for things like documentation (see
318+ section 4). Let's make Nix install those as well.
319+ </para>
320+321+ <screen>
322+{
323+ packageOverrides = pkgs: with pkgs; {
324+ myPackages = pkgs.buildEnv {
325+ name = "my-packages";
326+ paths = [ aspell bc coreutils ffmpeg nixUnstable emscripten jq nox silver-searcher ];
327+ pathsToLink = [ "/share/man" "/share/doc" /bin" ];
328+ extraOutputsToInstall = [ "man" "doc" ];
329+ };
330+ };
331+}
332+ </screen>
333+334+ <para>
335+ This provides us with some useful documentation for using our packages.
336+ However, if we actually want those manpages to be detected by man, we need
337+ to set up our environment. This can also be managed within Nix
338+ expressions.
339+ </para>
340+341+ <screen>
342+{
343+ packageOverrides = pkgs: with pkgs; rec {
344+ myProfile = writeText "my-profile" ''
345+export PATH=$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/sbin:/bin:/usr/sbin:/usr/bin
346+export MANPATH=$HOME/.nix-profile/share/man:/nix/var/nix/profiles/default/share/man:/usr/share/man
347+ '';
348+ myPackages = pkgs.buildEnv {
349+ name = "my-packages";
350+ paths = [
351+ (runCommand "profile" {} ''
352+mkdir -p $out/etc/profile.d
353+cp ${myProfile} $out/etc/profile.d/my-profile.sh
354+ '')
355+ aspell
356+ bc
357+ coreutils
358+ ffmpeg
359+ man
360+ nixUnstable
361+ emscripten
362+ jq
363+ nox
364+ silver-searcher
365+ ];
366+ pathsToLink = [ "/share/man" "/share/doc" /bin" "/etc" ];
367+ extraOutputsToInstall = [ "man" "doc" ];
368+ };
369+ };
370+}
371+ </screen>
372+373+ <para>
374+ For this to work fully, you must also have this script sourced when you
375+ are logged in. Try adding something like this to your
376+ <filename>~/.profile</filename> file:
377+ </para>
378+379+ <screen>
380+#!/bin/sh
381+if [ -d $HOME/.nix-profile/etc/profile.d ]; then
382+ for i in $HOME/.nix-profile/etc/profile.d/*.sh; do
383+ if [ -r $i ]; then
384+ . $i
385+ fi
386+ done
387+fi
388+ </screen>
389+390+ <para>
391+ Now just run <literal>source $HOME/.profile</literal> and you can starting
392+ loading man pages from your environent.
393+ </para>
394+395+ </section>
396+397+ <section xml:id="sec-gnu-info-setup">
398+ <title>GNU info setup</title>
399+400+ <para>
401+ Configuring GNU info is a little bit trickier than man pages. To work
402+ correctly, info needs a database to be generated. This can be done with
403+ some small modifications to our environment scripts.
404+ </para>
405+406+ <screen>
407+{
408+ packageOverrides = pkgs: with pkgs; rec {
409+ myProfile = writeText "my-profile" ''
410+export PATH=$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/sbin:/bin:/usr/sbin:/usr/bin
411+export MANPATH=$HOME/.nix-profile/share/man:/nix/var/nix/profiles/default/share/man:/usr/share/man
412+export INFOPATH=$HOME/.nix-profile/share/info:/nix/var/nix/profiles/default/share/info:/usr/share/info
413+ '';
414+ myPackages = pkgs.buildEnv {
415+ name = "my-packages";
416+ paths = [
417+ (runCommand "profile" {} ''
418+mkdir -p $out/etc/profile.d
419+cp ${myProfile} $out/etc/profile.d/my-profile.sh
420+ '')
421+ aspell
422+ bc
423+ coreutils
424+ ffmpeg
425+ man
426+ nixUnstable
427+ emscripten
428+ jq
429+ nox
430+ silver-searcher
431+ texinfoInteractive
432+ ];
433+ pathsToLink = [ "/share/man" "/share/doc" "/share/info" "/bin" "/etc" ];
434+ extraOutputsToInstall = [ "man" "doc" "info" ];
435+ postBuild = ''
436+ if [ -x $out/bin/install-info -a -w $out/share/info ]; then
437+ shopt -s nullglob
438+ for i in $out/share/info/*.info $out/share/info/*.info.gz; do
439+ $out/bin/install-info $i $out/share/info/dir
440+ done
441+ fi
442+ '';
443+ };
444+ };
445+}
446+ </screen>
447+448+ <para>
449+ <literal>postBuild</literal> tells Nixpkgs to run a command after building
450+ the environment. In this case, <literal>install-info</literal> adds the
451+ installed info pages to <literal>dir</literal> which is GNU info's default
452+ root node. Note that <literal>texinfoInteractive</literal> is added to the
453+ environment to give the <literal>install-info</literal> command.
454+ </para>
455+456+ </section>
457+458+</section>
459460</chapter>
+1
maintainers/scripts/update-python-libraries
···91 if release['filename'].endswith(extension):
92 # TODO: In case of wheel we need to do further checks!
93 sha256 = release['digests']['sha256']
094 else:
95 sha256 = None
96 return version, sha256
···91 if release['filename'].endswith(extension):
92 # TODO: In case of wheel we need to do further checks!
93 sha256 = release['digests']['sha256']
94+ break
95 else:
96 sha256 = None
97 return version, sha256
+17-1
nixos/doc/manual/release-notes/rl-1709.xml
···86 </listitem>
87 <listitem>
88 <para>
000089 The <literal>postgres</literal> default version was changed from 9.5 to 9.6.
90 </para>
91 <para>
···93 </para>
94 <para>
95 The <literal>postgres</literal> default <literal>dataDir</literal> has changed from <literal>/var/db/postgres</literal> to <literal>/var/lib/postgresql/$psqlSchema</literal> where $psqlSchema is 9.6 for example.
00096 </para>
97 </listitem>
98 <listitem>
···113 also serve as a SSH agent if <literal>enableSSHSupport</literal> is set.
114 </para>
115 </listitem>
0000000000116</itemizedlist>
117-118119<para>Other notable improvements:</para>
120
···86 </listitem>
87 <listitem>
88 <para>
89+ The following changes apply if the <literal>stateVersion</literal> is changed to 17.09 or higher.
90+ For <literal>stateVersion = "17.03</literal> or lower the old behavior is preserved.
91+ </para>
92+ <para>
93 The <literal>postgres</literal> default version was changed from 9.5 to 9.6.
94 </para>
95 <para>
···97 </para>
98 <para>
99 The <literal>postgres</literal> default <literal>dataDir</literal> has changed from <literal>/var/db/postgres</literal> to <literal>/var/lib/postgresql/$psqlSchema</literal> where $psqlSchema is 9.6 for example.
100+ </para>
101+ <para>
102+ The <literal>mysql</literal> default <literal>dataDir</literal> has changed from <literal>/var/mysql</literal> to <literal>/var/lib/mysql</literal>.
103 </para>
104 </listitem>
105 <listitem>
···120 also serve as a SSH agent if <literal>enableSSHSupport</literal> is set.
121 </para>
122 </listitem>
123+ <listitem>
124+ <para>
125+ The <literal>services.tinc.networks.<name>.listenAddress</literal>
126+ option had a misleading name that did not correspond to its behavior. It
127+ now correctly defines the ip to listen for incoming connections on. To
128+ keep the previous behaviour, use
129+ <literal>services.tinc.networks.<name>.bindToAddress</literal>
130+ instead. Refer to the description of the options for more details.
131+ </para>
132+ </listitem>
133</itemizedlist>
0134135<para>Other notable improvements:</para>
136
···448 """
449 Manage Taskserver users and certificates
450 """
00451 for path in (CA_KEY, CA_CERT, CRL_FILE):
452 if not os.path.exists(path):
453 msg = "CA setup not done or incomplete, missing file {}."
···448 """
449 Manage Taskserver users and certificates
450 """
451+ if not IS_AUTO_CONFIG:
452+ return
453 for path in (CA_KEY, CA_CERT, CRL_FILE):
454 if not os.path.exists(path):
455 msg = "CA setup not done or incomplete, missing file {}."
+11-2
nixos/modules/services/networking/tinc.nix
···79 default = null;
80 type = types.nullOr types.str;
81 description = ''
82- The ip adress to bind to.
0000000083 '';
84 };
85···131 Name = ${if data.name == null then "$HOST" else data.name}
132 DeviceType = ${data.interfaceType}
133 ${optionalString (data.ed25519PrivateKeyFile != null) "Ed25519PrivateKeyFile = ${data.ed25519PrivateKeyFile}"}
134- ${optionalString (data.listenAddress != null) "BindToAddress = ${data.listenAddress}"}
0135 Device = /dev/net/tun
136 Interface = tinc.${network}
137 ${data.extraConfig}
···79 default = null;
80 type = types.nullOr types.str;
81 description = ''
82+ The ip address to listen on for incoming connections.
83+ '';
84+ };
85+86+ bindToAddress = mkOption {
87+ default = null;
88+ type = types.nullOr types.str;
89+ description = ''
90+ The ip address to bind to (both listen on and send packets from).
91 '';
92 };
93···139 Name = ${if data.name == null then "$HOST" else data.name}
140 DeviceType = ${data.interfaceType}
141 ${optionalString (data.ed25519PrivateKeyFile != null) "Ed25519PrivateKeyFile = ${data.ed25519PrivateKeyFile}"}
142+ ${optionalString (data.listenAddress != null) "ListenAddress = ${data.listenAddress}"}
143+ ${optionalString (data.bindToAddress != null) "BindToAddress = ${data.bindToAddress}"}
144 Device = /dev/net/tun
145 Interface = tinc.${network}
146 ${data.extraConfig}
···3# has additional options that affect the web server as a whole, like
4# the user/group to run under.)
56-{ lib }:
78with lib;
9{
···26 '';
27 };
2829- port = mkOption {
30- type = types.nullOr types.int;
31- default = null;
00000000000032 description = ''
33- Port for the server. Defaults to 80 for http
34- and 443 for https (i.e. when enableSSL is set).
0035 '';
36 };
37
···3# has additional options that affect the web server as a whole, like
4# the user/group to run under.)
56+{ config, lib }:
78with lib;
9{
···26 '';
27 };
2829+ listen = mkOption {
30+ type = with types; listOf (submodule {
31+ options = {
32+ addr = mkOption { type = str; description = "IP address."; };
33+ port = mkOption { type = nullOr int; description = "Port number."; };
34+ };
35+ });
36+ default =
37+ [ { addr = "0.0.0.0"; port = null; } ]
38+ ++ optional config.networking.enableIPv6
39+ { addr = "[::]"; port = null; };
40+ example = [
41+ { addr = "195.154.1.1"; port = 443; }
42+ { addr = "192.168.1.2"; port = 443; }
43+ ];
44 description = ''
45+ Listen addresses and ports for this virtual host.
46+ IPv6 addresses must be enclosed in square brackets.
47+ Setting the port to <literal>null</literal> defaults
48+ to 80 for http and 443 for https (i.e. when enableSSL is set).
49 '';
50 };
51
+1
nixos/modules/system/boot/stage-1-init.sh
···301 *x-nixos.autoresize*)
302 if [ "$fsType" = ext2 -o "$fsType" = ext3 -o "$fsType" = ext4 ]; then
303 echo "resizing $device..."
0304 resize2fs "$device"
305 fi
306 ;;
···246 };
247248 subtest "check manual configuration", sub {
249+ # Remove the keys from automatic CA creation, to make sure the new
250+ # generation doesn't use keys from before.
251+ $server->succeed('rm -rf ${cfg.dataDir}/keys/* >&2');
252+253 $server->succeed('${switchToNewServer} >&2');
254 $server->waitForUnit("taskserver.service");
255 $server->waitForOpenPort(${portStr});
···1{ lib, python3Packages, fetchFromGitHub, gtk3, cairo
2, aspellDicts, buildEnv
3, gnome3, hicolor_icon_theme
4-, xvfb_run, dbus
5}:
67python3Packages.buildPythonApplication rec {
8 name = "paperwork-${version}";
9 # Don't forget to also update paperwork-backend when updating this!
10- version = "1.0.6.1";
1112 src = fetchFromGitHub {
13 repo = "paperwork";
14 owner = "jflesch";
15 rev = version;
16- sha256 = "1v1lxyi4crdik4jlwjds9n6lzw4m4l4f9n5azlinv8wb477qpv6h";
17 };
1819 # Patch out a few paths that assume that we're using the FHS:
···47 }}/lib/aspell";
4849 checkInputs = [ xvfb_run dbus.daemon ];
50- buildInputs = [ gnome3.defaultIconTheme hicolor_icon_theme ];
5152 # A few parts of chkdeps need to have a display and a dbus session, so we not
53 # only need to run a virtual X server + dbus but also have a large enough
···59 '';
6061 propagatedBuildInputs = with python3Packages; [
62- paperwork-backend pypillowfight gtk3 cairo
63 ];
6465 makeWrapperArgs = [
···1{ lib, python3Packages, fetchFromGitHub, gtk3, cairo
2, aspellDicts, buildEnv
3, gnome3, hicolor_icon_theme
4+, xvfb_run, dbus, libnotify
5}:
67python3Packages.buildPythonApplication rec {
8 name = "paperwork-${version}";
9 # Don't forget to also update paperwork-backend when updating this!
10+ version = "1.2";
1112 src = fetchFromGitHub {
13 repo = "paperwork";
14 owner = "jflesch";
15 rev = version;
16+ sha256 = "1cb9wnhhpm3dyxjrkyl9bbva56xx85vlwlb7z07m1icflcln14x5";
17 };
1819 # Patch out a few paths that assume that we're using the FHS:
···47 }}/lib/aspell";
4849 checkInputs = [ xvfb_run dbus.daemon ];
50+ buildInputs = [ gnome3.defaultIconTheme hicolor_icon_theme libnotify ];
5152 # A few parts of chkdeps need to have a display and a dbus session, so we not
53 # only need to run a virtual X server + dbus but also have a large enough
···59 '';
6061 propagatedBuildInputs = with python3Packages; [
62+ paperwork-backend pypillowfight gtk3 cairo pyxdg dateutil
63 ];
6465 makeWrapperArgs = [
+9-6
pkgs/build-support/docker/default.nix
···234 # Files to add to the layer.
235 contents ? null,
236 # Additional commands to run on the layer before it is tar'd up.
237- extraCommands ? ""
238 }:
239 runCommand "docker-layer-${name}" {
240 inherit baseJson contents extraCommands;
241-242 buildInputs = [ jshon rsync ];
243 }
244 ''
···253 echo "No contents to add to layer."
254 fi
25500256 if [[ -n $extraCommands ]]; then
257 (cd layer; eval "$extraCommands")
258 fi
···260 # Tar up the layer and throw it into 'layer.tar'.
261 echo "Packing layer..."
262 mkdir $out
263- tar -C layer --mtime="@$SOURCE_DATE_EPOCH" -cf $out/layer.tar .
264265 # Compute a checksum of the tarball.
266 echo "Computing layer checksum..."
···312 echo "Adding $item..."
313 rsync -ak --chown=0:0 $item/ layer/
314 done
00315 '';
316317 postMount = ''
···375 # Docker config; e.g. what command to run on the container.
376 config ? null,
377 # Optional bash script to run on the files prior to fixturizing the layer.
378- extraCommands ? "",
379 # Optional bash script to run as root on the image when provisioning.
380 runAsRoot ? null,
381 # Size of the virtual machine disk to provision when building the image.
···398 if runAsRoot == null
399 then mkPureLayer {
400 name = baseName;
401- inherit baseJson contents extraCommands;
402 } else mkRootLayer {
403 name = baseName;
404 inherit baseJson fromImage fromImageName fromImageTag
···498 chmod -R a-w image
499500 echo "Cooking the image..."
501- tar -C image --mtime="@$SOURCE_DATE_EPOCH" -c . | pigz -nT > $out
502503 echo "Finished."
504 '';
···234 # Files to add to the layer.
235 contents ? null,
236 # Additional commands to run on the layer before it is tar'd up.
237+ extraCommands ? "", uid ? 0, gid ? 0
238 }:
239 runCommand "docker-layer-${name}" {
240 inherit baseJson contents extraCommands;
0241 buildInputs = [ jshon rsync ];
242 }
243 ''
···252 echo "No contents to add to layer."
253 fi
254255+ chmod ug+w layer
256+257 if [[ -n $extraCommands ]]; then
258 (cd layer; eval "$extraCommands")
259 fi
···261 # Tar up the layer and throw it into 'layer.tar'.
262 echo "Packing layer..."
263 mkdir $out
264+ tar -C layer --mtime="@$SOURCE_DATE_EPOCH" --owner=${toString uid} --group=${toString gid} -cf $out/layer.tar .
265266 # Compute a checksum of the tarball.
267 echo "Computing layer checksum..."
···313 echo "Adding $item..."
314 rsync -ak --chown=0:0 $item/ layer/
315 done
316+317+ chmod ug+w layer
318 '';
319320 postMount = ''
···378 # Docker config; e.g. what command to run on the container.
379 config ? null,
380 # Optional bash script to run on the files prior to fixturizing the layer.
381+ extraCommands ? "", uid ? 0, gid ? 0,
382 # Optional bash script to run as root on the image when provisioning.
383 runAsRoot ? null,
384 # Size of the virtual machine disk to provision when building the image.
···401 if runAsRoot == null
402 then mkPureLayer {
403 name = baseName;
404+ inherit baseJson contents extraCommands uid gid;
405 } else mkRootLayer {
406 name = baseName;
407 inherit baseJson fromImage fromImageName fromImageTag
···501 chmod -R a-w image
502503 echo "Cooking the image..."
504+ tar -C image --mtime="@$SOURCE_DATE_EPOCH" --owner=0 --group=0 -c . | pigz -nT > $out
505506 echo "Finished."
507 '';
···56 mkDerivation = pkgs.makeOverridable builder;
57 };
5859+ /* Uses generic-builder to evaluate provided drv containing Elixir version
60+ specific data.
61+62+ drv: package containing version-specific args;
63+ builder: generic builder for all Erlang versions;
64+ args: arguments merged into version-specific args, used mostly to customize
65+ dependencies;
66+67+ Arguments passed to the generic-builder are overridable.
68+69+ Please note that "mkDerivation" defined here is the one called from 1.2.nix
70+ and similar files.
71+ */
72+ callLFE = drv: args:
73+ let
74+ inherit (stdenv.lib) versionAtLeast;
75+ builder = callPackage ../interpreters/lfe/generic-builder.nix args;
76+ in
77+ callPackage drv {
78+ mkDerivation = pkgs.makeOverridable builder;
79+ };
80+81}
···1011with stdenv.lib;
12let
13- version = if releaseType != "demo" then "0.15.26" else "0.15.25";
1415 arch = if stdenv.system == "x86_64-linux" then {
16 inUrl = "linux64";
···26 url = "https://www.factorio.com/get-download/${version}/${releaseType}/${arch.inUrl}";
27 name = "factorio_${releaseType}_${arch.inTar}-${version}.tar.xz";
28 x64 = {
29- headless = fetchurl { inherit name url; sha256 = "1nblfff1m5wgp177l508y94n61lga3palhzw4frp2vd98sdp7gqk"; };
30- alpha = authenticatedFetch { inherit name url; sha256 = "0g7k58h15q4n9wxf96rx72w340xpdbj8k1faaxixrfrfx8bnmsls"; };
31 demo = fetchurl { inherit name url; sha256 = "1qz6g8mf221ic663zk92l6rs77ggfydaw2d8g2s7wy0j9097qbsl"; };
32 };
33 i386 = {
···1011with stdenv.lib;
12let
13+ version = if releaseType != "demo" then "0.15.30" else "0.15.25";
1415 arch = if stdenv.system == "x86_64-linux" then {
16 inUrl = "linux64";
···26 url = "https://www.factorio.com/get-download/${version}/${releaseType}/${arch.inUrl}";
27 name = "factorio_${releaseType}_${arch.inTar}-${version}.tar.xz";
28 x64 = {
29+ headless = fetchurl { inherit name url; sha256 = "0nmr73i9acnqgphfmsps7f8jlw0f2gyal9l8pldlp4rk0cjgvszy"; };
30+ alpha = authenticatedFetch { inherit name url; sha256 = "1ydh44na2lbvdv4anrblym7d6wxwapfbwap40n3722llrsad0zsz"; };
31 demo = fetchurl { inherit name url; sha256 = "1qz6g8mf221ic663zk92l6rs77ggfydaw2d8g2s7wy0j9097qbsl"; };
32 };
33 i386 = {
+1-1
pkgs/games/factorio/fetch.sh
···3334if grep -q 'Location: https://' headers; then
35 # Now download. We need --insecure for this, but the sha256 should cover us.
36- $curl --insecure --location $url > $out
37 set +x
38else
39 set +x
···3334if grep -q 'Location: https://' headers; then
35 # Now download. We need --insecure for this, but the sha256 should cover us.
36+ $curl --insecure --location --fail $url > $out || { echo "Login succeeded, but subsequent fetch failed."; exit 1; }
37 set +x
38else
39 set +x
···302 CIFS_UPCALL y
303 CIFS_ACL y
304 CIFS_DFS_UPCALL y
305- CIFS_SMB2 y
00306 ${optionalString (versionAtLeast version "3.12") ''
307 CEPH_FSCACHE y
308 ''}
···302 CIFS_UPCALL y
303 CIFS_ACL y
304 CIFS_DFS_UPCALL y
305+ ${optionalString (versionOlder version "4.13") ''
306+ CIFS_SMB2 y
307+ ''}
308 ${optionalString (versionAtLeast version "3.12") ''
309 CEPH_FSCACHE y
310 ''}
···1-From 8a937a25a7e3c19d5fb3f9d92f605cf5fda219d8 Mon Sep 17 00:00:00 2001
2-From: Masami Hiramatsu <mhiramat@kernel.org>
3-Date: Wed, 4 Jan 2017 12:30:19 +0900
4-Subject: perf probe: Fix to probe on gcc generated symbols for offline kernel
5-6-From: Masami Hiramatsu <mhiramat@kernel.org>
7-8-commit 8a937a25a7e3c19d5fb3f9d92f605cf5fda219d8 upstream.
9-10-Fix perf-probe to show probe definition on gcc generated symbols for
11-offline kernel (including cross-arch kernel image).
12-13-gcc sometimes optimizes functions and generate new symbols with suffixes
14-such as ".constprop.N" or ".isra.N" etc. Since those symbol names are
15-not recorded in DWARF, we have to find correct generated symbols from
16-offline ELF binary to probe on it (kallsyms doesn't correct it). For
17-online kernel or uprobes we don't need it because those are rebased on
18-_text, or a section relative address.
19-20-E.g. Without this:
21-22- $ perf probe -k build-arm/vmlinux -F __slab_alloc*
23- __slab_alloc.constprop.9
24- $ perf probe -k build-arm/vmlinux -D __slab_alloc
25- p:probe/__slab_alloc __slab_alloc+0
26-27-If you put above definition on target machine, it should fail
28-because there is no __slab_alloc in kallsyms.
29-30-With this fix, perf probe shows correct probe definition on
31-__slab_alloc.constprop.9:
32-33- $ perf probe -k build-arm/vmlinux -D __slab_alloc
34- p:probe/__slab_alloc __slab_alloc.constprop.9+0
35-36-Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
37-Cc: Jiri Olsa <jolsa@redhat.com>
38-Cc: Namhyung Kim <namhyung@kernel.org>
39-Cc: Peter Zijlstra <peterz@infradead.org>
40-Link: http://lkml.kernel.org/r/148350060434.19001.11864836288580083501.stgit@devbox
41-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
42-Cc: Krister Johansen <kjlx@templeofstupid.com>
43-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
44-45----
46- tools/perf/util/probe-event.c | 48 +++++++++++++++++++++++++++++++++++++++++-
47- 1 file changed, 47 insertions(+), 1 deletion(-)
48-49---- a/tools/perf/util/probe-event.c
50-+++ b/tools/perf/util/probe-event.c
51-@@ -618,6 +618,51 @@ error:
52- return ret ? : -ENOENT;
53- }
54-55-+/*
56-+ * Rename DWARF symbols to ELF symbols -- gcc sometimes optimizes functions
57-+ * and generate new symbols with suffixes such as .constprop.N or .isra.N
58-+ * etc. Since those symbols are not recorded in DWARF, we have to find
59-+ * correct generated symbols from offline ELF binary.
60-+ * For online kernel or uprobes we don't need this because those are
61-+ * rebased on _text, or already a section relative address.
62-+ */
63-+static int
64-+post_process_offline_probe_trace_events(struct probe_trace_event *tevs,
65-+ int ntevs, const char *pathname)
66-+{
67-+ struct symbol *sym;
68-+ struct map *map;
69-+ unsigned long stext = 0;
70-+ u64 addr;
71-+ int i;
72-+
73-+ /* Prepare a map for offline binary */
74-+ map = dso__new_map(pathname);
75-+ if (!map || get_text_start_address(pathname, &stext) < 0) {
76-+ pr_warning("Failed to get ELF symbols for %s\n", pathname);
77-+ return -EINVAL;
78-+ }
79-+
80-+ for (i = 0; i < ntevs; i++) {
81-+ addr = tevs[i].point.address + tevs[i].point.offset - stext;
82-+ sym = map__find_symbol(map, addr);
83-+ if (!sym)
84-+ continue;
85-+ if (!strcmp(sym->name, tevs[i].point.symbol))
86-+ continue;
87-+ /* If we have no realname, use symbol for it */
88-+ if (!tevs[i].point.realname)
89-+ tevs[i].point.realname = tevs[i].point.symbol;
90-+ else
91-+ free(tevs[i].point.symbol);
92-+ tevs[i].point.symbol = strdup(sym->name);
93-+ tevs[i].point.offset = addr - sym->start;
94-+ }
95-+ map__put(map);
96-+
97-+ return 0;
98-+}
99-+
100- static int add_exec_to_probe_trace_events(struct probe_trace_event *tevs,
101- int ntevs, const char *exec)
102- {
103-@@ -694,7 +739,8 @@ post_process_kernel_probe_trace_events(s
104-105- /* Skip post process if the target is an offline kernel */
106- if (symbol_conf.ignore_vmlinux_buildid)
107-- return 0;
108-+ return post_process_offline_probe_trace_events(tevs, ntevs,
109-+ symbol_conf.vmlinux_name);
110-111- reloc_sym = kernel_get_ref_reloc_sym();
112- if (!reloc_sym) {
113-114----
115-116-From 3e96dac7c956089d3f23aca98c4dfca57b6aaf8a Mon Sep 17 00:00:00 2001
117-From: Masami Hiramatsu <mhiramat@kernel.org>
118-Date: Wed, 11 Jan 2017 15:00:47 +0900
119-Subject: perf probe: Add error checks to offline probe post-processing
120-121-From: Masami Hiramatsu <mhiramat@kernel.org>
122-123-commit 3e96dac7c956089d3f23aca98c4dfca57b6aaf8a upstream.
124-125-Add error check codes on post processing and improve it for offline
126-probe events as:
127-128- - post processing fails if no matched symbol found in map(-ENOENT)
129- or strdup() failed(-ENOMEM).
130-131- - Even if the symbol name is the same, it updates symbol address
132- and offset.
133-134-Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
135-Cc: Jiri Olsa <jolsa@redhat.com>
136-Cc: Namhyung Kim <namhyung@kernel.org>
137-Cc: Peter Zijlstra <peterz@infradead.org>
138-Link: http://lkml.kernel.org/r/148411443738.9978.4617979132625405545.stgit@devbox
139-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
140-Cc: Krister Johansen <kjlx@templeofstupid.com>
141-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
142-143----
144- tools/perf/util/probe-event.c | 50 +++++++++++++++++++++++++++---------------
145- 1 file changed, 33 insertions(+), 17 deletions(-)
146-147---- a/tools/perf/util/probe-event.c
148-+++ b/tools/perf/util/probe-event.c
149-@@ -618,6 +618,33 @@ error:
150- return ret ? : -ENOENT;
151- }
152-153-+/* Adjust symbol name and address */
154-+static int post_process_probe_trace_point(struct probe_trace_point *tp,
155-+ struct map *map, unsigned long offs)
156-+{
157-+ struct symbol *sym;
158-+ u64 addr = tp->address + tp->offset - offs;
159-+
160-+ sym = map__find_symbol(map, addr);
161-+ if (!sym)
162-+ return -ENOENT;
163-+
164-+ if (strcmp(sym->name, tp->symbol)) {
165-+ /* If we have no realname, use symbol for it */
166-+ if (!tp->realname)
167-+ tp->realname = tp->symbol;
168-+ else
169-+ free(tp->symbol);
170-+ tp->symbol = strdup(sym->name);
171-+ if (!tp->symbol)
172-+ return -ENOMEM;
173-+ }
174-+ tp->offset = addr - sym->start;
175-+ tp->address -= offs;
176-+
177-+ return 0;
178-+}
179-+
180- /*
181- * Rename DWARF symbols to ELF symbols -- gcc sometimes optimizes functions
182- * and generate new symbols with suffixes such as .constprop.N or .isra.N
183-@@ -630,11 +657,9 @@ static int
184- post_process_offline_probe_trace_events(struct probe_trace_event *tevs,
185- int ntevs, const char *pathname)
186- {
187-- struct symbol *sym;
188- struct map *map;
189- unsigned long stext = 0;
190-- u64 addr;
191-- int i;
192-+ int i, ret = 0;
193-194- /* Prepare a map for offline binary */
195- map = dso__new_map(pathname);
196-@@ -644,23 +669,14 @@ post_process_offline_probe_trace_events(
197- }
198-199- for (i = 0; i < ntevs; i++) {
200-- addr = tevs[i].point.address + tevs[i].point.offset - stext;
201-- sym = map__find_symbol(map, addr);
202-- if (!sym)
203-- continue;
204-- if (!strcmp(sym->name, tevs[i].point.symbol))
205-- continue;
206-- /* If we have no realname, use symbol for it */
207-- if (!tevs[i].point.realname)
208-- tevs[i].point.realname = tevs[i].point.symbol;
209-- else
210-- free(tevs[i].point.symbol);
211-- tevs[i].point.symbol = strdup(sym->name);
212-- tevs[i].point.offset = addr - sym->start;
213-+ ret = post_process_probe_trace_point(&tevs[i].point,
214-+ map, stext);
215-+ if (ret < 0)
216-+ break;
217- }
218- map__put(map);
219-220-- return 0;
221-+ return ret;
222- }
223-224- static int add_exec_to_probe_trace_events(struct probe_trace_event *tevs,
···123 # to be adapted
124 zfsStable = common {
125 # comment/uncomment if breaking kernel versions are known
126- incompatibleKernelVersion = null;
127128- version = "0.6.5.10";
129130 # this package should point to the latest release.
131- sha256 = "04gn5fj22z17zq2nazxwl3j9dr33l79clha6ipxvdz241bhjqrk3";
132 extraPatches = [
133 (fetchpatch {
134 url = "https://github.com/Mic92/zfs/compare/zfs-0.6.5.8...nixos-zfs-0.6.5.8.patch";
···141 # comment/uncomment if breaking kernel versions are known
142 incompatibleKernelVersion = "4.12";
143144- version = "0.7.0-rc4";
145146 # this package should point to a version / git revision compatible with the latest kernel release
147- sha256 = "16jiq2h7m2ljg5xv7m5lqmsszzclkhvj1iq1wa9w740la4vl22kf";
148 extraPatches = [
149 (fetchpatch {
150 url = "https://github.com/Mic92/zfs/compare/zfs-0.7.0-rc3...nixos-zfs-0.7.0-rc3.patch";
···123 # to be adapted
124 zfsStable = common {
125 # comment/uncomment if breaking kernel versions are known
126+ incompatibleKernelVersion = "4.12";
127128+ version = "0.6.5.11";
129130 # this package should point to the latest release.
131+ sha256 = "1wqz43cjr21m3f52ahcikl2798pbzj5sfy16zqxwiqpv7iy09kr3";
132 extraPatches = [
133 (fetchpatch {
134 url = "https://github.com/Mic92/zfs/compare/zfs-0.6.5.8...nixos-zfs-0.6.5.8.patch";
···141 # comment/uncomment if breaking kernel versions are known
142 incompatibleKernelVersion = "4.12";
143144+ version = "0.7.0-rc5";
145146 # this package should point to a version / git revision compatible with the latest kernel release
147+ sha256 = "1k0fl6lbi5winri58v26k7gngd560hbj0247rnwcbc6j01ixsr5n";
148 extraPatches = [
149 (fetchpatch {
150 url = "https://github.com/Mic92/zfs/compare/zfs-0.7.0-rc3...nixos-zfs-0.7.0-rc3.patch";
···58 # `beam.packages.erlangR19.elixir`.
59 inherit (packages.erlang) elixir elixir_1_5_rc elixir_1_4 elixir_1_3;
6061- lfe = packages.erlang.lfe;
62 };
6364 # Helper function to generate package set with a specific Erlang version.
···58 # `beam.packages.erlangR19.elixir`.
59 inherit (packages.erlang) elixir elixir_1_5_rc elixir_1_4 elixir_1_3;
6061+ inherit (packages.erlang) lfe lfe_1_2;
62 };
6364 # Helper function to generate package set with a specific Erlang version.
+31-468
pkgs/top-level/python-packages.nix
···8485 vowpalwabbit = callPackage ../development/python-modules/vowpalwabbit { pythonPackages = self; };
8687- acoustics = buildPythonPackage rec {
88- pname = "acoustics";
89- version = "0.1.2";
90- name = pname + "-" + version;
91-92- buildInputs = with self; [ cython pytest ];
93- propagatedBuildInputs = with self; [ numpy scipy matplotlib pandas tabulate ];
94-95- src = pkgs.fetchurl {
96- url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
97- sha256 = "b75a47de700d01e704de95953a6e969922b2f510d7eefe59f7f8980ad44ad1b7";
98- };
99-100- # Tests not distributed
101- doCheck = false;
102-103- meta = {
104- description = "A package for acousticians";
105- maintainer = with maintainers; [ fridh ];
106- license = with licenses; [ bsd3 ];
107- homepage = https://github.com/python-acoustics/python-acoustics;
108- };
109- };
110111 "3to2" = callPackage ../development/python-modules/3to2 { };
112···122123 agate-sql = callPackage ../development/python-modules/agate-sql { };
124125- ansicolor = buildPythonPackage rec {
126- name = "ansicolor-${version}";
127- version = "0.2.4";
128-129- src = pkgs.fetchurl{
130- url = "mirror://pypi/a/ansicolor/${name}.tar.gz";
131- sha256 = "0zlkk9706xn5yshwzdn8xsfkim8iv44zsl6qjwg2f4gn62rqky1h";
132- };
133-134- meta = {
135- homepage = "https://github.com/numerodix/ansicolor/";
136- description = "A library to produce ansi color output and colored highlighting and diffing";
137- license = licenses.asl20;
138- maintainers = with maintainers; [ andsild ];
139- };
140- };
141142 asn1crypto = callPackage ../development/python-modules/asn1crypto { };
143···167168 dkimpy = callPackage ../development/python-modules/dkimpy { };
169170- emcee = buildPythonPackage {
171- name = "emcee-2.1.0";
172- src = pkgs.fetchurl {
173- url = "mirror://pypi/e/emcee/emcee-2.1.0.tar.gz";
174- sha256 = "0qyafp9jfya0mkxgqfvljf0rkic5fm8nimzwadyrxyvq7nd07qaw";
175- };
176- propagatedBuildInputs = [ self.numpy ];
177- meta = {
178- homepage = http://dan.iel.fm/emcee;
179- license = "MIT";
180- description = "Kick ass affine-invariant ensemble MCMC sampling";
181- };
182- };
183184 dbus-python = callPackage ../development/python-modules/dbus {
185 dbus = pkgs.dbus;
186 };
187188- discid = buildPythonPackage rec {
189- name = "discid-1.1.0";
190-191- meta = {
192- description = "Python binding of libdiscid";
193- homepage = "https://python-discid.readthedocs.org/";
194- license = licenses.lgpl3Plus;
195- platforms = platforms.linux;
196- };
197-198- src = pkgs.fetchurl {
199- url = "mirror://pypi/d/discid/${name}.tar.gz";
200- sha256 = "b39d443051b26d0230be7a6c616243daae93337a8711dd5d4119bb6a0e516fa8";
201- };
202-203- patchPhase = ''
204- substituteInPlace discid/libdiscid.py \
205- --replace '_open_library(_LIB_NAME)' "_open_library('${pkgs.libdiscid}/lib/libdiscid.so.0')"
206- '';
207- };
208209 discordpy = callPackage ../development/python-modules/discordpy { };
210···264265 pygame-git = callPackage ../development/python-modules/pygame/git.nix { };
266267- pygame_sdl2 = buildPythonPackage rec {
268- pname = "pygame_sdl2";
269- version = "6.99.10.1227";
270- name = "${pname}-${version}";
271272- meta = {
273- description = "A reimplementation of parts of pygame API using SDL2";
274- homepage = "https://github.com/renpy/pygame_sdl2";
275- # Some parts are also available under Zlib License
276- license = licenses.lgpl2;
277- maintainers = with maintainers; [ raskin ];
278- };
279280- propagatedBuildInputs = with self; [ ];
281- buildInputs = with pkgs; with self; [
282- SDL2 SDL2_image SDL2_ttf SDL2_mixer
283- cython libjpeg libpng ];
284-285- postInstall = ''
286- ( cd "$out"/include/python*/ ;
287- ln -s pygame-sdl2 pygame_sdl2 || true ; )
288- '';
289-290- src = pkgs.fetchFromGitHub {
291- owner = "renpy";
292- repo = "${pname}";
293- rev = "renpy-${version}";
294- sha256 = "10n6janvqh5adn7pcijqwqfh234sybjz788kb8ac6b4l11hy2lx1";
295- };
296- };
297-298- pygobject2 = callPackage ../development/python-modules/pygobject { };
299 pygobject3 = callPackage ../development/python-modules/pygobject/3.nix { };
300301 pygtk = callPackage ../development/python-modules/pygtk { libglade = null; };
···352 hdf5 = pkgs.hdf5.override { zlib = pkgs.zlib; };
353 };
354355- unifi = buildPythonPackage rec {
356- name = "unifi-1.2.5";
357-358- propagatedBuildInputs = with self; [ urllib3 ];
359-360- # upstream has no tests
361- doCheck = false;
362-363- meta = {
364- description = "An API towards the Ubiquity Networks UniFi controller";
365- homepage = https://pypi.python.org/pypi/unifi/;
366- license = licenses.mit;
367- maintainers = with maintainers; [ peterhoeg ];
368- };
369-370- src = pkgs.fetchurl {
371- url = "mirror://pypi/u/unifi/${name}.tar.gz";
372- sha256 = "0prgx01hzs49prrazgxrinm7ivqzy57ch06qm2h7s1p957sazds8";
373- };
374- };
375376 pyunbound = callPackage ../tools/networking/unbound/python.nix { };
377378 # packages defined here
379380- aafigure = buildPythonPackage rec {
381- name = "aafigure-0.5";
382-383- src = pkgs.fetchurl {
384- url = "mirror://pypi/a/aafigure/${name}.tar.gz";
385- sha256 = "090c88beb091d28a233f854e239713aa15d8d1906ea16211855345c912e8a091";
386- };
387-388- propagatedBuildInputs = with self; [ pillow ];
389-390- # error: invalid command 'test'
391- doCheck = false;
392-393- # Fix impurity. TODO: Do the font lookup using fontconfig instead of this
394- # manual method. Until that is fixed, we get this whenever we run aafigure:
395- # WARNING: font not found, using PIL default font
396- patchPhase = ''
397- sed -i "s|/usr/share/fonts|/nonexisting-fonts-path|" aafigure/PILhelper.py
398- '';
399-400- meta = {
401- description = "ASCII art to image converter";
402- homepage = https://launchpad.net/aafigure/;
403- license = licenses.bsd2;
404- platforms = platforms.linux;
405- maintainers = with maintainers; [ bjornfor ];
406- };
407- };
408-409- altair = buildPythonPackage rec {
410- name = "altair-1.2.0";
411-412- src = pkgs.fetchurl {
413- url = "mirror://pypi/a/altair/${name}.tar.gz";
414- sha256 = "05c47dm20p7m0017p2h38il721rxag1q0457dj7whp0k8rc7qd1n";
415- };
416- buildInputs = [ self.pytest ];
417-418- checkPhase = ''
419- export LANG=en_US.UTF-8
420- py.test altair --doctest-modules
421- '';
422- propagatedBuildInputs = with self; [ vega pandas ipython traitlets ];
423- meta = {
424- description = "A declarative statistical visualization library for Python.";
425- homepage = https://github.com/altair-viz/altair;
426- license = licenses.bsd3;
427- platforms = platforms.linux;
428- maintainers = with maintainers; [ teh ];
429- };
430- };
431- vega = buildPythonPackage rec {
432- name = "vega-0.4.4";
433434- src = pkgs.fetchurl {
435- url = "mirror://pypi/v/vega/${name}.tar.gz";
436- sha256 = "08k92afnk0bivm07h1l5nh26xl2rfp7qn03aq17q1hr3fs5r6cdm";
437- };
438439- buildInputs = [ self.pytest ];
440- propagatedBuildInputs = with self; [ jupyter_core pandas ];
441442- meta = {
443- description = " An IPython/Jupyter widget for Vega and Vega-Lite.";
444- longDescription = ''
445- To use this you have to enter a nix-shell with vega. Then run:
446-447- jupyter nbextension install --user --py vega
448- jupyter nbextension enable --user vega
449- '';
450- homepage = https://github.com/vega/ipyvega;
451- license = licenses.bsd3;
452- platforms = platforms.linux;
453- maintainers = with maintainers; [ teh ];
454- };
455- };
456-457- acme = buildPythonPackage rec {
458- inherit (pkgs.certbot) src version;
459-460- name = "acme-${version}";
461-462- propagatedBuildInputs = with self; [
463- cryptography pyasn1 pyopenssl pyRFC3339 pytz requests six werkzeug mock
464- ndg-httpsclient
465- ];
466-467- buildInputs = with self; [ nose ];
468- postUnpack = "sourceRoot=\${sourceRoot}/acme";
469- };
470471 acme-tiny = buildPythonPackage rec {
472 name = "acme-tiny-${version}";
···81928193 paperwork-backend = buildPythonPackage rec {
8194 name = "paperwork-backend-${version}";
8195- version = "1.0.6";
81968197 src = pkgs.fetchFromGitHub {
8198 owner = "jflesch";
8199 repo = "paperwork-backend";
8200 rev = version;
8201- sha256 = "11jbhv9xcpimp9iq2b1hlpljzij73s86rb5lpgzhslqc7zmm5bxn";
8202 };
82038204 # Python 2.x is not supported.
8205 disabled = !isPy3k && !isPyPy;
82068207- # Make sure that chkdeps exits with status 1 if a dependency is not found.
8208- postPatch = ''
8209- sed -i -e '/print.*Missing dependencies/,/^ *$/ {
8210- /^ *$/ a \ sys.exit(1)
8211- }' scripts/paperwork-shell
8212- '';
8213-8214 preCheck = "\"$out/bin/paperwork-shell\" chkdeps paperwork_backend";
82158216 propagatedBuildInputs = with self; [
8217 pyenchant simplebayes pillow pycountry whoosh termcolor
8218- python-Levenshtein pyinsane2 pygobject3 pyocr pkgs.poppler_gi
008219 ];
82208221 meta = {
···99389939 django_polymorphic = callPackage ../development/python-modules/django-polymorphic { };
99409941- django_tagging = buildPythonPackage rec {
9942- name = "django-tagging-0.4.5";
99439944- src = pkgs.fetchurl {
9945- url = "mirror://pypi/d/django-tagging/${name}.tar.gz";
9946- sha256 = "00ki1g6pb2lnaj4lh0s865mmlf4kdwx7a6n38iy5qz9qv4xrvz4q";
9947- };
9948-9949- # error: invalid command 'test'
9950- doCheck = false;
9951-9952- propagatedBuildInputs = with self; [ django ];
9953-9954- meta = {
9955- description = "A generic tagging application for Django projects";
9956- homepage = https://github.com/Fantomas42/django-tagging;
9957- };
9958- };
9959-9960- django_tagging_0_3 = self.django_tagging.override (attrs: rec {
9961 name = "django-tagging-0.3.6";
99629963 src = pkgs.fetchurl {
···23884 };
23885 };
2388623887- tarsnapper = buildPythonPackage rec {
23888- name = "tarsnapper-0.2.1";
23889- disabled = isPy3k;
23890-23891- src = pkgs.fetchgit {
23892- url = https://github.com/miracle2k/tarsnapper.git;
23893- rev = "620439bca68892f2ffaba1079a34b18496cc6596";
23894- sha256 = "1n2k2r9x11r1ph9jcjhlk44hsghfnl1pl3aakbx121qc5dg7b0yn";
23895- };
23896-23897- propagatedBuildInputs = with self; [ argparse pyyaml ];
23898-23899- patches = [ ../development/python-modules/tarsnapper-path.patch ];
23900-23901- preConfigure = ''
23902- substituteInPlace src/tarsnapper/script.py \
23903- --replace '@NIXTARSNAPPATH@' '${pkgs.tarsnap}/bin/tarsnap'
23904- '';
23905- };
23906-23907 taskcoach = buildPythonPackage rec {
23908 name = "TaskCoach-1.3.22";
23909 disabled = isPy3k;
···29972 };
29973 };
2997429975- yapf = buildPythonPackage rec {
29976- name = "yapf-${version}";
29977- version = "0.11.0";
29978-29979- meta = {
29980- description = "A formatter for Python code.";
29981- homepage = "https://github.com/google/yapf";
29982- license = licenses.asl20;
29983- maintainers = with maintainers; [ siddharthist ];
29984- };
29985-29986- src = pkgs.fetchurl {
29987- url = "mirror://pypi/y/yapf/${name}.tar.gz";
29988- sha256 = "14kb9gxw39zhvrijhp066b4bm6bgv35iw56c394y4dyczpha0dij";
29989- };
29990- };
2999129992 autobahn = callPackage ../development/python-modules/autobahn { };
2999329994- jsonref = buildPythonPackage rec {
29995- name = "${pname}-${version}";
29996- pname = "jsonref";
29997- version = "0.1";
29998-29999- meta = {
30000- description = "An implementation of JSON Reference for Python.";
30001- homepage = "http://github.com/gazpachoking/jsonref";
30002- license = licenses.mit;
30003- maintainers = with maintainers; [ nand0p ];
30004- platforms = platforms.all;
30005- };
30006-30007- buildInputs = with self; [ pytest mock ];
30008- checkPhase = ''
30009- py.test tests.py
30010- '';
30011-30012- src = pkgs.fetchurl {
30013- url = "mirror://pypi/j/${pname}/${name}.tar.gz";
30014- sha256 = "1lqa8dy1sr1bxi00ri79lmbxvzxi84ki8p46zynyrgcqhwicxq2n";
30015- };
30016- };
3001730018 whoosh = callPackage ../development/python-modules/whoosh { };
30019···30087 };
30088 };
3008930090- intervaltree = buildPythonPackage rec {
30091- name = "intervaltree-${version}";
30092- version = "2.1.0";
30093- src = pkgs.fetchurl {
30094- url = "mirror://pypi/i/intervaltree/${name}.tar.gz";
30095- sha256 = "02w191m9zxkcjqr1kv2slxvhymwhj3jnsyy3a28b837pi15q19dc";
30096- };
30097- buildInputs = with self; [ pytest ];
30098- propagatedBuildInputs = with self; [ sortedcontainers ];
30099- checkPhase = ''
30100- runHook preCheck
30101- # pytest will try to run tests for nix_run_setup.py / files in build/lib which fails
30102- mv nix_run_setup.py run_setup
30103- rm build -rf
30104- ${python.interpreter} run_setup test
30105- runHook postCheck
30106- '';
30107- meta = with pkgs.stdenv.lib; {
30108- description = "Editable interval tree data structure for Python 2 and 3";
30109- homepage = https://github.com/chaimleib/intervaltree;
30110- license = [ licenses.asl20 ];
30111- maintainers = [ maintainers.bennofs ];
30112- };
30113- };
30114-30115- packaging = buildPythonPackage rec {
30116- name = "packaging-16.8";
30117- src = pkgs.fetchurl {
30118- url = "mirror://pypi/p/packaging/${name}.tar.gz";
30119- sha256 = "5d50835fdf0a7edf0b55e311b7c887786504efea1177abd7e69329a8e5ea619e";
30120- };
30121- propagatedBuildInputs = with self; [ pyparsing six ];
30122- buildInputs = with self; [ pytest pretend ];
30123-30124- meta = with pkgs.stdenv.lib; {
30125- description = "Core utilities for Python packages";
30126- homepage = "https://github.com/pypa/packaging";
30127- license = [ licenses.bsd2 licenses.asl20 ];
30128- maintainers = with maintainers; [ bennofs ];
30129- };
30130- };
30131-30132- pytoml = buildPythonPackage rec {
30133- name = "pytoml-${version}";
30134- version = "0.1.11";
3013530136- checkPhase = "${python.interpreter} test/test.py";
3013730138- # fetchgit used to ensure test submodule is available
30139- src = pkgs.fetchgit {
30140- url = "${meta.homepage}.git";
30141- rev = "refs/tags/v${version}";
30142- sha256 = "1jiw04zk9ccynr8kb1vqh9r1p2kh0al7g7b1f94911iazg7dgs9j";
30143- };
3014430145- meta = {
30146- description = "A TOML parser/writer for Python";
30147- homepage = https://github.com/avakar/pytoml;
30148- license = licenses.mit;
30149- maintainers = with maintainers; [ peterhoeg ];
30150- };
30151- };
3015230153- pypandoc = buildPythonPackage rec {
30154- name = "pypandoc-1.3.3";
30155- src = pkgs.fetchurl {
30156- url = "mirror://pypi/p/pypandoc/${name}.tar.gz";
30157- sha256 = "0628f2kn4gqimnhpf251fgzl723hwgyl3idy69dkzyjvi45s5zm6";
30158- };
30159-30160- # Fix tests: first requires network access, second is a bug (reported upstream)
30161- preConfigure = ''
30162- substituteInPlace tests.py --replace "pypandoc.convert(url, 'html')" "'GPL2 license'"
30163- substituteInPlace tests.py --replace "pypandoc.convert_file(file_name, lua_file_name)" "'<h1 id=\"title\">title</h1>'"
30164- '';
30165-30166- LC_ALL="en_US.UTF-8";
30167-30168- propagatedBuildInputs = with self; [ self.pip ];
30169- buildInputs = [ pkgs.pandoc pkgs.texlive.combined.scheme-small pkgs.haskellPackages.pandoc-citeproc pkgs.glibcLocales ];
30170-30171- meta = with pkgs.stdenv.lib; {
30172- description = "Thin wrapper for pandoc";
30173- homepage = "https://github.com/bebraw/pypandoc";
30174- license = licenses.mit;
30175- maintainers = with maintainers; [ bennofs kristoff3r ];
30176- };
30177- };
30178-30179- yamllint = buildPythonPackage rec {
30180- name = "${pname}-${version}";
30181- pname = "yamllint";
30182- version = "0.5.2";
30183-30184- src = pkgs.fetchurl{
30185- url = "mirror://pypi/y/${pname}/${name}.tar.gz";
30186- sha256 = "0brdy1crhfng10hlw0420bv10c2xnjk8ndnhssybkzym47yrzg84";
30187- };
30188-30189- buildInputs = with self; [ nose ];
30190- propagatedBuildInputs = with self; [ pyyaml ];
30191-30192- meta = {
30193- homepage = "https://github.com/adrienverge/yamllint";
30194- description = "A linter for YAML files";
30195- license = licenses.gpl3;
30196- maintainers = with maintainers; [ mikefaille ];
30197- };
30198- };
3019930200 yarl = callPackage ../development/python-modules/yarl { };
30201···3022430225 typed-ast = callPackage ../development/python-modules/typed-ast { };
3022630227- stripe = buildPythonPackage rec {
30228- name = "${pname}-${version}";
30229- pname = "stripe";
30230- version = "1.41.1";
30231-30232- # Tests require network connectivity and there's no easy way to disable
30233- # them. ~ C.
30234- doCheck = false;
30235-30236- src = pkgs.fetchurl {
30237- url = "mirror://pypi/s/${pname}/${name}.tar.gz";
30238- sha256 = "0zvffvq933ia5w5ll6xhx2zgvppgc6zc2mxhc6f0kypw5g2fxvz5";
30239- };
30240-30241- buildInputs = with self; [ unittest2 mock ];
30242- propagatedBuildInputs = with self; [ requests ];
30243-30244- meta = {
30245- homepage = "https://github.com/stripe/stripe-python";
30246- description = "Stripe Python bindings";
30247- license = licenses.mit;
30248- };
30249- };
3025030251 uranium = callPackage ../development/python-modules/uranium { };
3025230253- vine = buildPythonPackage rec {
30254- name = "vine-${version}";
30255- version = "1.1.3";
30256-30257- disable = pythonOlder "2.7";
30258-30259- src = pkgs.fetchurl {
30260- url = "mirror://pypi/v/vine/${name}.tar.gz";
30261- sha256 = "0h94x9mc9bspg23lb1f73h7smdzc39ps7z7sm0q38ds9jahmvfc7";
30262- };
30263-30264- buildInputs = with self; [ case pytest ];
30265-30266- meta = {
30267- homepage = https://github.com/celery/vine;
30268- description = "python promises";
30269- license = licenses.bsd3;
30270- };
30271- };
3027230273 wp_export_parser = buildPythonPackage rec {
30274 name = "${pname}-${version}";
···30282 };
30283 };
3028430285- wptserve = callPackage ../development/python-modules/wptserve {};
3028630287- yenc = callPackage ../development/python-modules/yenc {
30288- };
3028930290- zeep = callPackage ../development/python-modules/zeep {
30291- };
3029230293 zeitgeist = if isPy3k then throw "zeitgeist not supported for interpreter ${python.executable}" else
30294 (pkgs.zeitgeist.override{python2Packages=self;}).py;
3029530296- zeroconf = buildPythonPackage rec {
30297- pname = "zeroconf";
30298- version = "0.18.0";
30299- name = "${pname}-${version}";
30300-30301- src = fetchPypi {
30302- inherit pname version;
30303- sha256 = "0s1840v2h4h19ad8lfadbm3dhzs8bw9c5c3slkxql1zsaiycvjy2";
30304- };
30305-30306- propagatedBuildInputs = with self; [ netifaces six enum-compat ];
30307-30308- meta = {
30309- description = "A pure python implementation of multicast DNS service discovery";
30310- homepage = "https://github.com/jstasiak/python-zeroconf";
30311- license = licenses.lgpl21;
30312- maintainers = with maintainers; [ abbradar ];
30313- };
30314- };
3031530316 zipfile36 = buildPythonPackage rec {
30317 pname = "zipfile36";