Merge remote-tracking branch 'upstream/master' into HEAD

This commit is contained in:
Frederik Rietdijk 2017-08-09 11:22:40 +02:00
commit 7a6d4f4710
45 changed files with 3799 additions and 4057 deletions

View File

@ -423,7 +423,7 @@ and in this case the `python35` interpreter is automatically used.
### Interpreters
Versions 2.7, 3.3, 3.4, 3.5 and 3.6 of the CPython interpreter are available as
respectively `python27`, `python33`, `python34`, `python35` and `python36`. The PyPy interpreter
respectively `python27`, `python34`, `python35` and `python36`. The PyPy interpreter
is available as `pypy`. The aliases `python2` and `python3` correspond to respectively `python27` and
`python35`. The default interpreter, `python`, maps to `python2`.
The Nix expressions for the interpreters can be found in
@ -469,7 +469,6 @@ sets are
* `pkgs.python26Packages`
* `pkgs.python27Packages`
* `pkgs.python33Packages`
* `pkgs.python34Packages`
* `pkgs.python35Packages`
* `pkgs.python36Packages`
@ -546,6 +545,35 @@ All parameters from `mkDerivation` function are still supported.
* `catchConflicts` If `true`, abort package build if a package name appears more than once in dependency tree. Default is `true`.
* `checkInputs` Dependencies needed for running the `checkPhase`. These are added to `buildInputs` when `doCheck = true`.
##### Overriding Python packages
The `buildPythonPackage` function has a `overridePythonPackage` method that
can be used to override the package. In the following example we create an
environment where we have the `blaze` package using an older version of `pandas`.
We override first the Python interpreter and pass
`packageOverrides` which contains the overrides for packages in the package set.
```nix
with import <nixpkgs> {};
(let
python = let
packageOverrides = self: super: {
pandas = super.pandas.overridePythonPackage(old: rec {
version = "0.19.1";
name = "pandas-${version}";
src = super.fetchPypi {
pname = "pandas";
inherit version;
sha256 = "08blshqj9zj1wyjhhw3kl2vas75vhhicvv72flvf1z3jvapgw295";
};
});
};
in pkgs.python3.override {inherit packageOverrides;};
in python.withPackages(ps: [ps.blaze])).env
```
#### `buildPythonApplication` function
The `buildPythonApplication` function is practically the same as `buildPythonPackage`.
@ -622,7 +650,7 @@ attribute. The `shell.nix` file from the previous section can thus be also writt
```nix
with import <nixpkgs> {};
(python33.withPackages (ps: [ps.numpy ps.requests])).env
(python36.withPackages (ps: [ps.numpy ps.requests])).env
```
In contrast to `python.buildEnv`, `python.withPackages` does not support the more advanced options
@ -755,17 +783,17 @@ In the following example we rename the `pandas` package and build it.
```nix
with import <nixpkgs> {};
let
(let
python = let
packageOverrides = self: super: {
pandas = super.pandas.override {name="foo";};
pandas = super.pandas.overridePythonPackage(old: {name="foo";});
};
in pkgs.python35.override {inherit packageOverrides;};
in python.pkgs.pandas
in python.withPackages(ps: [ps.pandas])).env
```
Using `nix-build` on this expression will build the package `pandas`
but with the new name `foo`.
Using `nix-build` on this expression will build an environment that contains the
package `pandas` but with the new name `foo`.
All packages in the package set will use the renamed package.
A typical use case is to switch to another version of a certain package.

View File

@ -111,7 +111,6 @@ the needed dependencies. For example, to make a derivation
in stdenv.mkDerivation {
name = "my-script";
buildInputs = [ env.wrappedRuby ];
phases = [ "installPhase" "fixupPhase" ];
script = ./my-script.rb;
buildCommand = ''
install -D -m755 $script $out/bin/my-script

View File

@ -293,6 +293,7 @@
khumba = "Bryan Gardiner <bog@khumba.net>";
KibaFox = "Kiba Fox <kiba.fox@foxypossibilities.com>";
kierdavis = "Kier Davis <kierdavis@gmail.com>";
kiloreux = "Kiloreux Emperex <kiloreux@gmail.com>";
kkallio = "Karn Kallio <tierpluspluslists@gmail.com>";
knedlsepp = "Josef Kemetmüller <josef.kemetmueller@gmail.com>";
konimex = "Muhammad Herdiansyah <herdiansyah@openmailbox.org>";

View File

@ -4,6 +4,8 @@ with lib;
let
cfg = config.services.fluentd;
pluginArgs = concatStringsSep " " (map (x: "-p ${x}") cfg.plugins);
in {
###### interface
@ -28,6 +30,15 @@ in {
defaultText = "pkgs.fluentd";
description = "The fluentd package to use.";
};
plugins = mkOption {
type = types.listOf types.path;
default = [];
description = ''
A list of plugin paths to pass into fluentd. It will make plugins defined in ruby files
there available in your config.
'';
};
};
};
@ -39,7 +50,7 @@ in {
description = "Fluentd Daemon";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/fluentd -c ${pkgs.writeText "fluentd.conf" cfg.config}";
ExecStart = "${cfg.package}/bin/fluentd -c ${pkgs.writeText "fluentd.conf" cfg.config} ${pluginArgs}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
};
};

View File

@ -12,6 +12,7 @@ let
dns =
if cfg.useDnsmasq then "dnsmasq"
else if config.services.resolved.enable then "systemd-resolved"
else if config.services.unbound.enable then "unbound"
else "default";
configFile = writeText "NetworkManager.conf" ''

View File

@ -85,7 +85,9 @@ stdenv.mkDerivation rec {
moveToOutput "bin/*-config" "$dev"
moveToOutput "lib/ImageMagick-*/config-Q16" "$dev" # includes configure params
for file in "$dev"/bin/*-config; do
substituteInPlace "$file" --replace pkg-config \
substituteInPlace "$file" --replace "${pkgconfig}/bin/pkg-config -config" \
${pkgconfig}/bin/pkg-config
substituteInPlace "$file" --replace ${pkgconfig}/bin/pkg-config \
"PKG_CONFIG_PATH='$dev/lib/pkgconfig' '${pkgconfig}/bin/pkg-config'"
done
'' + lib.optionalString (ghostscript != null) ''

View File

@ -84,7 +84,7 @@ let
fteLibPath = makeLibraryPath [ stdenv.cc.cc gmp ];
# Upstream source
version = "7.0.3";
version = "7.0.4";
lang = "en-US";
@ -94,7 +94,7 @@ let
"https://github.com/TheTorProject/gettorbrowser/releases/download/v${version}/tor-browser-linux64-${version}_${lang}.tar.xz"
"https://dist.torproject.org/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz"
];
sha256 = "1p91szx60xx3295bpap9w2ydgaibj0yn9lbdyhajal35bbhjxqhc";
sha256 = "17hz6nv7py80zbksk1dypmj8agr5jzsfrpjncphpsrflvbqzs2bx";
};
"i686-linux" = fetchurl {
@ -102,7 +102,7 @@ let
"https://github.com/TheTorProject/gettorbrowser/releases/download/v${version}/tor-browser-linux32-${version}_${lang}.tar.xz"
"https://dist.torproject.org/torbrowser/${version}/tor-browser-linux32-${version}_${lang}.tar.xz"
];
sha256 = "0p51dxiq3qxyc5n7xvh1hq039pvp7z730f6dks4h5p3sfqw6isfp";
sha256 = "0g8m5x891f4kdvb3fhmh98xfw569sbqd9wcadflabf9vc9bqv3al";
};
};
in

View File

@ -1,44 +1,46 @@
{ stdenv, fetchurl, makeDesktopItem
{ stdenv, fetchurl, makeDesktopItem, makeWrapper
, alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype, gdk_pixbuf
, glib, gnome2, gtk2, libnotify, libX11, libXcomposite, libXcursor, libXdamage
, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, nspr, nss, pango
, systemd, libXScrnSaver }:
, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, nspr, nss, libxcb
, pango, systemd, libXScrnSaver, libcxx }:
stdenv.mkDerivation rec {
pname = "discord";
version = "0.0.1";
version = "0.0.2";
name = "${pname}-${version}";
src = fetchurl {
url = "https://cdn.discordapp.com/apps/linux/${version}/${pname}-${version}.tar.gz";
sha256 = "10m3ixvhmxdw55awd84gx13m222qjykj7gcigbjabcvsgp2z63xs";
sha256 = "0sb7l0rrpqxzn4fndjr50r5xfiid1f81p22gda4mz943yv37mhfz";
};
nativeBuildInputs = [ makeWrapper ];
libPath = stdenv.lib.makeLibraryPath [
stdenv.cc.cc alsaLib atk cairo cups dbus expat fontconfig freetype
gdk_pixbuf glib gnome2.GConf gtk2 libnotify libX11 libXcomposite
libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender
libXtst nspr nss pango systemd libXScrnSaver
libXtst nspr nss libxcb pango systemd libXScrnSaver
];
installPhase = ''
mkdir -p $out/{bin,share/pixmaps}
mv * $out
mkdir -p $out/{bin,opt,share/pixmaps}
mv * $out/opt
# Copying how adobe-reader does it,
# see pkgs/applications/misc/adobe-reader/builder.sh
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$out:$libPath" \
$out/Discord
--set-rpath "$out/opt:$libPath" \
$out/opt/Discord
paxmark m $out/Discord
paxmark m $out/opt/Discord
ln -s $out/Discord $out/bin/
ln -s $out/discord.png $out/share/pixmaps
wrapProgram $out/opt/Discord --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH:${libcxx}/lib:${systemd.lib}/lib"
ln -s $out/opt/Discord $out/bin/
ln -s $out/opt/discord.png $out/share/pixmaps
# Putting udev in the path won't work :(
ln -s ${systemd.lib}/lib/libudev.so.1 $out
ln -s "${desktopItem}/share/applications" $out/share/
'';
@ -56,7 +58,7 @@ stdenv.mkDerivation rec {
homepage = https://discordapp.com/;
downloadPage = "https://github.com/crmarsh/discord-linux-bugs";
license = licenses.unfree;
maintainers = [ maintainers.ldesgoui ];
maintainers = [ maintainers.ldesgoui maintainers.MP2E ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -0,0 +1,132 @@
diff -Nur wireshark-2.4.0/doc/udpdump.pod wireshark-2.4.0-p/doc/udpdump.pod
--- wireshark-2.4.0/doc/udpdump.pod 1970-01-01 01:00:00.000000000 +0100
+++ wireshark-2.4.0-p/doc/udpdump.pod 2017-08-01 10:48:40.551431319 +0200
@@ -0,0 +1,128 @@
+
+=head1 NAME
+
+udpdump - Provide an UDP receiver that gets packets from network devices (like Aruba routers) and exports them in PCAP format.
+
+=head1 SYNOPSIS
+
+B<udpdump>
+S<[ B<--help> ]>
+S<[ B<--version> ]>
+S<[ B<--extcap-interfaces> ]>
+S<[ B<--extcap-dlts> ]>
+S<[ B<--extcap-interface>=E<lt>interfaceE<gt> ]>
+S<[ B<--extcap-config> ]>
+S<[ B<--capture> ]>
+S<[ B<--fifo>=E<lt>path to file or pipeE<gt> ]>
+S<[ B<--port>=E<lt>portE<gt> ]>
+S<[ B<--payload>=E<lt>typeE<gt> ]>
+
+=head1 DESCRIPTION
+
+B<udpdump> is a extcap tool that provides an UDP receiver that listens for exported datagrams coming from
+any source (like Aruba routers) and exports them in PCAP format. This provides the user two basic
+functionalities: the first one is to have a listener that prevents the localhost to send back an ICMP
+port-unreachable packet. The second one is to strip out the lower layers (layer 2, IP, UDP) that are useless
+(are used just as export vector). The format of the exported datagrams are EXPORTED_PDU, as specified in
+https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob;f=epan/exported_pdu.h;hb=refs/heads/master
+
+=head1 OPTIONS
+
+=over 4
+
+=item --help
+
+Print program arguments.
+
+=item --version
+
+Print program version.
+
+=item --extcap-interfaces
+
+List available interfaces.
+
+=item --extcap-interface=E<lt>interfaceE<gt>
+
+Use specified interfaces.
+
+=item --extcap-dlts
+
+List DLTs of specified interface.
+
+=item --extcap-config
+
+List configuration options of specified interface.
+
+=item --capture
+
+Start capturing from specified interface save saved it in place specified by --fifo.
+
+=item --fifo=E<lt>path to file or pipeE<gt>
+
+Save captured packet to file or send it through pipe.
+
+=item --port=E<lt>portE<gt>
+
+Set the listerner port. Port 5555 is the default.
+
+=item --payload=E<lt>typeE<gt>
+
+Set the payload of the exported PDU. Default: data.
+
+=back
+
+=head1 EXAMPLES
+
+To see program arguments:
+
+ udpdump --help
+
+To see program version:
+
+ udpdump --version
+
+To see interfaces:
+
+ udpdump --extcap-interfaces
+
+ Example output:
+ interface {value=udpdump}{display=UDP Listener remote capture}
+
+To see interface DLTs:
+
+ udpdump --extcap-interface=udpdump --extcap-dlts
+
+ Example output:
+ dlt {number=252}{name=udpdump}{display=Exported PDUs}
+
+To see interface configuration options:
+
+ udpdump --extcap-interface=udpdump --extcap-config
+
+ Example output:
+ arg {number=0}{call=--port}{display=Listen port}{type=unsigned}{range=1,65535}{default=5555}{tooltip=The port the receiver listens on}
+
+To capture:
+
+ udpdump --extcap-interface=randpkt --fifo=/tmp/randpkt.pcapng --capture
+
+NOTE: To stop capturing CTRL+C/kill/terminate application.
+
+=head1 SEE ALSO
+
+wireshark(1), tshark(1), dumpcap(1), extcap(4)
+
+=head1 NOTES
+
+B<udpdump> is part of the B<Wireshark> distribution. The latest version
+of B<Wireshark> can be found at L<https://www.wireshark.org>.
+
+HTML versions of the Wireshark project man pages are available at:
+L<https://www.wireshark.org/docs/man-pages>.
+
+=head1 AUTHORS
+
+ Original Author
+ ---------------
+ Dario Lombardo <lomato[AT]gmail.com>

View File

@ -1,6 +1,6 @@
{ stdenv, lib, fetchurl, pkgconfig, pcre, perl, flex, bison, gettext, libpcap, libnl, c-ares
, gnutls, libgcrypt, libgpgerror, geoip, openssl, lua5, makeDesktopItem, python, libcap, glib
, libssh, zlib, cmake, extra-cmake-modules
, libssh, zlib, cmake, extra-cmake-modules, fetchpatch
, withGtk ? false, gtk3 ? null, librsvg ? null, gsettings_desktop_schemas ? null, wrapGAppsHook ? null
, withQt ? false, qt5 ? null
, ApplicationServices, SystemConfiguration, gmp
@ -12,17 +12,19 @@ assert withQt -> !withGtk && qt5 != null;
with stdenv.lib;
let
version = "2.2.7";
version = "2.4.0";
variant = if withGtk then "gtk" else if withQt then "qt" else "cli";
in stdenv.mkDerivation {
name = "wireshark-${variant}-${version}";
src = fetchurl {
url = "http://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.bz2";
sha256 = "1dfvhra5v6xhzbp097qsxi0zvirw0srbasl4v1wjf58v49idz7b8";
url = "http://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.xz";
sha256 = "011vvrj76z1azkpvyy2j40b1x1z56ymld508zfc4xw3gh8dv82w9";
};
cmakeFlags = optional withGtk "-DBUILD_wireshark_gtk=TRUE";
nativeBuildInputs = [
bison cmake extra-cmake-modules flex
] ++ optional withGtk wrapGAppsHook;
@ -35,7 +37,19 @@ in stdenv.mkDerivation {
++ optionals stdenv.isLinux [ libcap libnl ]
++ optionals stdenv.isDarwin [ SystemConfiguration ApplicationServices gmp ];
patches = [ ./wireshark-lookup-dumpcap-in-path.patch ];
patches = [ ./wireshark-lookup-dumpcap-in-path.patch
# Backported from master. Will probably have to be dropped during next
# update.
(fetchpatch {
name = "AUTHORS_add_newline_after_bracket";
url = "https://code.wireshark.org/review/gitweb?p=wireshark.git;a=patch;h=27c6b12626d6e7b8e4d7a11784c2c5e2bfb87fde";
sha256 = "1x30rkrq7dzgdlwrjv2r5ibdpdgwnn5wzvki77rdf13b0547vcw3";
})
# A file is missing from distribution. This should be fixed in upcoming
# releases
./add_missing_udpdump_pod.patch
];
postInstall = optionalString (withQt || withGtk) ''
${optionalString withGtk ''

View File

@ -34,6 +34,8 @@ rec {
git = appendToName "minimal" gitBase;
git-fame = callPackage ./git-fame {};
# The full-featured Git.
gitFull = gitBase.override {
svnSupport = true;

View File

@ -0,0 +1,4 @@
source 'https://rubygems.org'
# Specify your gem's dependencies in git_fame.gemspec
gem "git_fame"

View File

@ -0,0 +1,26 @@
GEM
remote: https://rubygems.org/
specs:
git_fame (2.5.2)
hirb (~> 0.7.3)
memoist (~> 0.14.0)
method_profiler (~> 2.0.1)
progressbar (~> 0.21.0)
scrub_rb (~> 1.0.1)
trollop (~> 2.1.2)
hirb (0.7.3)
memoist (0.14.0)
method_profiler (2.0.1)
hirb (>= 0.6.0)
progressbar (0.21.0)
scrub_rb (1.0.1)
trollop (2.1.2)
PLATFORMS
ruby
DEPENDENCIES
git_fame
BUNDLED WITH
1.14.6

View File

@ -0,0 +1,19 @@
{ stdenv, bundlerEnv, ruby, fetchFromGitHub, makeWrapper, bundler }:
bundlerEnv rec {
inherit ruby;
pname = "git_fame";
gemdir = ./.;
meta = with stdenv.lib; {
description = ''
A command-line tool that helps you summarize and pretty-print collaborators based on contributions
'';
homepage = http://oleander.io/git-fame-rb;
license = licenses.mit;
maintainers = with maintainers; [ expipiplus1 ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,60 @@
{
git_fame = {
dependencies = ["hirb" "memoist" "method_profiler" "progressbar" "scrub_rb" "trollop"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "02k5ls5zyif8skdbnym6zw9y76whlnksw2m94jsh2n1ygk98izdd";
type = "gem";
};
version = "2.5.2";
};
hirb = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0mzch3c2lvmf8gskgzlx6j53d10j42ir6ik2dkrl27sblhy76cji";
type = "gem";
};
version = "0.7.3";
};
memoist = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "03d3h6kp16bf0crqg1cxdgp1d2iyzn53d3phbmjh4pjybqls0gcm";
type = "gem";
};
version = "0.14.0";
};
method_profiler = {
dependencies = ["hirb"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1ax04qrrv7fqp5ayxaxhn72660pybdkpkvmgiwbg7bs7x5ijjzd8";
type = "gem";
};
version = "2.0.1";
};
progressbar = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "17haw9c6c9q6imsn83pii32jnihpg76jgd09x7y4hjqq45n3qcdh";
type = "gem";
};
version = "0.21.0";
};
scrub_rb = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0dwg33w83w17aiij9kcbi7irj7lh045nh9prjgkzjya3f1j60d3x";
type = "gem";
};
version = "1.0.1";
};
trollop = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0415y63df86sqj43c0l82and65ia5h64if7n0znkbrmi6y0jwhl8";
type = "gem";
};
version = "2.1.2";
};
}

View File

@ -27,8 +27,10 @@ self: super: {
ghcjs-base = null;
ghcjs-prim = null;
# Some packages need a non-core version of Cabal.
cabal-install = super.cabal-install.overrideScope (self: super: { Cabal = self.Cabal_1_24_2_0; });
# cabal-install needs Cabal 2.x. hackage-security's test suite does not compile with
# Cabal 2.x, though. See https://github.com/haskell/hackage-security/issues/188.
cabal-install = super.cabal-install.overrideScope (self: super: { Cabal = self.Cabal_2_0_0_2; });
hackage-security = dontCheck super.hackage-security;
# Link statically to avoid runtime dependency on GHC.
jailbreak-cabal = (disableSharedExecutables super.jailbreak-cabal).override { Cabal = self.Cabal_1_20_0_4; };
@ -865,4 +867,10 @@ self: super: {
# https://github.com/vincenthz/hs-tls/issues/247
tls = dontCheck super.tls;
# missing dependencies: blaze-html >=0.5 && <0.9, blaze-markup >=0.5 && <0.8
digestive-functors-blaze = doJailbreak super.digestive-functors-blaze;
# missing dependencies: doctest ==0.12.*
html-entities = doJailbreak super.html-entities;
}

View File

@ -36,9 +36,6 @@ self: super: {
unix = null;
xhtml = null;
# Enable latest version of cabal-install.
cabal-install = (dontCheck (super.cabal-install)).overrideScope (self: super: { Cabal = self.Cabal_1_24_2_0; });
# Build jailbreak-cabal with the latest version of Cabal.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = self.Cabal_1_24_2_0; };

View File

@ -35,9 +35,6 @@ self: super: {
unix = null;
xhtml = null;
# cabal-install can use the native Cabal library.
cabal-install = super.cabal-install.override { Cabal = null; };
# jailbreak-cabal can use the native Cabal library.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = null; };

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,160 +0,0 @@
{ stdenv, fetchurl
, bzip2
, gdbm
, lzma
, ncurses
, openssl
, readline
, sqlite
, tcl ? null, tk ? null, tix ? null, libX11 ? null, xproto ? null, x11Support ? false
, zlib
, callPackage
, self
, CF, configd
, python-setup-hook
# For the Python package set
, pkgs, packageOverrides ? (self: super: {})
}:
assert x11Support -> tcl != null
&& tk != null
&& xproto != null
&& libX11 != null;
with stdenv.lib;
let
majorVersion = "3.3";
minorVersion = "6";
minorVersionSuffix = "";
pythonVersion = majorVersion;
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
libPrefix = "python${majorVersion}";
sitePackages = "lib/${libPrefix}/site-packages";
buildInputs = filter (p: p != null) [
zlib bzip2 lzma gdbm sqlite readline ncurses openssl ]
++ optionals x11Support [ tcl tk libX11 xproto ]
++ optionals stdenv.isDarwin [ CF configd ];
in stdenv.mkDerivation {
name = "python3-${version}";
pythonVersion = majorVersion;
inherit majorVersion version;
inherit buildInputs;
src = fetchurl {
url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
sha256 = "0gsxpgd5p4mwd01gw501vsyahncyw3h9836ypkr3y32kgazy89jj";
};
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
# Determinism: The interpreter is patched to write null timestamps when compiling python files.
# This way python doesn't try to update them when we freeze timestamps in nix store.
DETERMINISTIC_BUILD=1;
# Determinism: We fix the hashes of str, bytes and datetime objects.
PYTHONHASHSEED=0;
postPatch = ''
# Determinism
substituteInPlace "Lib/py_compile.py" --replace "source_stats['mtime']" "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])"
# # We do not patch `Lib/importlib/_bootstrap_external.py` because it does not exist.
'' + optionalString (x11Support && (tix != null)) ''
substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
'';
preConfigure = ''
for i in /usr /sw /opt /pkg; do # improve purity
substituteInPlace ./setup.py --replace $i /no-such-path
done
${optionalString stdenv.isDarwin ''export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2"''}
configureFlagsArray=( --enable-shared --with-threads
CPPFLAGS="${concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs)}"
LDFLAGS="${concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs)}"
LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"
)
'';
setupHook = python-setup-hook sitePackages;
postInstall = ''
# needed for some packages, especially packages that backport functionality
# to 2.x from 3.x
for item in $out/lib/python${majorVersion}/test/*; do
if [[ "$item" != */test_support.py* ]]; then
rm -rf "$item"
else
echo $item
fi
done
touch $out/lib/python${majorVersion}/test/__init__.py
ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
paxmark E $out/bin/python${majorVersion}
# Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
# Determinism: Windows installers were not deterministic.
# We're also not interested in building Windows installers.
find "$out" -name 'wininst*.exe' | xargs -r rm -f
# Use Python3 as default python
ln -s "$out/bin/idle3" "$out/bin/idle"
ln -s "$out/bin/pip3" "$out/bin/pip"
ln -s "$out/bin/pydoc3" "$out/bin/pydoc"
ln -s "$out/bin/python3" "$out/bin/python"
ln -s "$out/bin/python3-config" "$out/bin/python-config"
ln -s "$out/lib/pkgconfig/python3.pc" "$out/lib/pkgconfig/python.pc"
# Get rid of retained dependencies on -dev packages, and remove
# some $TMPDIR references to improve binary reproducibility.
# Note that the .pyc file of _sysconfigdata.py should be regenerated!
for i in $out/lib/python${majorVersion}/_sysconfigdata.py $out/lib/python${majorVersion}/config-${majorVersion}m/Makefile; do
sed -i $i -e "s|-I/nix/store/[^ ']*||g" -e "s|-L/nix/store/[^ ']*||g" -e "s|$TMPDIR|/no-such-path|g"
done
# Determinism: rebuild all bytecode
# We exclude lib2to3 because that's Python 2 code which fails
# We rebuild three times, once for each optimization level
find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i -
'';
passthru = let
pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
in rec {
inherit libPrefix sitePackages x11Support;
executable = "${libPrefix}m";
buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
pkgs = pythonPackages;
isPy3 = true;
isPy33 = true;
is_py3k = true; # deprecated
interpreter = "${self}/bin/${executable}";
};
enableParallelBuilding = true;
meta = {
homepage = http://python.org;
description = "A high-level dynamically-typed programming language";
longDescription = ''
Python is a remarkably powerful dynamic programming language that
is used in a wide variety of application domains. Some of its key
distinguishing features include: clear, readable syntax; strong
introspection capabilities; intuitive object orientation; natural
expression of procedural code; full modularity, supporting
hierarchical packages; exception-based error handling; and very
high level dynamic data types.
'';
license = stdenv.lib.licenses.psfl;
platforms = with stdenv.lib.platforms; linux ++ darwin;
maintainers = with stdenv.lib.maintainers; [ chaoflow cstrahan ];
};
}

View File

@ -27,7 +27,7 @@ with stdenv.lib;
let
majorVersion = "3.4";
minorVersion = "6";
minorVersion = "7";
minorVersionSuffix = "";
pythonVersion = majorVersion;
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
@ -48,7 +48,7 @@ in stdenv.mkDerivation {
src = fetchurl {
url = "http://www.python.org/ftp/python/${version}/Python-${version}.tar.xz";
sha256 = "0h2z248hkf8x1ix1z8npkqs9cq62i322sl4rcjdkp7mawsxjhd7i";
sha256 = "06wx2ag0dnixny67jfdl5z10243fjga898cgxhnr4dnxaqmwy547";
};
NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s";

View File

@ -27,7 +27,7 @@ with stdenv.lib;
let
majorVersion = "3.5";
minorVersion = "3";
minorVersion = "4";
minorVersionSuffix = "";
pythonVersion = majorVersion;
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
@ -48,7 +48,7 @@ in stdenv.mkDerivation {
src = fetchurl {
url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
sha256 = "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf";
sha256 = "0k68ai0a204piwibz013ds6ck7hgj9gk4nin2259y41vpgx3pncl";
};
NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s";
@ -64,15 +64,6 @@ in stdenv.mkDerivation {
substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' '
'';
patches = [
(fetchpatch {
name = "glibc-2.25-enosys.patch";
url = https://github.com/python/cpython/commit/035ba5da3e53e.patch;
sha256 = "1y74ir1w5cq542w27rgzgp70chhq2x047db9911mihpab8p2nj71";
})
./no-ldconfig.patch
];
postPatch = ''
# Determinism
substituteInPlace "Lib/py_compile.py" --replace "source_stats['mtime']" "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])"

View File

@ -1,18 +0,0 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python33-docs-html-3.3.0";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-html.tar.bz2;
sha256 = "0vv24b9qi7gznv687ik0pa2w1rq9grqivy44znvj2ysjfg7mc2c1";
};
installPhase = ''
mkdir -p $out/share/doc/python33
cp -R ./ $out/share/doc/python33/html
'';
meta = {
maintainers = [ lib.maintainers.chaoflow ];
};
}

View File

@ -1,18 +0,0 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python33-docs-pdf-a4-3.3.0";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-pdf-a4.tar.bz2;
sha256 = "1y6n13bxlw8a11khy3ynfbz8z0kpf2lvh32dvy8scyw3hrk6wdxp";
};
installPhase = ''
mkdir -p $out/share/doc/python33
cp -R ./ $out/share/doc/python33/pdf-a4
'';
meta = {
maintainers = [ lib.maintainers.chaoflow ];
};
}

View File

@ -1,18 +0,0 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python33-docs-pdf-letter-3.3.0";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-pdf-letter.tar.bz2;
sha256 = "0mcj1i47nx81fc9zk1cic4c4p139qjcqlzf4hnnkzvb3jcgy5z6k";
};
installPhase = ''
mkdir -p $out/share/doc/python33
cp -R ./ $out/share/doc/python33/pdf-letter
'';
meta = {
maintainers = [ lib.maintainers.chaoflow ];
};
}

View File

@ -1,18 +0,0 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python33-docs-text-3.3.0";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-text.tar.bz2;
sha256 = "10vk2fixg1aglqmsf89kn98rlirrbhnrk1285vzfbynf2iavxw0n";
};
installPhase = ''
mkdir -p $out/share/doc/python33
cp -R ./ $out/share/doc/python33/text
'';
meta = {
maintainers = [ lib.maintainers.chaoflow ];
};
}

View File

@ -4,36 +4,24 @@ let
pythonDocs = {
html = {
recurseForDerivations = true;
python33 = import ./3.3-html.nix {
inherit stdenv fetchurl lib;
};
python27 = import ./2.7-html.nix {
inherit stdenv fetchurl lib;
};
};
pdf_a4 = {
recurseForDerivations = true;
python33 = import ./3.3-pdf-a4.nix {
inherit stdenv fetchurl lib;
};
python27 = import ./2.7-pdf-a4.nix {
inherit stdenv fetchurl lib;
};
};
pdf_letter = {
recurseForDerivations = true;
python33 = import ./3.3-pdf-letter.nix {
inherit stdenv fetchurl lib;
};
python27 = import ./2.7-pdf-letter.nix {
inherit stdenv fetchurl lib;
};
};
text = {
recurseForDerivations = true;
python33 = import ./3.3-text.nix {
inherit stdenv fetchurl lib;
};
python27 = import ./2.7-text.nix {
inherit stdenv fetchurl lib;
};

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
prePatch =let
debian = fetchurl {
url = http://http.debian.net/debian/pool/main/t/tiff/tiff_4.0.8-2.debian.tar.xz;
url = http://snapshot.debian.org/archive/debian-debug/20170602T031313Z/pool/main/t/tiff/tiff_4.0.8-2.debian.tar.xz;
sha256 = "1ssjh6vn9rvl2jwm34i3p89g8lj0c7fj3cziva9rj4vasfps58ng";
};
in ''

View File

@ -0,0 +1,20 @@
{ stdenv, fetchurl }:
let
version = "0.1.5";
in
stdenv.mkDerivation {
name = "opencore-amr-${version}";
src = fetchurl {
url = "https://vorboss.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-${version}.tar.gz";
sha256 = "0hfk9khz3by0119h3jdwgdfd7jgkdbzxnmh1wssvylgnsnwnq01c";
};
meta = {
homepage = https://opencore-amr.sourceforge.io/;
description = "Library of OpenCORE Framework implementation of Adaptive Multi Rate Narrowband and Wideband (AMR-NB and AMR-WB) speech codec.
Library of VisualOn implementation of Adaptive Multi Rate Wideband (AMR-WB)";
license = stdenv.lib.licenses.asl20;
maintainers = [ stdenv.lib.maintainers.kiloreux ];
};
}

View File

@ -99,6 +99,7 @@ let
inherit developerBuild decryptSslTraffic;
};
qtcharts = callPackage ./qtcharts.nix {};
qtconnectivity = callPackage ./qtconnectivity.nix {};
qtdeclarative = callPackage ./qtdeclarative {};
qtdoc = callPackage ./qtdoc.nix {};
@ -128,10 +129,10 @@ let
env = callPackage ../qt-env.nix {};
full = env "qt-${qtbase.version}" ([
qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
qtimageformats qtlocation qtmultimedia qtquickcontrols qtscript
qtsensors qtserialport qtsvg qttools qttranslations
qtwebsockets qtx11extras qtxmlpatterns
qtsensors qtserialport qtsvg qttools qttranslations qtwebsockets
qtx11extras qtxmlpatterns
] ++ optional (!stdenv.isDarwin) qtwayland
++ optional (stdenv.isDarwin) qtmacextras);

View File

@ -0,0 +1,10 @@
{ qtSubmodule, qtbase }:
qtSubmodule {
name = "qtcharts";
qtInputs = [ qtbase ];
outputs = [ "out" "dev" "bin" ];
postInstall = ''
moveToOutput "$qtQmlPrefix" "$bin"
'';
}

File diff suppressed because it is too large Load Diff

View File

@ -34,6 +34,7 @@
, "json"
, "js-beautify"
, "jsontool"
, "json-refs"
, "json-server"
, "js-yaml"
, "karma"

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,23 @@
{ stdenv, fetchurl, pkgconfig, ncurses, ocaml, findlib, ocaml_pcre, camlzip
, gnutls, nettle }:
let param =
if stdenv.lib.versionAtLeast ocaml.version "4.03"
then {
version = "4.1.3";
sha256 = "1ifm3izml9hnr7cic1413spnd8x8ka795awsm2xpam3cs8z3j0ca";
} else {
version = "4.1.2";
sha256 = "1n0l9zlq7dc5yr43bpa4a0b6bxj3iyjkadbb41g59zlwa8hkk34i";
};
in
stdenv.mkDerivation {
name = "ocamlnet-4.1.2";
name = "ocaml${ocaml.version}-ocamlnet-${param.version}";
src = fetchurl {
url = http://download.camlcity.org/download/ocamlnet-4.1.2.tar.gz;
sha256 = "1n0l9zlq7dc5yr43bpa4a0b6bxj3iyjkadbb41g59zlwa8hkk34i";
url = "http://download.camlcity.org/download/ocamlnet-${param.version}.tar.gz";
inherit (param) sha256;
};
buildInputs = [ ncurses ocaml findlib ocaml_pcre camlzip gnutls pkgconfig nettle ];
@ -40,6 +51,5 @@ stdenv.mkDerivation {
maintainers = [
stdenv.lib.maintainers.z77z
];
broken = stdenv.lib.versionAtLeast ocaml.version "4.05";
};
}

View File

@ -5,13 +5,13 @@
buildPythonPackage rec {
pname = "Django";
name = "${pname}-${version}";
version = "1.11.3";
version = "1.11.4";
disabled = pythonOlder "2.7";
src = fetchurl {
url = "http://www.djangoproject.com/m/releases/1.11/${name}.tar.gz";
sha256 = "0swgmwnfi6sa5fg5yxcs4k554cj9zp92w5n454xfsibjjl5dxycy";
sha256 = "1ckvq2sdlgpy2sqy6fwl84ms9dggvdbys9x76qapm2d9vmknxs5b";
};
patches = [

View File

@ -1,9 +1,11 @@
{ stdenv, lib, buildPythonPackage, fetchPypi,
{ lib, buildPythonPackage, fetchPypi, pythonOlder,
# Build inputs
dateutil, six,
dateutil, six, ipaddress ? null,
# Test inputs
email_validator, nose, mock, ukpostcodeparser }:
assert pythonOlder "3.3" -> ipaddress != null;
buildPythonPackage rec {
pname = "Faker";
version = "0.7.18";
@ -24,7 +26,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
dateutil
six
];
] ++ lib.optional (pythonOlder "3.3") ipaddress;
meta = with lib; {
description = "A Python library for generating fake user data";

View File

@ -62,15 +62,15 @@ let
};
in releaseTools.nixBuild rec {
name = "hydra-${version}";
version = "2017-07-24";
version = "2017-07-27";
inherit stdenv;
src = fetchFromGitHub {
owner = "NixOS";
repo = "hydra";
rev = "a6d9201947aa1468d31ef5c2651251ceeefceb5c";
sha256 = "0hk5pxzn94ip3nyccxl91zc5n6wd1h2zcbhdq9p38wa4lrnnm5zv";
rev = "3fc320db320c9aa5180c54e77513f1bcb7407079";
sha256 = "0kml2rvy5pz8pzl23vfib5vrwxccff9j1jmyq926qv7f5kbzy61b";
};
buildInputs =

View File

@ -0,0 +1,22 @@
{ stdenv, fetchurl, gtk2, pkgconfig }:
stdenv.mkDerivation rec {
name = "rftg-${version}";
version = "0.9.4";
src = fetchurl {
url = "http://keldon.net/rftg/rftg-${version}.tar.bz2";
sha256 = "0j2y6ggpwdlvyqhirp010aix2g6aacj3kvggvpwzxhig30x9vgq8";
};
buildInputs = [ gtk2.dev pkgconfig ];
meta = {
homepage = http://keldon.net/rftg/;
description = "Implementation of the card game Race for the Galaxy, including an AI";
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.falsifian ];
};
}

View File

@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
name = "forkstat-${version}";
version = "0.01.17";
version = "0.02.00";
src = fetchurl {
url = "http://kernel.ubuntu.com/~cking/tarballs/forkstat/forkstat-${version}.tar.gz";
sha256 = "0plm2409mmp6n2fjj6bb3z7af2cnh5lg3czlylhgaki9zd0cyb7w";
sha256 = "07df2lb32lbr2ggi84h9pjy6ig18n2961ksji4x1hhb4cvc175dg";
};
installFlags = [ "DESTDIR=$(out)" ];
postInstall = ''

View File

@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
name = "powerstat-${version}";
version = "0.02.11";
version = "0.02.12";
src = fetchurl {
url = "http://kernel.ubuntu.com/~cking/tarballs/powerstat/powerstat-${version}.tar.gz";
sha256 = "0iid3b3284sf89pfp68i1k5mwmr31bqjzasb8clm2sa45ivafx52";
sha256 = "16ls3rs1wfckl0b2szqqgiv072afy4qjd3r4kz4vf2qj77kjm06w";
};
installFlags = [ "DESTDIR=$(out)" ];
postInstall = ''

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "zookeeper-${version}";
version = "3.4.9";
version = "3.4.10";
src = fetchurl {
url = "mirror://apache/zookeeper/${name}/${name}.tar.gz";
sha256 = "0dgmja1lm7qn92x2xfmz5qj2k6sj2f6yzyj3a55r7iv1590l1wz7";
sha256 = "09rz4ac31932yxyyc8gqrnq1zxb9ahibrq51wbz13b24w0a58zvz";
};
buildInputs = [ makeWrapper jre ];

View File

@ -6334,7 +6334,6 @@ with pkgs;
python2Full = python2.override{x11Support=true;};
python27Full = python27.override{x11Support=true;};
python3Full = python3.override{x11Support=true;};
python33Full = python33.override{x11Support=true;};
python34Full = python34.override{x11Support=true;};
python35Full = python35.override{x11Support=true;};
python36Full = python36.override{x11Support=true;};
@ -6348,10 +6347,6 @@ with pkgs;
self = python27;
inherit (darwin) CF configd;
};
python33 = callPackage ../development/interpreters/python/cpython/3.3 {
self = python33;
inherit (darwin) CF configd;
};
python34 = callPackage ../development/interpreters/python/cpython/3.4 {
inherit (darwin) CF configd;
self = python34;
@ -9641,6 +9636,8 @@ with pkgs;
opencollada = callPackage ../development/libraries/opencollada { };
opencore-amr = callPackage ../development/libraries/opencore-amr { };
opencsg = callPackage ../development/libraries/opencsg { };
openct = callPackage ../development/libraries/openct { };
@ -10917,8 +10914,6 @@ with pkgs;
python27Packages = lib.hiPrioSet (recurseIntoAttrs python27.pkgs);
python33Packages = python33.pkgs;
python34Packages = python34.pkgs;
python35Packages = python35.pkgs;
@ -17453,6 +17448,8 @@ with pkgs;
openglSupport = mesaSupported;
};
rftg = callPackage ../games/rftg { };
rigsofrods = callPackage ../games/rigsofrods {
angelscript = angelscript_2_22;
mygui = mygui.override {

View File

@ -35,7 +35,24 @@ let
mkPythonDerivation = makeOverridable( callPackage ../development/interpreters/python/mk-python-derivation.nix {
});
buildPythonPackage = makeOverridable (callPackage ../development/interpreters/python/build-python-package.nix {
# Derivations built with `buildPythonPackage` can already be overriden with `override`, `overrideAttrs`, and `overrideDerivation`.
# This function introduces `overridePythonPackage` and it overrides the call to `buildPythonPackage`.
makeOverridablePythonPackage = f: origArgs:
let
ff = f origArgs;
overrideWith = newArgs: origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs);
in
if builtins.isAttrs ff then (ff // {
overridePythonPackage = newArgs: makeOverridable f (overrideWith newArgs);
})
else if builtins.isFunction ff then {
overridePythonPackage = newArgs: makeOverridable f (overrideWith newArgs);
__functor = self: ff;
}
else ff;
buildPythonPackage = makeOverridablePythonPackage (callPackage ../development/interpreters/python/build-python-package.nix {
inherit mkPythonDerivation;
inherit bootstrapped-pip;
flit = self.flit;