From 1c380842d10c7e0a5f385be3d095cddee8ab9da9 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Mon, 16 Nov 2015 20:53:39 +0100 Subject: [PATCH 01/76] pixie: init at 0-1333 This is the pixie language, a clojure-like lisp, utilizing the pypy vm toolkit for JIT, GC and C bindings. --- .../interpreters/pixie/default.nix | 79 +++++++++++++++++++ .../interpreters/pixie/load_paths.patch | 25 ++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 106 insertions(+) create mode 100644 pkgs/development/interpreters/pixie/default.nix create mode 100644 pkgs/development/interpreters/pixie/load_paths.patch diff --git a/pkgs/development/interpreters/pixie/default.nix b/pkgs/development/interpreters/pixie/default.nix new file mode 100644 index 00000000000..85af751809c --- /dev/null +++ b/pkgs/development/interpreters/pixie/default.nix @@ -0,0 +1,79 @@ +{ stdenv, fetchgit, fetchurl, python, makeWrapper, pkgconfig, gcc, + pypy, libffi, libedit, libuv, boost, zlib, + variant ? "jit", buildWithPypy ? false }: + +let + commit-count = "1333"; + common-flags = "--thread --gcrootfinder=shadowstack --continuation"; + variants = { + jit = { flags = "--opt=jit"; target = "target.py"; }; + jit-preload = { flags = "--opt=jit"; target = "target_preload.py"; }; + no-jit = { flags = ""; target = "target.py"; }; + no-jit-preload = { flags = ""; target = "target_preload.py"; }; + }; + pixie-src = fetchgit { + url = "https://github.com/pixie-lang/pixie.git"; + rev = "36ce07e1cd85ca82eedadf366bef3bb57a627a2a"; + sha256 = "1b3v99c0is33w029r15qvd0mkrc5n1mrvjjmfpcd9yvhvqb2vcjs"; + }; + pypy-tag = "81254"; + pypy-src = fetchurl { + name = "pypy-src-${pypy-tag}"; + url = "https://bitbucket.org/pypy/pypy/get/${pypy-tag}.tar.bz2"; + sha256 = "1cs9xqs1rmzdcnwxxkbvy064s5cbp6vvzhn2jmyzh5kg4di1r3bn"; + }; + libs = [ libffi libedit libuv boost.dev boost.lib zlib ]; + include-path = stdenv.lib.concatStringsSep ":" + (map (p: "${p}/include") libs); + library-path = stdenv.lib.concatStringsSep ":" + (map (p: "${p}/lib") libs); + bin-path = stdenv.lib.concatStringsSep ":" + (map (p: "${p}/bin") [ gcc ]); + build = {flags, target}: stdenv.mkDerivation rec { + name = "pixie-${version}"; + version = "0-r${commit-count}-${variant}"; + nativeBuildInputs = libs; + buildInputs = [ pkgconfig makeWrapper ]; + PYTHON = if buildWithPypy + then "${pypy}/pypy-c/.pypy-c-wrapped" + else "${python}/bin/python"; + unpackPhase = '' + cp -R ${pixie-src} pixie-src + mkdir pypy-src + (cd pypy-src + tar --strip-components=1 -xjf ${pypy-src}) + chmod -R +w pypy-src pixie-src + ''; + patchPhase = '' + (cd pixie-src + patch -p1 < ${./load_paths.patch} + libraryPaths='["${libuv}" "${libedit}" "${libffi}" "${boost.dev}" "${boost.lib}" "${zlib}"]' + export libraryPaths + substituteAllInPlace ./pixie/ffi-infer.pxi) + ''; + buildPhase = ''( + PYTHONPATH="`pwd`/pypy-src:$PYTHONPATH"; + RPYTHON="`pwd`/pypy-src/rpython/bin/rpython"; + cd pixie-src + $PYTHON $RPYTHON ${common-flags} ${target} + export LD_LIBRARY_PATH="${library-path}:$LD_LIBRARY_PATH" + find pixie -name "*.pxi" -exec ./pixie-vm -c {} \; + )''; + installPhase = '' + mkdir -p $out/share $out/bin + cp pixie-src/pixie-vm $out/share/pixie-vm + cp -R pixie-src/pixie $out/share/pixie + makeWrapper $out/share/pixie-vm $out/bin/pxi \ + --prefix LD_LIBRARY_PATH : ${library-path} \ + --prefix C_INCLUDE_PATH : ${include-path} \ + --prefix LIBRARY_PATH : ${library-path} \ + --prefix PATH : ${bin-path} + ''; + meta = { + description = "Pixie is a clojure-like lisp, built with the pypy vm toolkit."; + homepage = "https://github.com/pixie-lang/pixie"; + license = stdenv.lib.licenses.lgpl3; + platforms = stdenv.lib.platforms.linux; + }; + }; +in build (builtins.getAttr variant variants) diff --git a/pkgs/development/interpreters/pixie/load_paths.patch b/pkgs/development/interpreters/pixie/load_paths.patch new file mode 100644 index 00000000000..a36d280c586 --- /dev/null +++ b/pkgs/development/interpreters/pixie/load_paths.patch @@ -0,0 +1,25 @@ +diff --git a/pixie/ffi-infer.pxi b/pixie/ffi-infer.pxi +index 9f13ac7..74301c2 100644 +--- a/pixie/ffi-infer.pxi ++++ b/pixie/ffi-infer.pxi +@@ -1,15 +1,12 @@ + (ns pixie.ffi-infer + (:require [pixie.io-blocking :as io])) + ++(defn -add-library-path [p] ++ (swap! load-paths conj (str p "/include")) ++ (swap! load-paths conj (str p "/lib"))) + +-(defn -add-rel-path [rel] +- (swap! load-paths conj (str (first @load-paths) "/" rel))) +- +-(-add-rel-path "lib") +-(-add-rel-path "include") +-(-add-rel-path "../lib") +-(-add-rel-path "../include") +- ++(doseq [lp @libraryPaths@] ++ (-add-library-path lp)) + + (def *config* nil) + (set-dynamic! (var *config*)) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0f756a175ac..74bba53647c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5507,6 +5507,8 @@ let wrapPython = pythonPackages.wrapPython; }; + pixie = callPackage ../development/interpreters/pixie { }; + bundix = callPackage ../development/interpreters/ruby/bundix { ruby = ruby_2_1_3; }; From 37d1dcd12d1367a9b0be23947ffe8a0539c2f2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Galliat?= Date: Sun, 28 Feb 2016 00:12:55 -0500 Subject: [PATCH 02/76] buildGoPackage: do not remove Go references if allowGoReferences is true allowGoReference was only checked for disallowedReferences definition, but the fixup of all output binaries removing references to the compiler did not take this setting into account. --- pkgs/development/go-modules/generic/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 260e8d66c58..15b729173c6 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -30,7 +30,7 @@ if disabled then throw "${name} not supported for go ${go.meta.branch}" else let args = lib.filterAttrs (name: _: name != "extraSrcs") args'; - removeReferences = [ go ]; + removeReferences = [ ] ++ lib.optional (!allowGoReference) go; removeExpr = refs: lib.flip lib.concatMapStrings refs (ref: '' | sed "s,${ref},$(echo "${ref}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" \ From de5fa8339f323b0714d0dc25896f8863fbf3429f Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Sun, 28 Feb 2016 16:50:59 +0100 Subject: [PATCH 03/76] dust: init at 0-91 --- pkgs/development/interpreters/pixie/dust.nix | 27 ++++ .../pixie/make-paths-configurable.patch | 122 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 3 files changed, 150 insertions(+) create mode 100644 pkgs/development/interpreters/pixie/dust.nix create mode 100644 pkgs/development/interpreters/pixie/make-paths-configurable.patch diff --git a/pkgs/development/interpreters/pixie/dust.nix b/pkgs/development/interpreters/pixie/dust.nix new file mode 100644 index 00000000000..2478ecf53cb --- /dev/null +++ b/pkgs/development/interpreters/pixie/dust.nix @@ -0,0 +1,27 @@ +{ stdenv, pixie, fetchgit }: + +stdenv.mkDerivation { + name = "dust-0-91"; + src = fetchgit { + url = "https://github.com/pixie-lang/dust.git"; + rev = "efe469661e749a71e86858fd006f61464810575a"; + sha256 = "0krh7ynald3gqv9f17a4kfx7sx8i31l6j1fhd5k8b6m8cid7f9c1"; + }; + buildInputs = [ pixie ]; + patches = [ ./make-paths-configurable.patch ]; + configurePhase = '' + pixiePath="${pixie}/bin/pxi" \ + basePath="$out/share/dust" \ + substituteAll dust.in dust + chmod +x dust + ''; +# FIXME: AOT for dust +# buildPhase = '' +# find . -name "*.pxi" -exec pixie-vm -c {} \; +# ''; + installPhase = '' + mkdir -p $out/bin $out/share/dust + cp -a src/ run.pxi $out/share/dust + mv dust $out/bin/dust + ''; +} diff --git a/pkgs/development/interpreters/pixie/make-paths-configurable.patch b/pkgs/development/interpreters/pixie/make-paths-configurable.patch new file mode 100644 index 00000000000..122ab6e2c07 --- /dev/null +++ b/pkgs/development/interpreters/pixie/make-paths-configurable.patch @@ -0,0 +1,122 @@ +From 0cbb82e606610d36e52c70d888995fbbf9b0d7c8 Mon Sep 17 00:00:00 2001 +From: Herwig Hochleitner +Date: Sun, 28 Feb 2016 16:34:14 +0100 +Subject: [PATCH] make paths configurable + +--- + dust | 52 ---------------------------------------------------- + dust.in | 43 +++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 43 insertions(+), 52 deletions(-) + delete mode 100755 dust + create mode 100755 dust.in + +diff --git a/dust b/dust +deleted file mode 100755 +index ffced9b..0000000 +--- a/dust ++++ /dev/null +@@ -1,52 +0,0 @@ +-#!/usr/bin/env bash +- +-base_path=$0 +-if [ -L "$base_path" ]; then +- base_path=`readlink $base_path` +-fi +-base_path=`dirname $base_path` +- +-pixie_path=`which pixie-vm` +-if [ -z "$pixie_path" ]; then +- echo "Error: 'pixie-vm' must be on your PATH" +- exit 1 +-fi +- +-function set_load_path() { +- load_path="" +- if ([ -f "project.edn" ] || [ -f "project.pxi" ]) && [ -f ".load-path" ]; then +- load_path="`cat .load-path`" +- fi +-} +- +-if [ ! -f "project.edn" ] && [ -f "project.pxi" ]; then +- echo "Warning: 'project.pxi' is deprecated, please use 'project.edn'." +- echo "To start you can run the following command:" +- echo " pixie-vm -l $base_path/src -e '(require dust.project :as p) (p/load-project!) (prn (dissoc @p/*project* :path))'" +- echo +-fi +- +-set_load_path +-run_dust="$pixie_path -l $base_path/src $load_path $base_path/run.pxi" +- +-case $1 in +- ""|"repl") +- rlwrap_cmd="" +- if [ -n "`which rlwrap`" ]; then +- rlwrap_cmd="rlwrap -aignored -n" +- fi +- $rlwrap_cmd $pixie_path $load_path +- ;; +- "run") +- shift +- file=$1 +- shift +- $pixie_path $load_path $file $@ +- ;; +- -h|--help) +- $run_dust help +- ;; +- *) +- $run_dust $@ +- ;; +-esac +diff --git a/dust.in b/dust.in +new file mode 100755 +index 0000000..44a7fbd +--- /dev/null ++++ b/dust.in +@@ -0,0 +1,43 @@ ++#!/usr/bin/env bash ++ ++base_path=@basePath@ ++pixie_path=@pixiePath@ ++ ++function set_load_path() { ++ load_path="" ++ if ([ -f "project.edn" ] || [ -f "project.pxi" ]) && [ -f ".load-path" ]; then ++ load_path="`cat .load-path`" ++ fi ++} ++ ++if [ ! -f "project.edn" ] && [ -f "project.pxi" ]; then ++ echo "Warning: 'project.pxi' is deprecated, please use 'project.edn'." ++ echo "To start you can run the following command:" ++ echo " pixie-vm -l $base_path/src -e '(require dust.project :as p) (p/load-project!) (prn (dissoc @p/*project* :path))'" ++ echo ++fi ++ ++set_load_path ++run_dust="$pixie_path -l $base_path/src $load_path $base_path/run.pxi" ++ ++case $1 in ++ ""|"repl") ++ rlwrap_cmd="" ++ if [ -n "`which rlwrap`" ]; then ++ rlwrap_cmd="rlwrap -aignored -n" ++ fi ++ $rlwrap_cmd $pixie_path $load_path ++ ;; ++ "run") ++ shift ++ file=$1 ++ shift ++ $pixie_path $load_path $file $@ ++ ;; ++ -h|--help) ++ $run_dust help ++ ;; ++ *) ++ $run_dust $@ ++ ;; ++esac +-- +2.7.1 + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 74bba53647c..403a356a580 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5508,6 +5508,7 @@ let }; pixie = callPackage ../development/interpreters/pixie { }; + dust = callPackage ../development/interpreters/pixie/dust.nix { }; bundix = callPackage ../development/interpreters/ruby/bundix { ruby = ruby_2_1_3; From 854b13dc001223b31d426255c2e6a5c4b0452087 Mon Sep 17 00:00:00 2001 From: Adam Bell Date: Thu, 3 Mar 2016 16:11:32 -0500 Subject: [PATCH 04/76] pgadmin 1.20.0 -> 1.22.1 --- pkgs/applications/misc/pgadmin/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/pgadmin/default.nix b/pkgs/applications/misc/pgadmin/default.nix index bace31b1b1a..55db70c1d24 100644 --- a/pkgs/applications/misc/pgadmin/default.nix +++ b/pkgs/applications/misc/pgadmin/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "pgadmin3-${version}"; - version = "1.20.0"; + version = "1.22.1"; src = fetchurl { url = "http://ftp.postgresql.org/pub/pgadmin3/release/v${version}/src/pgadmin3-${version}.tar.gz"; - sha256 = "133bcbx9a322adldd1498h8bn2wfk45v1sbj9269jylwda1dfwq7"; + sha256 = "0gkqpj8cg6jd6yhssrij1cbh960rg9fkjbdzcpryi6axwv0ag7ki"; }; buildInputs = [ postgresql wxGTK libxml2 libxslt openssl ]; From 7c4c151a9422d6bb6790b1c8c76e37caa5b1d5d0 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Fri, 4 Mar 2016 00:45:20 +0000 Subject: [PATCH 05/76] ruby: only keep the latest tiny per major.minor Tiny versions are just for bug-fixes and should be upgraded. I think that the list has grown a bit too much organically and should be trimmed. --- .../development/interpreters/ruby/default.nix | 77 ---------------- .../interpreters/ruby/patchsets.nix | 87 ------------------- pkgs/top-level/all-packages.nix | 14 +-- 3 files changed, 7 insertions(+), 171 deletions(-) diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 4ffef385a0d..2a22cc74e75 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -157,61 +157,6 @@ in { }; }; - ruby_2_1_0 = generic { - majorVersion = "2"; - minorVersion = "1"; - teenyVersion = "0"; - patchLevel = "0"; - sha256 = { - src = "17fhfbw8sr13rxfn58wvrhk2f5i88lkna2afn3gdjvprd8gyqf1m"; - git = "12sn532yvznqfz85378ys0b9ggmj7w8ddhzc1pnnlx7mbyy7r2hx"; - }; - }; - - ruby_2_1_1 = generic { - majorVersion = "2"; - minorVersion = "1"; - teenyVersion = "1"; - patchLevel = "0"; - sha256 = { - src = "0hc9x3mazyvnk94gs19q8mbnanlzk8mv0hii77slkvc8mqqxyhy8"; - git = "1v2ffvyd0xx1h1qd70431zczhvsdiyyw5kjxih4rszd5avzh5grl"; - }; - }; - - ruby_2_1_2 = generic { - majorVersion = "2"; - minorVersion = "1"; - teenyVersion = "2"; - patchLevel = "353"; - sha256 = { - src = "0db6krc2bd7yha8p96lcqrahjpsz7g7abhni134g708sh53n8apj"; - git = "14f8w3zwngnxsgigffh6h9z3ng53xq8mk126xmwrsmz9n3ypm6l0"; - }; - }; - - ruby_2_1_3 = generic { - majorVersion = "2"; - minorVersion = "1"; - teenyVersion = "3"; - patchLevel = "0"; - sha256 = { - src = "00bz6jcbxgnllplk4b9lnyc3w8yd3pz5rn11rmca1s8cn6vvw608"; - git = "1pnam9jry2l2mbji3gvrbb7jyisxl99xjz6l1qrccwnfinxxbmhv"; - }; - }; - - ruby_2_1_6 = generic { - majorVersion = "2"; - minorVersion = "1"; - teenyVersion = "6"; - patchLevel = "0"; - sha256 = { - src = "1r4bs8lfwsypbcf8j2lpv3by40729vp5mh697njizj97fjp644qy"; - git = "18kbjsbmgv6l3p1qxgmjnhh4jl7xdk3c20ycjpp62vrhq7pyzjsm"; - }; - }; - ruby_2_1_7 = generic { majorVersion = "2"; minorVersion = "1"; @@ -223,28 +168,6 @@ in { }; }; - ruby_2_2_0 = generic { - majorVersion = "2"; - minorVersion = "2"; - teenyVersion = "0"; - patchLevel = "0"; - sha256 = { - src = "1z2092fbpc2qkv1j3yj7jdz7qwvqpxqpmcnkphpjcpgvmfaf6wbn"; - git = "1w7rr2nq1bbw6aiagddzlrr3rl95kk33x4pv6570nm072g55ybpi"; - }; - }; - - ruby_2_2_2 = generic { - majorVersion = "2"; - minorVersion = "2"; - teenyVersion = "2"; - patchLevel = "0"; - sha256 = { - src = "0i4v7l8pnam0by2cza12zldlhrffqchwb2m9shlnp7j2gqqhzz2z"; - git = "08mw1ql2ghy483cp8xzzm78q17simn4l6phgm2gah7kjh9y3vbrn"; - }; - }; - ruby_2_2_3 = generic { majorVersion = "2"; minorVersion = "2"; diff --git a/pkgs/development/interpreters/ruby/patchsets.nix b/pkgs/development/interpreters/ruby/patchsets.nix index 18e2ab9231a..ded72b8695e 100644 --- a/pkgs/development/interpreters/ruby/patchsets.nix +++ b/pkgs/development/interpreters/ruby/patchsets.nix @@ -34,76 +34,6 @@ rec { "${patchSet}/patches/ruby/2.0.0/p${patchLevel}/railsexpress/03-display-more-detailed-stack-trace.patch" "${patchSet}/patches/ruby/2.0.0/p${patchLevel}/railsexpress/04-show-full-backtrace-on-stack-overflow.patch" ]; - "2.1.0" = [ - ./ssl_v3.patch - ] ++ ops useRailsExpress [ - "${patchSet}/patches/ruby/2.1.0/railsexpress/01-current-2.1.1-fixes.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/02-zero-broken-tests.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/03-improve-gc-stats.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/04-display-more-detailed-stack-trace.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/05-show-full-backtrace-on-stack-overflow.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/06-fix-missing-c-return-event.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/07-backport-006e66b6680f60adfb434ee7397f0dbc77de7873.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/08-funny-falcon-stc-density.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/09-funny-falcon-stc-pool-allocation.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/10-aman-opt-aset-aref-str.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/11-funny-falcon-method-cache.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/12-backport-r44370.patch" - ]; - "2.1.1" = [ - ./ssl_v3.patch - ] ++ ops useRailsExpress [ - "${patchSet}/patches/ruby/2.1.0/railsexpress/01-zero-broken-tests.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/02-improve-gc-stats.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/03-display-more-detailed-stack-trace.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/04-show-full-backtrace-on-stack-overflow.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/05-fix-missing-c-return-event.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/07-backport-006e66b6680f60adfb434ee7397f0dbc77de7873.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/08-funny-falcon-stc-density.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/09-funny-falcon-stc-pool-allocation.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/10-aman-opt-aset-aref-str.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/11-funny-falcon-method-cache.patch" - "${patchSet}/patches/ruby/2.1.0/railsexpress/12-backport-r44370.patch" - ]; - "2.1.2" = [ - ./ssl_v3.patch - ] ++ ops useRailsExpress [ - "${patchSet}/patches/ruby/2.1.2/railsexpress/01-zero-broken-tests.patch" - "${patchSet}/patches/ruby/2.1.2/railsexpress/02-improve-gc-stats.patch" - "${patchSet}/patches/ruby/2.1.2/railsexpress/03-display-more-detailed-stack-trace.patch" - "${patchSet}/patches/ruby/2.1.2/railsexpress/04-show-full-backtrace-on-stack-overflow.patch" - "${patchSet}/patches/ruby/2.1.2/railsexpress/05-fix-missing-c-return-event.patch" - "${patchSet}/patches/ruby/2.1.2/railsexpress/06-backport-006e66b6680f60adfb434ee7397f0dbc77de7873.patch" - "${patchSet}/patches/ruby/2.1.2/railsexpress/07-funny-falcon-stc-density.patch" - "${patchSet}/patches/ruby/2.1.2/railsexpress/08-funny-falcon-stc-pool-allocation.patch" - "${patchSet}/patches/ruby/2.1.2/railsexpress/09-aman-opt-aset-aref-str.patch" - "${patchSet}/patches/ruby/2.1.2/railsexpress/10-funny-falcon-method-cache.patch" - ]; - "2.1.3" = [ - ./ssl_v3.patch - ] ++ ops useRailsExpress [ - "${patchSet}/patches/ruby/2.1.3/railsexpress/01-zero-broken-tests.patch" - "${patchSet}/patches/ruby/2.1.3/railsexpress/02-improve-gc-stats.patch" - "${patchSet}/patches/ruby/2.1.3/railsexpress/03-display-more-detailed-stack-trace.patch" - "${patchSet}/patches/ruby/2.1.3/railsexpress/04-show-full-backtrace-on-stack-overflow.patch" - "${patchSet}/patches/ruby/2.1.3/railsexpress/05-funny-falcon-stc-density.patch" - "${patchSet}/patches/ruby/2.1.3/railsexpress/06-funny-falcon-stc-pool-allocation.patch" - "${patchSet}/patches/ruby/2.1.3/railsexpress/07-aman-opt-aset-aref-str.patch" - "${patchSet}/patches/ruby/2.1.3/railsexpress/08-funny-falcon-method-cache.patch" - ]; - "2.1.6" = [ - ./ssl_v3.patch - ] ++ ops useRailsExpress [ - "${patchSet}/patches/ruby/2.1.6/railsexpress/01-zero-broken-tests.patch" - "${patchSet}/patches/ruby/2.1.6/railsexpress/02-improve-gc-stats.patch" - "${patchSet}/patches/ruby/2.1.6/railsexpress/03-display-more-detailed-stack-trace.patch" - "${patchSet}/patches/ruby/2.1.6/railsexpress/04-show-full-backtrace-on-stack-overflow.patch" - "${patchSet}/patches/ruby/2.1.6/railsexpress/05-funny-falcon-stc-density.patch" - "${patchSet}/patches/ruby/2.1.6/railsexpress/06-funny-falcon-stc-pool-allocation.patch" - "${patchSet}/patches/ruby/2.1.6/railsexpress/07-aman-opt-aset-aref-str.patch" - "${patchSet}/patches/ruby/2.1.6/railsexpress/08-funny-falcon-method-cache.patch" - "${patchSet}/patches/ruby/2.1.6/railsexpress/09-heap-dump-support.patch" - ]; "2.1.7" = [ ./ssl_v3.patch ] ++ ops useRailsExpress [ @@ -117,23 +47,6 @@ rec { "${patchSet}/patches/ruby/2.1.7/railsexpress/08-funny-falcon-method-cache.patch" "${patchSet}/patches/ruby/2.1.7/railsexpress/09-heap-dump-support.patch" ]; - "2.2.0" = [ - ./ssl_v3.patch - ] ++ ops useRailsExpress [ - "${patchSet}/patches/ruby/2.2.0/railsexpress/01-zero-broken-tests.patch" - "${patchSet}/patches/ruby/2.2.0/railsexpress/02-improve-gc-stats.patch" - "${patchSet}/patches/ruby/2.2.0/railsexpress/03-display-more-detailed-stack-trace.patch" - "${patchSet}/patches/ruby/2.2.0/railsexpress/04-backport-401c8bb.patch" - "${patchSet}/patches/ruby/2.2.0/railsexpress/05-fix-packed-bitfield-compat-warning-for-older-gccs.patch" - ]; - "2.2.2" = [ - ./ssl_v3.patch - ] ++ ops useRailsExpress [ - "${patchSet}/patches/ruby/2.2.2/railsexpress/01-zero-broken-tests.patch" - "${patchSet}/patches/ruby/2.2.2/railsexpress/02-improve-gc-stats.patch" - "${patchSet}/patches/ruby/2.2.2/railsexpress/03-display-more-detailed-stack-trace.patch" - "${patchSet}/patches/ruby/2.2.2/railsexpress/04-backported-bugfixes-222.patch" - ]; "2.2.3" = [ ./ssl_v3.patch ] ++ ops useRailsExpress [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c971f3157b9..06e09f7c8f3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -277,7 +277,7 @@ let chrootFHSEnv = callPackage ../build-support/build-fhs-chrootenv { }; userFHSEnv = callPackage ../build-support/build-fhs-userenv { - ruby = ruby_2_1_3; + ruby = ruby_2_1; }; buildFHSChrootEnv = args: chrootFHSEnv { @@ -5540,7 +5540,7 @@ let }; bundix = callPackage ../development/interpreters/ruby/bundix { - ruby = ruby_2_1_3; + ruby = ruby_2_1; }; bundler = callPackage ../development/interpreters/ruby/bundler.nix { }; bundler_HEAD = bundler; @@ -5551,8 +5551,8 @@ let inherit (callPackage ../development/interpreters/ruby {}) ruby_1_9_3 ruby_2_0_0 - ruby_2_1_0 ruby_2_1_1 ruby_2_1_2 ruby_2_1_3 ruby_2_1_6 ruby_2_1_7 - ruby_2_2_0 ruby_2_2_2 ruby_2_2_3 + ruby_2_1_7 + ruby_2_2_3 ruby_2_3_0; # Ruby aliases @@ -5812,7 +5812,7 @@ let cgdb = callPackage ../development/tools/misc/cgdb { }; chefdk = callPackage ../development/tools/chefdk { - ruby = ruby_2_0_0; + ruby = ruby_2_0; }; matter-compiler = callPackage ../development/compilers/matter-compiler {}; @@ -6296,7 +6296,7 @@ let uncrustify = callPackage ../development/tools/misc/uncrustify { }; vagrant = callPackage ../development/tools/vagrant { - ruby = ruby_2_2_2; + ruby = ruby_2_2; }; gdb = callPackage ../development/tools/misc/gdb { @@ -13035,7 +13035,7 @@ let smtube = qt5.callPackage ../applications/video/smtube {}; sup = callPackage ../applications/networking/mailreaders/sup { - ruby = ruby_1_9_3.override { cursesSupport = true; }; + ruby = ruby_1_9.override { cursesSupport = true; }; }; synapse = callPackage ../applications/misc/synapse { From a1363ef02d1ca75f3ca84e6d590cd1b7b7b084b7 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 4 Mar 2016 14:09:24 -0600 Subject: [PATCH 06/76] fluidsynth: fix build errors in darwin builds Build inputs were not being passed in properly. --- pkgs/applications/audio/fluidsynth/default.nix | 7 ++++--- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/fluidsynth/default.nix b/pkgs/applications/audio/fluidsynth/default.nix index bd35b78fbc0..bb37cac5500 100644 --- a/pkgs/applications/audio/fluidsynth/default.nix +++ b/pkgs/applications/audio/fluidsynth/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, alsaLib, glib, libjack2, libsndfile, pkgconfig -, libpulseaudio }: +, libpulseaudio, CoreServices, CoreAudio, AudioUnit }: stdenv.mkDerivation rec { name = "fluidsynth-${version}"; @@ -18,10 +18,11 @@ stdenv.mkDerivation rec { ''; NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin - "-framework CoreAudio"; + "-framework CoreAudio -framework CoreServices"; buildInputs = [ glib libsndfile pkgconfig ] - ++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib libpulseaudio libjack2 ]; + ++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib libpulseaudio libjack2 ] + ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices CoreAudio AudioUnit ]; meta = with stdenv.lib; { description = "Real-time software synthesizer based on the SoundFont 2 specifications"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 831390ad774..639410c2734 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12100,7 +12100,9 @@ let fldigi = callPackage ../applications/audio/fldigi { }; - fluidsynth = callPackage ../applications/audio/fluidsynth { }; + fluidsynth = callPackage ../applications/audio/fluidsynth { + inherit (darwin.apple_sdk.frameworks) CoreServices CoreAudio AudioUnit; + }; fmit = qt5.callPackage ../applications/audio/fmit { }; From b1096d08114c5539dbe98d2788bb1f0559401f5f Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Sun, 6 Mar 2016 00:03:26 +1100 Subject: [PATCH 07/76] elpa-packages 2016-03-06 --- .../editors/emacs-modes/elpa-generated.nix | 118 ++++++++++++------ 1 file changed, 79 insertions(+), 39 deletions(-) diff --git a/pkgs/applications/editors/emacs-modes/elpa-generated.nix b/pkgs/applications/editors/emacs-modes/elpa-generated.nix index fbb7955a1d6..f10b1fbe61f 100644 --- a/pkgs/applications/editors/emacs-modes/elpa-generated.nix +++ b/pkgs/applications/editors/emacs-modes/elpa-generated.nix @@ -132,6 +132,19 @@ license = lib.licenses.free; }; }) {}; + arbitools = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild { + pname = "arbitools"; + version = "0.51"; + src = fetchurl { + url = "http://elpa.gnu.org/packages/arbitools-0.51.el"; + sha256 = "1pwps73s885i1777wlmqhkmfgj564bkb6rkpc964v0vcqia6fpag"; + }; + packageRequires = []; + meta = { + homepage = "http://elpa.gnu.org/packages/arbitools.html"; + license = lib.licenses.free; + }; + }) {}; ascii-art-to-unicode = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild { pname = "ascii-art-to-unicode"; @@ -322,10 +335,10 @@ company-math = callPackage ({ company, elpaBuild, fetchurl, lib, math-symbol-lists }: elpaBuild { pname = "company-math"; - version = "1.0.1"; + version = "1.1"; src = fetchurl { - url = "http://elpa.gnu.org/packages/company-math-1.0.1.el"; - sha256 = "1lkj9cqhmdf3h5zvr94hszkz1251i2rq2mycnhscsnzrk5ll3gck"; + url = "http://elpa.gnu.org/packages/company-math-1.1.tar"; + sha256 = "10yi5jmv7njcaansgy2aw7wm1j3acch1j9x6lfg9mxk0j21zvgwp"; }; packageRequires = [ company math-symbol-lists ]; meta = { @@ -350,10 +363,10 @@ context-coloring = callPackage ({ elpaBuild, emacs, fetchurl, js2-mode, lib }: elpaBuild { pname = "context-coloring"; - version = "7.2.0"; + version = "7.2.1"; src = fetchurl { - url = "http://elpa.gnu.org/packages/context-coloring-7.2.0.el"; - sha256 = "0l7mzmnhqh6sri1fhhv51khi0fnpfp51drzy725s6zfmpbrcn7vn"; + url = "http://elpa.gnu.org/packages/context-coloring-7.2.1.el"; + sha256 = "1lh2p3fsym73h0dcj1gqg1xsw3lcikmcskbx8y3j0ds30l4xs13d"; }; packageRequires = [ emacs js2-mode ]; meta = { @@ -628,12 +641,26 @@ license = lib.licenses.free; }; }) {}; + excorporate = callPackage ({ elpaBuild, emacs, fetchurl, fsm, lib, soap-client, url-http-ntlm }: + elpaBuild { + pname = "excorporate"; + version = "0.7.1"; + src = fetchurl { + url = "http://elpa.gnu.org/packages/excorporate-0.7.1.tar"; + sha256 = "1flvhk39yymskzazpwh95j2nj8kg4b02hsg7b8msnqi3q5lpqs54"; + }; + packageRequires = [ emacs fsm soap-client url-http-ntlm ]; + meta = { + homepage = "http://elpa.gnu.org/packages/excorporate.html"; + license = lib.licenses.free; + }; + }) {}; exwm = callPackage ({ elpaBuild, fetchurl, lib, xelb }: elpaBuild { pname = "exwm"; - version = "0.2"; + version = "0.4"; src = fetchurl { - url = "http://elpa.gnu.org/packages/exwm-0.2.tar"; - sha256 = "0z96zz6h5r880nbhclbxs2r0zfkg771lg0fjghigqxz8ai0hh1ll"; + url = "http://elpa.gnu.org/packages/exwm-0.4.tar"; + sha256 = "1qlplx88mk8c5sahlymxxh46bzf6bxnsqk92wliv5ji4ai5373fb"; }; packageRequires = [ xelb ]; meta = { @@ -767,10 +794,10 @@ hydra = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }: elpaBuild { pname = "hydra"; - version = "0.13.4"; + version = "0.13.5"; src = fetchurl { - url = "http://elpa.gnu.org/packages/hydra-0.13.4.tar"; - sha256 = "11msy6n075iv00c2r9f85bzx3srnj403rhlga1rgsl6vsryf21fj"; + url = "http://elpa.gnu.org/packages/hydra-0.13.5.tar"; + sha256 = "0vq1pjyq6ddbikbh0vzdigbs0zlldgwad0192s7v9npg8qlwi668"; }; packageRequires = [ cl-lib ]; meta = { @@ -978,10 +1005,10 @@ }) {}; math-symbol-lists = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild { pname = "math-symbol-lists"; - version = "1.0"; + version = "1.1"; src = fetchurl { - url = "http://elpa.gnu.org/packages/math-symbol-lists-1.0.el"; - sha256 = "1rry9x4pl7i0sij051i76zp1ypvnj1qbwm40a7bs462c74q4jlwn"; + url = "http://elpa.gnu.org/packages/math-symbol-lists-1.1.tar"; + sha256 = "06klvnqipz0n9slw72fxmhrydrw6bi9fs9vnn8hrja8gsqf8inlz"; }; packageRequires = []; meta = { @@ -1005,10 +1032,10 @@ metar = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }: elpaBuild { pname = "metar"; - version = "0.1"; + version = "0.2"; src = fetchurl { - url = "http://elpa.gnu.org/packages/metar-0.1.el"; - sha256 = "0s9zyzps022h5xax574bwsvsyp893x5w74kznnhfm63sxrifbi18"; + url = "http://elpa.gnu.org/packages/metar-0.2.el"; + sha256 = "0rfzq79llh6ixw02kjpn8s2shxrabvfvsq48pagwak1jl2s0askf"; }; packageRequires = [ cl-lib ]; meta = { @@ -1215,10 +1242,10 @@ }) {}; org = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild { pname = "org"; - version = "20160215"; + version = "20160229"; src = fetchurl { - url = "http://elpa.gnu.org/packages/org-20160215.tar"; - sha256 = "0w2686rza4xdknq3sy87s04zvlmjxyr6wrj9y9ydcv8hbzws3bhd"; + url = "http://elpa.gnu.org/packages/org-20160229.tar"; + sha256 = "15zrkw33ma8q079sb518rmcj97n35rnjv16p6zfw52m9xfdwxgi9"; }; packageRequires = []; meta = { @@ -1411,6 +1438,19 @@ license = lib.licenses.free; }; }) {}; + sed-mode = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild { + pname = "sed-mode"; + version = "1.0"; + src = fetchurl { + url = "http://elpa.gnu.org/packages/sed-mode-1.0.el"; + sha256 = "1zpdai5k9zhy5hw0a5zx7qv3rcf8cn29hncfjnhk9k6sjq0302lg"; + }; + packageRequires = []; + meta = { + homepage = "http://elpa.gnu.org/packages/sed-mode.html"; + license = lib.licenses.free; + }; + }) {}; seq = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild { pname = "seq"; version = "1.11"; @@ -1439,10 +1479,10 @@ }) {}; sisu-mode = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild { pname = "sisu-mode"; - version = "3.0.3"; + version = "7.1.8"; src = fetchurl { - url = "http://elpa.gnu.org/packages/sisu-mode-3.0.3.el"; - sha256 = "0ay9hfix3x53f39my02071dzxrw69d4zx5zirxwmmmyxmkaays3r"; + url = "http://elpa.gnu.org/packages/sisu-mode-7.1.8.el"; + sha256 = "12zs6y4rzng1d7djl9wh3wc0f9fj0bqb7h754rvixvndlr5c10nj"; }; packageRequires = []; meta = { @@ -1492,10 +1532,10 @@ }) {}; sotlisp = callPackage ({ elpaBuild, emacs, fetchurl, lib }: elpaBuild { pname = "sotlisp"; - version = "1.4.1"; + version = "1.5.1"; src = fetchurl { - url = "http://elpa.gnu.org/packages/sotlisp-1.4.1.el"; - sha256 = "1v99pcj5lp1xxavghwv03apwpc589y7wb8vv6w3kai7483p13z5j"; + url = "http://elpa.gnu.org/packages/sotlisp-1.5.1.el"; + sha256 = "1dm2pl4i091gi5lljl68s6v3l3904jj38v56qjblm160wjiahgkm"; }; packageRequires = [ emacs ]; meta = { @@ -1518,10 +1558,10 @@ }) {}; stream = callPackage ({ elpaBuild, emacs, fetchurl, lib }: elpaBuild { pname = "stream"; - version = "2.1.0"; + version = "2.2.0"; src = fetchurl { - url = "http://elpa.gnu.org/packages/stream-2.1.0.el"; - sha256 = "05fihjd8gm5w4xbdcvah1g9srcgmk87ymk3i7wwa6961w5s01d5y"; + url = "http://elpa.gnu.org/packages/stream-2.2.0.el"; + sha256 = "0i6vwih61a0z0q05v9wyp9nj5h68snlb9n52nmrv1k0hhzsjmlrs"; }; packageRequires = [ emacs ]; meta = { @@ -1598,10 +1638,10 @@ test-simple = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }: elpaBuild { pname = "test-simple"; - version = "1.1"; + version = "1.2.0"; src = fetchurl { - url = "http://elpa.gnu.org/packages/test-simple-1.1.el"; - sha256 = "0s8r6kr0a6n1c20fraif2ngis436a7d3gsj351s6icx6bbcjdalw"; + url = "http://elpa.gnu.org/packages/test-simple-1.2.0.el"; + sha256 = "1j97qrwi3i2kihszsxf3y2cby2bzp8g0zf6jlpdix3dinav8xa3b"; }; packageRequires = [ cl-lib ]; meta = { @@ -1704,10 +1744,10 @@ url-http-ntlm = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib, ntlm ? null }: elpaBuild { pname = "url-http-ntlm"; - version = "2.0.1"; + version = "2.0.2"; src = fetchurl { - url = "http://elpa.gnu.org/packages/url-http-ntlm-2.0.1.tar"; - sha256 = "0h6xsm1x7v69kb4shyvv1p4f6sxgcqs5ap6ylqydz10mbcx7aq0w"; + url = "http://elpa.gnu.org/packages/url-http-ntlm-2.0.2.el"; + sha256 = "0jci5cl31hw4dj0j9ljq0iplg530wnwbw7b63crrwn3mza5cb2wf"; }; packageRequires = [ cl-lib ntlm ]; meta = { @@ -1849,10 +1889,10 @@ xelb = callPackage ({ cl-generic, elpaBuild, emacs, fetchurl, lib }: elpaBuild { pname = "xelb"; - version = "0.5"; + version = "0.6"; src = fetchurl { - url = "http://elpa.gnu.org/packages/xelb-0.5.tar"; - sha256 = "1wypffg492r2a3h136c6mphsbgimxcipsarm971z56kpy3lwi4sb"; + url = "http://elpa.gnu.org/packages/xelb-0.6.tar"; + sha256 = "1m91af5srxq8zs9w4gb44kl4bgka8fq7k33h7f2yn213h23kvvvh"; }; packageRequires = [ cl-generic emacs ]; meta = { From af8540441262eccf776494007efcd7ee1581719f Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sat, 5 Mar 2016 11:34:17 -0300 Subject: [PATCH 08/76] Cutegram: add qtimageformats (for sticker support) This commit adds preliminary sticker support for Cutegram. --- .../instant-messengers/telegram/cutegram/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix index fa03b8d21ad..ec188e98284 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchgit -, qtbase, qtmultimedia, qtquick1, qtquickcontrols, qtgraphicaleffects +, qtbase, qtmultimedia, qtquick1, qtquickcontrols +, qtimageformats, qtgraphicaleffects , telegram-qml, libqtelegram-aseman-edition , gst_plugins_base, gst_plugins_good, gst_plugins_bad, gst_plugins_ugly , makeQtWrapper }: @@ -14,8 +15,9 @@ stdenv.mkDerivation rec { }; buildInputs = - [ qtbase qtmultimedia qtquick1 qtquickcontrols qtgraphicaleffects - telegram-qml libqtelegram-aseman-edition + [ qtbase qtmultimedia qtquick1 qtquickcontrols + qtimageformats qtgraphicaleffects + telegram-qml libqtelegram-aseman-edition gst_plugins_base gst_plugins_good gst_plugins_bad gst_plugins_ugly ]; nativeBuildInputs = [ makeQtWrapper ]; enableParallelBuild = true; @@ -33,5 +35,3 @@ stdenv.mkDerivation rec { }; } #TODO: appindicator, for system tray plugin (by @profpatsch) - - From 1ff8a6b6c44761c0c0a5b0ffb2f32ea6ba5cea20 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 1 Mar 2016 19:21:07 +0100 Subject: [PATCH 09/76] electrum: 2.5.4 -> 2.6.1 --- pkgs/applications/misc/electrum/default.nix | 27 +++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index 6025fce776c..c9b6de715d2 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -1,17 +1,34 @@ -{ stdenv, fetchurl, buildPythonApplication, pythonPackages, slowaes }: +{ stdenv, fetchurl, pythonPackages }: -buildPythonApplication rec { +let + jsonrpclib = pythonPackages.buildPythonPackage rec { + version = "0.1.7"; + name = "jsonrpclib-${version}"; + src = fetchurl { + url = "https://pypi.python.org/packages/source/j/jsonrpclib/${name}.tar.gz"; + sha256 = "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"; + }; + propagatedBuildInputs = [ pythonPackages.cjson ]; + meta = { + homepage = https://pypi.python.org/pypi/jsonrpclib; + license = stdenv.lib.licenses.asl20; + }; + }; +in + +pythonPackages.buildPythonApplication rec { name = "electrum-${version}"; - version = "2.5.4"; + version = "2.6.1"; src = fetchurl { url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz"; - sha256 = "18saa2rg07vfp9scp3i8s0wi2pqw9s8l8b44gq43zzl41120zc60"; + sha256 = "14q6y1hwzki56nfhd3nfbxid07d5fv0pgmklvcf7yxjmpdxrg0iq"; }; propagatedBuildInputs = with pythonPackages; [ dns ecdsa + jsonrpclib pbkdf2 protobuf pyasn1 @@ -47,7 +64,7 @@ buildPythonApplication rec { of the blockchain. ''; homepage = https://electrum.org; - license = licenses.gpl3; + license = licenses.mit; maintainers = with maintainers; [ ehmry joachifm np ]; }; } From 757a1f7fe9e99078c7e849c83e3f011519c2a49f Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 5 Mar 2016 18:33:53 +0100 Subject: [PATCH 10/76] cppcheck: 1.69 -> 1.72 Also add myself to the list of maintainers --- .../tools/analysis/cppcheck/default.nix | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/analysis/cppcheck/default.nix b/pkgs/development/tools/analysis/cppcheck/default.nix index 53397786dc4..5955f34b58e 100644 --- a/pkgs/development/tools/analysis/cppcheck/default.nix +++ b/pkgs/development/tools/analysis/cppcheck/default.nix @@ -1,15 +1,15 @@ { stdenv, fetchurl, libxslt, docbook_xsl, docbook_xml_dtd_45 }: let - name = "cppcheck"; - version = "1.69"; + pname = "cppcheck"; + version = "1.72"; in -stdenv.mkDerivation { - name = "${name}-${version}"; +stdenv.mkDerivation rec { + name = "${pname}-${version}"; src = fetchurl { - url = "mirror://sourceforge/${name}/${name}-${version}.tar.bz2"; - sha256 = "0bjkqy4c6ph6nzparcnbxrdn52i3hiind4jc99v2kvsq281wimab"; + url = "mirror://sourceforge/${pname}/${name}.tar.bz2"; + sha256 = "085lm8v7biixy6rykq836gfy91jcccpz9qpk8i9x339dzy2b2q4l"; }; buildInputs = [ libxslt docbook_xsl docbook_xml_dtd_45 ]; @@ -22,15 +22,15 @@ stdenv.mkDerivation { cp cppcheck.1 $out/share/man/man1/cppcheck.1 ''; - meta = { + meta = with stdenv.lib; { description = "A static analysis tool for C/C++ code"; longDescription = '' Check C/C++ code for memory leaks, mismatching allocation-deallocation, buffer overruns and more. ''; homepage = http://cppcheck.sourceforge.net/; - license = stdenv.lib.licenses.gpl3Plus; - platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.simons ]; + license = licenses.gpl3Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ simons joachifm ]; }; } From 73878e1c101871cf6dc216e5557dfeccd5344aae Mon Sep 17 00:00:00 2001 From: Mathieu Boespflug Date: Sat, 5 Mar 2016 19:41:33 +0100 Subject: [PATCH 11/76] keyfuzz: init at 0.2. --- lib/maintainers.nix | 1 + pkgs/tools/inputmethods/keyfuzz/default.nix | 21 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 pkgs/tools/inputmethods/keyfuzz/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 84e95a2409e..0b5883f291e 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -215,6 +215,7 @@ maurer = "Matthew Maurer "; mbakke = "Marius Bakke "; mbe = "Brandon Edens "; + mboes = "Mathieu Boespflug "; mcmtroffaes = "Matthias C. M. Troffaes "; meditans = "Carlo Nucera "; meisternu = "Matt Miemiec "; diff --git a/pkgs/tools/inputmethods/keyfuzz/default.nix b/pkgs/tools/inputmethods/keyfuzz/default.nix new file mode 100644 index 00000000000..f04afd639b7 --- /dev/null +++ b/pkgs/tools/inputmethods/keyfuzz/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "keyfuzz-${version}"; + version = "0.2"; + + meta = with stdenv.lib; { + description = "Manipulate the scancode/keycode translation tables of keyboard drivers."; + homepace = http://0pointer.de/lennart/projects/keyfuzz/; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ mboes ]; + }; + + src = fetchurl { + url = "http://0pointer.de/lennart/projects/keyfuzz/keyfuzz-0.2.tar.gz"; + sha256 = "0xv9ymivp8fnyc5xcyh1vamxnx90bzw66wlld813fvm6q2gsiknk"; + }; + + configureFlags = "--without-initdir --disable-lynx"; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b7b173ca0fc..6afd46c6907 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2152,6 +2152,8 @@ let keychain = callPackage ../tools/misc/keychain { }; + keyfuzz = callPackage ../tools/inputmethods/keyfuzz { }; + kibana = callPackage ../development/tools/misc/kibana { }; kismet = callPackage ../applications/networking/sniffers/kismet { }; From 75d7692ab3767c43a0fcd8a815ac88bfabf06832 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Wed, 2 Mar 2016 20:56:39 +0000 Subject: [PATCH 12/76] gitAndTools.darcsToGit: 0.2git -> 2015-06-04 Fixes error where ruby 2.0+ doesn't have iconv anymore. `require': cannot load such file -- iconv (LoadError) --- .../git-and-tools/darcs-to-git/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix b/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix index 115424ac69c..1b2ad45b56a 100644 --- a/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { name = "darcs-to-git-${version}"; - version = "0.2git"; + version = "2015-06-04"; src = fetchgit { url = "git://github.com/purcell/darcs-to-git.git"; - rev = "58a55936899c7e391df5ae1326c307fbd4617a25"; - sha256 = "366aa691920991e21cfeebd4cbd53a6c42d80e2bc46ff398af482d1d15bac4c3"; + rev = "e5fee32495908fe0f7d700644c7b37347b7a0a5b"; + sha256 = "0ycp7pzv9g9pgj25asiby3p3m5vg5czqf4rpy2mavjqhiblxlcv5"; }; patchPhase = let From 47c2411d00eccceb16e3a9af5333053ee7837794 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Fri, 4 Mar 2016 00:42:43 +0000 Subject: [PATCH 13/76] rubyripper: fix installation --- pkgs/applications/audio/rubyripper/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/audio/rubyripper/default.nix b/pkgs/applications/audio/rubyripper/default.nix index 36f1fc8312f..035bb876482 100644 --- a/pkgs/applications/audio/rubyripper/default.nix +++ b/pkgs/applications/audio/rubyripper/default.nix @@ -6,6 +6,9 @@ stdenv.mkDerivation rec { url = "https://rubyripper.googlecode.com/files/rubyripper-${version}.tar.bz2"; sha256 = "1fwyk3y0f45l2vi3a481qd7drsy82ccqdb8g2flakv58m45q0yl1"; }; + + preConfigure = "patchShebangs ."; + configureFlags = [ "--enable-cli" ]; buildInputs = [ ruby cdparanoia makeWrapper ]; postInstall = '' From 5b8361c1180b78a448079ee7a8179c5c7d38da3a Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 5 Mar 2016 19:20:57 +0100 Subject: [PATCH 14/76] linux_3_10: 3.10.97 -> 3.10.99 --- pkgs/os-specific/linux/kernel/linux-3.10.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-3.10.nix b/pkgs/os-specific/linux/kernel/linux-3.10.nix index cd7e6f1af74..d0c09d35cd0 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.10.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.10.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "3.10.97"; + version = "3.10.99"; extraMeta.branch = "3.10"; src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; - sha256 = "0z66nbnbhmzjjbvrd7sbg4351x92grk8xja58rxxbb28cj3sy9r9"; + sha256 = "1hq90yn2ry36y317px7f0wy55j70ip3wlxa4qsdl9pzlndadcp24"; }; kernelPatches = args.kernelPatches; From 354a1935d312fd8caf0531ee46b86147f1308083 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 5 Mar 2016 19:23:07 +0100 Subject: [PATCH 15/76] linux_3_12: 3.12.54 -> 3.12.55 --- pkgs/os-specific/linux/kernel/linux-3.12.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-3.12.nix b/pkgs/os-specific/linux/kernel/linux-3.12.nix index 636ff9e7d29..f146e5f2f13 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.12.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.12.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "3.12.54"; + version = "3.12.55"; extraMeta.branch = "3.12"; src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; - sha256 = "0a6wv72257nasc1qrw966ajd60z24cjpc83hnbblsjkfl0b3zrrn"; + sha256 = "0xg52i6zsrkzv0i2kxrsx0179lkp9f2388r06rahx0anf4ars5p2"; }; kernelPatches = args.kernelPatches; From af40e356fe41fdcb8463a42c595f1e95cfaa679c Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 5 Mar 2016 19:24:05 +0100 Subject: [PATCH 16/76] linux_3_14: 3.14.61 -> 3.14.63 --- pkgs/os-specific/linux/kernel/linux-3.14.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-3.14.nix b/pkgs/os-specific/linux/kernel/linux-3.14.nix index 80cb4bf89dc..ae3ba775d41 100644 --- a/pkgs/os-specific/linux/kernel/linux-3.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-3.14.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "3.14.61"; + version = "3.14.63"; extraMeta.branch = "3.14"; src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; - sha256 = "06lrz2z3lskajk87kq1qi8q6rbdczhsz6sbp5cba4i0nw7sg1nbg"; + sha256 = "0q3qcgcaxjc298dgjpfn6g17lvki2p87f0zkaxs0h0g13jhykwbz"; }; kernelPatches = args.kernelPatches; From 3b1f2e070b43e31fa0da2f043ad8cd2e4c31ccc7 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 5 Mar 2016 19:24:30 +0100 Subject: [PATCH 17/76] linux_4_4: 4.4.3 -> 4.4.4 --- pkgs/os-specific/linux/kernel/linux-4.4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix index 56f660a248a..6819dfedb13 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.4.3"; + version = "4.4.4"; extraMeta.branch = "4.4"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1pcichd5hp3hzb3hwh5737jwqmfv4ylhw04sbby3hzmxkfqrqdqb"; + sha256 = "0b4190mwmxf329n16yl32my7dfi02pi7qf39a8v61sl9b2gxffad"; }; kernelPatches = args.kernelPatches; From 54d342add8ab512c5650e1b2da25708622dd327d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 3 Mar 2016 22:38:53 +0100 Subject: [PATCH 18/76] nvidia_x11_legacy340: update 340.76 -> 340.94 Fixes #13658. --- .../linux/nvidia-x11/legacy340.nix | 13 ++++----- .../nvidia-x11/nvidia-340.76-kernel-4.0.patch | 28 ------------------- 2 files changed, 6 insertions(+), 35 deletions(-) delete mode 100644 pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy340.nix b/pkgs/os-specific/linux/nvidia-x11/legacy340.nix index bb974410e37..fa9d6442e42 100644 --- a/pkgs/os-specific/linux/nvidia-x11/legacy340.nix +++ b/pkgs/os-specific/linux/nvidia-x11/legacy340.nix @@ -12,7 +12,7 @@ assert (!libsOnly) -> kernel != null; let - versionNumber = "340.76"; + versionNumber = "340.96"; /* This branch is needed for G8x, G9x, and GT2xx GPUs, and motherboard chipsets based on them. Ongoing support for new Linux kernels and X servers, as well as fixes for critical bugs, will be included in 340.* legacy releases through the end of 2019. @@ -25,18 +25,16 @@ stdenv.mkDerivation { builder = ./builder-legacy340.sh; - patches = [ ./nvidia-340.76-kernel-4.0.patch ]; - src = if stdenv.system == "i686-linux" then fetchurl { - url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run"; - sha256 = "1l1nn340hc8iwlzb16gcm2xvnvkw7rf84ll89bcax70094xxjacv"; + url = "http://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run"; + sha256 = "13j739gg1igll88xpfsx46m7pan4fwpzx5hqdskkdc0srmw2f3n4"; } else if stdenv.system == "x86_64-linux" then fetchurl { - url = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run"; - sha256 = "016hnsgrcm4ly0mnkcd6c1qkciy3qmbwdwy4rlwq3m6dh4ixw7jc"; + url = "http://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run"; + sha256 = "1i0lri76ghhr4c6fdlv5gwzd99n70hv3kw21w51anb55msr9s3r8"; } else throw "nvidia-x11 does not support platform ${stdenv.system}"; @@ -62,5 +60,6 @@ stdenv.mkDerivation { license = licenses.unfreeRedistributable; platforms = platforms.linux; maintainers = [ maintainers.vcunat ]; + priority = 4; # resolves collision with xorg-server's "lib/xorg/modules/extensions/libglx.so" }; } diff --git a/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch b/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch deleted file mode 100644 index 5fdc1fed727..00000000000 --- a/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/kernel/nv-pat.c 2015-07-03 08:39:35.417031728 +0200 -+++ b/kernel/nv-pat.c 2015-07-03 08:42:15.631838988 +0200 -@@ -35,8 +35,13 @@ - unsigned long cr0 = read_cr0(); - write_cr0(((cr0 & (0xdfffffff)) | 0x40000000)); - wbinvd(); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) - *cr4 = read_cr4(); - if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80); -+#else -+ *cr4 = __read_cr4(); -+ if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80); -+#endif - __flush_tlb(); - } - -@@ -46,7 +51,11 @@ - wbinvd(); - __flush_tlb(); - write_cr0((cr0 & 0x9fffffff)); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) - if (cr4 & 0x80) write_cr4(cr4); -+#else -+ if (cr4 & 0x80) __write_cr4(cr4); -+#endif - } - - static int nv_determine_pat_mode(void) From 8b97ca270e84c38bb0fb1da829da318ed7dbda8a Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 5 Mar 2016 03:04:30 +0100 Subject: [PATCH 19/76] chromium: Update all channels to latest versions Overview of the updated versions: stable: 48.0.2564.116 -> 49.0.2623.75 beta: 49.0.2623.63 -> 49.0.2623.75 dev: 50.0.2657.0 -> 50.0.2661.11 Stable and beta are now in par because of the release of a major stable update. The release addresses 26 security vulnerabilities, the following with an assigned CVE: * CVE-2016-1630: Same-origin bypass in Blink. Credit to Mariusz Mlynski. * CVE-2016-1631: Same-origin bypass in Pepper Plugin. Credit to Mariusz Mlynski. * CVE-2016-1632: Bad cast in Extensions. Credit to anonymous. * CVE-2016-1633: Use-after-free in Blink. Credit to cloudfuzzer. * CVE-2016-1634: Use-after-free in Blink. Credit to cloudfuzzer. * CVE-2016-1635: Use-after-free in Blink. Credit to Rob Wu. * CVE-2016-1636: SRI Validation Bypass. Credit to Ryan Lester and Bryant Zadegan. * CVE-2015-8126: Out-of-bounds access in libpng. Credit to joerg.bornemann. * CVE-2016-1637: Information Leak in Skia. Credit to Keve Nagy. * CVE-2016-1638: WebAPI Bypass. Credit to Rob Wu. * CVE-2016-1639: Use-after-free in WebRTC. Credit to Khalil Zhani. * CVE-2016-1640: Origin confusion in Extensions UI. Credit to Luan Herrera. * CVE-2016-1641: Use-after-free in Favicon. Credit to Atte Kettunen of OUSPG. The full announcement which also includes the link to the bug tracker can be found here: http://googlechromereleases.blogspot.de/2016/03/stable-channel-update.html Also, the 32bit Chrome package needed for the Flash and Widevine plugins doesn't exist anymore, because Google has dropped support for 32bit distros, see here for the announcement: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/FoE6sL-p6oU On our end, we need to fix the patch for the plugin paths to work for the latest dev channel. The change is very minor, because the nix_plugin_paths_46.patch only doesn't apply because of an iOS-related ifdef. Built and tested on my Hydra at: https://headcounter.org/hydra/eval/311511 Signed-off-by: aszlig Fixes: #13665 --- .../browsers/chromium/source/default.nix | 11 ++- .../chromium/source/nix_plugin_paths_50.patch | 75 +++++++++++++++++++ .../browsers/chromium/source/sources.nix | 19 +++-- 3 files changed, 91 insertions(+), 14 deletions(-) create mode 100644 pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_50.patch diff --git a/pkgs/applications/networking/browsers/chromium/source/default.nix b/pkgs/applications/networking/browsers/chromium/source/default.nix index 4e568aed594..a566c4bb1c8 100644 --- a/pkgs/applications/networking/browsers/chromium/source/default.nix +++ b/pkgs/applications/networking/browsers/chromium/source/default.nix @@ -41,10 +41,13 @@ in stdenv.mkDerivation { done ''; - patches = - singleton ./nix_plugin_paths_46.patch ++ - singleton ./build_fixes_46.patch ++ - singleton ./widevine.patch; + patches = [ + ./build_fixes_46.patch + ./widevine.patch + (if versionOlder version "50.0.0.0" + then ./nix_plugin_paths_46.patch + else ./nix_plugin_paths_50.patch) + ]; patchPhase = let diffmod = sym: "/^${sym} /{s/^${sym} //;${transform ""};s/^/${sym} /}"; diff --git a/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_50.patch b/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_50.patch new file mode 100644 index 00000000000..062098a8522 --- /dev/null +++ b/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_50.patch @@ -0,0 +1,75 @@ +diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc +index 74bf041..5f34198 100644 +--- a/chrome/common/chrome_paths.cc ++++ b/chrome/common/chrome_paths.cc +@@ -66,21 +66,14 @@ static base::LazyInstance + g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER; + + // Gets the path for internal plugins. +-bool GetInternalPluginsDirectory(base::FilePath* result) { +-#if defined(OS_MACOSX) +- // If called from Chrome, get internal plugins from a subdirectory of the +- // framework. +- if (base::mac::AmIBundled()) { +- *result = chrome::GetFrameworkBundlePath(); +- DCHECK(!result->empty()); +- *result = result->Append("Internet Plug-Ins"); +- return true; +- } +- // In tests, just look in the module directory (below). +-#endif +- +- // The rest of the world expects plugins in the module directory. +- return PathService::Get(base::DIR_MODULE, result); ++bool GetInternalPluginsDirectory(base::FilePath* result, ++ const std::string& ident) { ++ std::string full_env = std::string("NIX_CHROMIUM_PLUGIN_PATH_") + ident; ++ const char* value = getenv(full_env.c_str()); ++ if (value == NULL) ++ return PathService::Get(base::DIR_MODULE, result); ++ else ++ *result = base::FilePath(value); + } + + #if defined(OS_WIN) +@@ -253,11 +246,11 @@ bool PathProvider(int key, base::FilePath* result) { + create_dir = true; + break; + case chrome::DIR_INTERNAL_PLUGINS: +- if (!GetInternalPluginsDirectory(&cur)) ++ if (!GetInternalPluginsDirectory(&cur, "ALL")) + return false; + break; + case chrome::DIR_PEPPER_FLASH_PLUGIN: +- if (!GetInternalPluginsDirectory(&cur)) ++ if (!GetInternalPluginsDirectory(&cur, "PEPPERFLASH")) + return false; + cur = cur.Append(kPepperFlashBaseDirectory); + break; +@@ -314,7 +307,7 @@ bool PathProvider(int key, base::FilePath* result) { + // We currently need a path here to look up whether the plugin is disabled + // and what its permissions are. + case chrome::FILE_NACL_PLUGIN: +- if (!GetInternalPluginsDirectory(&cur)) ++ if (!GetInternalPluginsDirectory(&cur, "NACL")) + return false; + cur = cur.Append(kInternalNaClPluginFileName); + break; +@@ -349,7 +342,7 @@ bool PathProvider(int key, base::FilePath* result) { + cur = cur.DirName(); + } + #else +- if (!GetInternalPluginsDirectory(&cur)) ++ if (!GetInternalPluginsDirectory(&cur, "PNACL")) + return false; + #endif + cur = cur.Append(FILE_PATH_LITERAL("pnacl")); +@@ -366,7 +359,7 @@ bool PathProvider(int key, base::FilePath* result) { + // In the component case, this is the source adapter. Otherwise, it is the + // actual Pepper module that gets loaded. + case chrome::FILE_WIDEVINE_CDM_ADAPTER: +- if (!GetInternalPluginsDirectory(&cur)) ++ if (!GetInternalPluginsDirectory(&cur, "WIDEVINE")) + return false; + cur = cur.AppendASCII(kWidevineCdmAdapterFileName); + break; diff --git a/pkgs/applications/networking/browsers/chromium/source/sources.nix b/pkgs/applications/networking/browsers/chromium/source/sources.nix index ffb9ff11068..ffec5c8b807 100644 --- a/pkgs/applications/networking/browsers/chromium/source/sources.nix +++ b/pkgs/applications/networking/browsers/chromium/source/sources.nix @@ -1,19 +1,18 @@ # This file is autogenerated from update.sh in the parent directory. { beta = { - sha256 = "07i4vqswkijnl7wi6r1a0n1jq54ackm01yf8h3hwcik8q10i1aq5"; - sha256bin64 = "16pwimg672qaqb89zdvsr8dr7bz50mz7zf6cl0cf45kz7sn8wwlh"; - version = "49.0.2623.63"; + sha256 = "1xc2npbc829nxria1j37kxyy95jkalkkphxgv24if0ibn62lrzd4"; + sha256bin64 = "1arm15g3vmm3zlvcql3qylw1fhrn5ddzl2v8mkpb3a251m425dsi"; + version = "49.0.2623.75"; }; dev = { - sha256 = "1xc66zsjd5snydf60di2k2vzwwcqs1p16yn4jbpj2khm9cmxmkmf"; - sha256bin64 = "06v7r76pbc979f7ahmln0hmxzd8ipirh4128i0ygidj71xmg51mm"; - version = "50.0.2657.0"; + sha256 = "04j0nyz20gi7vf1javbw06wrqpkfw6vg024i3wkgx42hzd6hjgw4"; + sha256bin64 = "12ff4q615rwakgpr9v84p55maasqb4vg61s89vgxrlsgqrmkahg4"; + version = "50.0.2661.11"; }; stable = { - sha256 = "03sdm09cnwq8a056rfljql7mz0s17fngfnm5q3p5xwakr2sbj7ka"; - sha256bin32 = "157m88nafb8svpkv11rzpcfvak6486wx43rmbssg52x2k0vas0bl"; - sha256bin64 = "036pcma8qczja803h9r1nlm0ypm4zblmy6q7pkwlgmn3r4r3n7i0"; - version = "48.0.2564.116"; + sha256 = "1xc2npbc829nxria1j37kxyy95jkalkkphxgv24if0ibn62lrzd4"; + sha256bin64 = "01qi5jmlmdpy6icc4y51bn5a063mxrnkncg3pbmbl4r02vqca5jh"; + version = "49.0.2623.75"; }; } From f3d6e9ec71e9cefda85407a85829fb0b85cd41c0 Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Sun, 6 Mar 2016 00:13:40 +1100 Subject: [PATCH 20/76] exwm service: init --- .../services/x11/window-managers/default.nix | 1 + .../services/x11/window-managers/exwm.nix | 55 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 nixos/modules/services/x11/window-managers/exwm.nix diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix index 37d3348b8a3..26dfbb1f4e1 100644 --- a/nixos/modules/services/x11/window-managers/default.nix +++ b/nixos/modules/services/x11/window-managers/default.nix @@ -13,6 +13,7 @@ in ./clfswm.nix ./compiz.nix ./dwm.nix + ./exwm.nix ./fluxbox.nix ./herbstluftwm.nix ./i3.nix diff --git a/nixos/modules/services/x11/window-managers/exwm.nix b/nixos/modules/services/x11/window-managers/exwm.nix new file mode 100644 index 00000000000..dbbd8a125d6 --- /dev/null +++ b/nixos/modules/services/x11/window-managers/exwm.nix @@ -0,0 +1,55 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.xserver.windowManager.exwm; + loadScript = pkgs.writeText "emacs-exwm-load" '' + (require 'exwm) + ${optionalString cfg.enableDefaultConfig '' + (require 'exwm-config) + (exwm-config-default) + ''} + ''; + packages = epkgs: cfg.extraPackages epkgs ++ [ epkgs.exwm ]; + exwm-emacs = pkgs.emacsWithPackages packages; +in + +{ + options = { + services.xserver.windowManager.exwm = { + enable = mkEnableOption "exwm"; + enableDefaultConfig = mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Enable an uncustomised exwm configuration."; + }; + extraPackages = mkOption { + default = self: []; + example = literalExample '' + epkgs: [ + epkgs.emms + epkgs.magit + epkgs.proofgeneral + ] + ''; + description = '' + Extra packages available to Emacs. The value must be a + function which receives the attrset defined in + emacsPackages as the sole argument. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + services.xserver.windowManager.session = singleton { + name = "exwm"; + start = '' + ${exwm-emacs}/bin/emacs -l ${loadScript} + ''; + }; + environment.systemPackages = [ exwm-emacs ]; + }; +} From d3deb49b543770c37ff101f1121c66c7a3ab456f Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Sat, 5 Mar 2016 22:11:27 +0000 Subject: [PATCH 21/76] atom: 1.5.3 -> 1.5.4 --- pkgs/applications/editors/atom/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix index d7b91de80d8..8dc1e2d0c01 100644 --- a/pkgs/applications/editors/atom/default.nix +++ b/pkgs/applications/editors/atom/default.nix @@ -16,11 +16,11 @@ let }; in stdenv.mkDerivation rec { name = "atom-${version}"; - version = "1.5.3"; + version = "1.5.4"; src = fetchurl { url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb"; - sha256 = "101fz4c5pj7yp7fg7kg7vcpqjzpwfrbxdyb6va5liip1llg1i2z3"; + sha256 = "0jnszf1v7xqhm2sy5wzm3f8aw7j1dnapnbw4d46bvshv9hbbzrn8"; name = "${name}.deb"; }; From 872f5d049cebee0f4536ca18d90b77fd8e233fbf Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Sat, 5 Mar 2016 23:23:19 +0100 Subject: [PATCH 22/76] Blacklist jhasse --- .mention-bot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.mention-bot b/.mention-bot index 4c200e30279..40e57f99660 100644 --- a/.mention-bot +++ b/.mention-bot @@ -1,5 +1,6 @@ { "userBlacklist": [ - "civodul" + "civodul", + "jhasse" ] } From 6af076730e54c86879bd099de16c194bdbae2b22 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 21 Feb 2016 20:13:44 +0100 Subject: [PATCH 23/76] Documentation: rewrite Python - Rewrite current documentation - Add introduction/tutorial - Convert to markdown --- doc/default.nix | 6 + doc/languages-frameworks/python.md | 668 ++++++++++++++++++++++++++++ doc/languages-frameworks/python.xml | 447 ------------------- 3 files changed, 674 insertions(+), 447 deletions(-) create mode 100644 doc/languages-frameworks/python.md delete mode 100644 doc/languages-frameworks/python.xml diff --git a/doc/default.nix b/doc/default.nix index 196b9e44539..203555de131 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -45,6 +45,10 @@ stdenv.mkDerivation { + toDocbook { inputFile = ./introduction.md; outputFile = "introduction.xml"; + } + + toDocbook { + inputFile = ./languages-frameworks/python.md; + outputFile = "./languages-frameworks/python.xml"; useChapters = true; } + toDocbook { @@ -61,6 +65,8 @@ stdenv.mkDerivation { outputFile = "languages-frameworks/r.xml"; } + '' + cat -n languages-frameworks/python.xml + echo ${nixpkgsVersion} > .version xmllint --noout --nonet --xinclude --noxincludenode \ diff --git a/doc/languages-frameworks/python.md b/doc/languages-frameworks/python.md new file mode 100644 index 00000000000..d05cabac3ff --- /dev/null +++ b/doc/languages-frameworks/python.md @@ -0,0 +1,668 @@ +# Python + +## User Guide + +Several versions of Python are available on Nix as well as a high amount of +packages. The default interpreter is CPython 2.7. + +### Using Python + +#### Installing Python and packages + +It is important to make a distinction between Python packages that are +used as libraries, and applications that are written in Python. + +Applications on Nix are installed typically into your user +profile imperatively using `nix-env -i`, and on NixOS declaratively by adding the +package name to `environment.systemPackages` in `/etc/nixos/configuration.nix`. +Dependencies such as libraries are automatically installed and should not be +installed explicitly. + +The same goes for Python applications and libraries. Python applications can be +installed in your profile, but Python libraries you would like to use to develop +cannot. If you do install libraries in your profile, then you will end up with +import errors. + +#### Python environments using `nix-shell` + +The recommended method for creating Python environments for development is with +`nix-shell`. Executing + +```sh +$ nix-shell -p python35Packages.numpy python35Packages.toolz +``` + +opens a Nix shell which has available the requested packages and dependencies. +Now you can launch the Python interpreter (which is itself a dependency) + +```sh +[nix-shell:~] python3 +``` + +If the packages were not available yet in the Nix store, Nix would download or +build them automatically. A convenient option with `nix-shell` is the `--run` +option, with which you can execute a command in the `nix-shell`. Let's say we +want the above environment and directly run the Python interpreter + +```sh +$ nix-shell -p python35Packages.numpy python35Packages.toolz --run "python3" +``` + +This way you can use the `--run` option also to directly run a script + +```sh +$ nix-shell -p python35Packages.numpy python35Packages.toolz --run "python3 myscript.py" +``` + +In fact, for this specific use case there is a more convenient method. You can +add a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) to your script +specifying which dependencies Nix shell needs. With the following shebang, you +can use `nix-shell myscript.py` and it will make available all dependencies and +run the script in the `python3` shell. + +```py +#! /usr/bin/env nix-shell +#! nix-shell -i python3 -p python3Packages.numpy + +import numpy + +print(numpy.__version__) +``` + +Likely you do not want to type your dependencies each and every time. What you +can do is write a simple Nix expression which sets up an environment for you, +requiring you only to type `nix-shell`. Say we want to have Python 3.5, `numpy` +and `toolz`, like before, in an environment. With a `shell.nix` file +containing + +```nix +with import {}; + +(pkgs.python35.buildEnv.override { + extraLibs = with pkgs.python35Packages; [ numpy toolz ]; +}).env +``` +executing `nix-shell` gives you again a Nix shell from which you can run Python. + +What's happening here? + +1. We begin with importing the Nix Packages collections. `import ` import the `` function, `{}` calls it and the `with` statement brings all attributes of `nixpkgs` in the local scope. Therefore we can now use `pkgs`. +2. Then we create a Python 3.5 environment with `pkgs.buildEnv`. Because we want to use it with a custom set of Python packages, we override it. +3. The `extraLibs` argument of the original `buildEnv` function can be used to specify which packages should be included. We want `numpy` and `toolz`. Again, we use the `with` statement to bring a set of attributes into the local scope. +4. And finally, for in interactive use we return the environment. + +### Developing with Python + + +Now that you know how to get a working Python environment on Nix, it is time to go forward and start actually developing with Python. +We will first have a look at how Python packages are packaged on Nix. Then, we will look how you can use development mode with your code. + +#### Python packaging on Nix + +On Nix all packages are built by functions. The main function in Nix for building Python packages is [`buildPythonPackage`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/generic/default.nix). +Let's see how we would build the `toolz` package. According to [`python-packages.nix`](https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/python-packages.nix) `toolz` is build using + +```nix +toolz = buildPythonPackage rec{ + name = "toolz-${version}"; + version = "0.7.4"; + + src = pkgs.fetchurl{ + url = "https://pypi.python.org/packages/source/t/toolz/toolz-${version}.tar.gz"; + sha256 = "43c2c9e5e7a16b6c88ba3088a9bfc82f7db8e13378be7c78d6c14a5f8ed05afd"; + }; + + meta = { + homepage = "http://github.com/pytoolz/toolz/"; + description = "List processing tools and functional utilities"; + license = licenses.bsd3; + maintainers = with maintainers; [ fridh ]; + }; +}; +``` + +What happens here? The function `buildPythonPackage` is called and as argument +it accepts a set. In this case the set is a recursive set ([`rec`](http://nixos.org/nix/manual/#sec-constructs)). +One of the arguments is the name of the package, which consists of a basename +(generally following the name on PyPi) and a version. Another argument, `src` +specifies the source, which in this case is fetched from an url. `fetchurl` not +only downloads the target file, but also validates its hash. Furthermore, we +specify some (optional) [meta information](http://nixos.org/nixpkgs/manual/#chap-meta). + +The output of the function is a derivation, which is an attribute with the name +`toolz` of the set `pythonPackages`. Actually, sets are created for all interpreter versions, +so `python27Packages`, `python34Packages`, `python35Packages` and `pypyPackages`. + +The above example works when you're directly working on +`pkgs/top-level/python-packages.nix` in the Nixpkgs repository. Often though, +you will want to test a Nix expression outside of the Nixpkgs tree. If you +create a `shell.nix` file with the following contents + +```nix +with import {}; + +pkgs.python35Packages.buildPythonPackage rec { + name = "toolz-${version}"; + version = "0.7.4"; + + src = pkgs.fetchurl{ + url = "https://pypi.python.org/packages/source/t/toolz/toolz-${version}.tar.gz"; + sha256 = "43c2c9e5e7a16b6c88ba3088a9bfc82f7db8e13378be7c78d6c14a5f8ed05afd"; + }; + + meta = { + homepage = "http://github.com/pytoolz/toolz/"; + description = "List processing tools and functional utilities"; + license = licenses.bsd3; + maintainers = with maintainers; [ fridh ]; + }; +} +``` + +and then execute `nix-shell` will result in an environment in which you can use +Python 3.5 and the `toolz` package. As you can see we had to explicitly mention +for which Python version we want to build a package. + +The above example considered only a single package. Generally you will want to use multiple packages. +If we create a `shell.nix` file with the following contents + +```nix +with import {}; + +( let + toolz = pkgs.python35Packages.buildPythonPackage rec { + name = "toolz-${version}"; + version = "0.7.4"; + + src = pkgs.fetchurl{ + url = "https://pypi.python.org/packages/source/t/toolz/toolz-${version}.tar.gz"; + sha256 = "43c2c9e5e7a16b6c88ba3088a9bfc82f7db8e13378be7c78d6c14a5f8ed05afd"; + }; + + meta = { + homepage = "http://github.com/pytoolz/toolz/"; + description = "List processing tools and functional utilities"; + license = licenses.bsd3; + maintainers = with maintainers; [ fridh ]; + }; + }; + + in pkgs.python35.buildEnv.override rec { + + extraLibs = [ pkgs.python35Packages.numpy toolz ]; +} +).env +``` + +and again execute `nix-shell`, then we get a Python 3.5 environment with our +locally defined package as well as `numpy` which is build according to the +definition in Nixpkgs. What did we do here? Well, we took the Nix expression +that we used earlier to build a Python environment, and said that we wanted to +include our own version of `toolz`. To introduce our own package in the scope of +`buildEnv.override` we used a +[`let`](http://nixos.org/nix/manual/#sec-constructs) expression. + +### Handling dependencies + +Our example, `toolz`, doesn't have any dependencies on other Python +packages or system libraries. According to the manual, `buildPythonPackage` +uses the arguments `buildInputs` and `propagatedBuildInputs` to specify dependencies. If something is +exclusively a build-time dependency, then the dependency should be included as a +`buildInput`, but if it is (also) a runtime dependency, then it should be added +to `propagatedBuildInputs`. Test dependencies are considered build-time dependencies. + +The following example shows which arguments are given to `buildPythonPackage` in +order to build [`datashape`](https://github.com/blaze/datashape). + +```nix +datashape = buildPythonPackage rec { + name = "datashape-${version}"; + version = "0.4.7"; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/D/DataShape/${name}.tar.gz"; + sha256 = "14b2ef766d4c9652ab813182e866f493475e65e558bed0822e38bf07bba1a278"; + }; + + buildInputs = with self; [ pytest ]; + propagatedBuildInputs = with self; [ numpy multipledispatch dateutil ]; + + meta = { + homepage = https://github.com/ContinuumIO/datashape; + description = "A data description language"; + license = licenses.bsd2; + maintainers = with maintainers; [ fridh ]; + }; +}; +``` + +We can see several runtime dependencies, `numpy`, `multipledispatch`, and +`dateutil`. Furthermore, we have one `buildInput`, i.e. `pytest`. `pytest` is a +test runner and is only used during the `checkPhase` and is therefore not added +to `propagatedBuildInputs`. + +In the previous case we had only dependencies on other Python packages to consider. +Occasionally you have also system libraries to consider. E.g., `lxml` provides +Python bindings to `libxml2` and `libxslt`. These libraries are only required +when building the bindings and are therefore added as `buildInputs`. + +```nix +lxml = buildPythonPackage rec { + name = "lxml-3.4.4"; + + src = pkgs.fetchurl { + url = "http://pypi.python.org/packages/source/l/lxml/${name}.tar.gz"; + sha256 = "16a0fa97hym9ysdk3rmqz32xdjqmy4w34ld3rm3jf5viqjx65lxk"; + }; + + buildInputs = with self; [ pkgs.libxml2 pkgs.libxslt ]; + + meta = { + description = "Pythonic binding for the libxml2 and libxslt libraries"; + homepage = http://lxml.de; + license = licenses.bsd3; + maintainers = with maintainers; [ sjourdois ]; + }; +}; +``` + +In this example `lxml` and Nix are able to work out exactly where the relevant +files of the dependencies are. This is not always the case. + +The example below shows bindings to The Fastest Fourier Transform in the West, commonly known as +FFTW. On Nix we have separate packages of FFTW for the different types of floats +(`"single"`, `"double"`, `"long-double"`). The bindings need all three types, +and therefore we add all three as `buildInputs`. The bindings don't expect to +find each of them in a different folder, and therefore we have to set `LDFLAGS` +and `CFLAGS`. + +```nix +pyfftw = buildPythonPackage rec { + name = "pyfftw-${version}"; + version = "0.9.2"; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/p/pyFFTW/pyFFTW-${version}.tar.gz"; + sha256 = "f6bbb6afa93085409ab24885a1a3cdb8909f095a142f4d49e346f2bd1b789074"; + }; + + buildInputs = [ pkgs.fftw pkgs.fftwFloat pkgs.fftwLongDouble]; + + propagatedBuildInputs = with self; [ numpy scipy ]; + + # Tests cannot import pyfftw. pyfftw works fine though. + doCheck = false; + + LDFLAGS="-L${pkgs.fftw}/lib -L${pkgs.fftwFloat}/lib -L${pkgs.fftwLongDouble}/lib" + CFLAGS="-I${pkgs.fftw}/include -I${pkgs.fftwFloat}/include -I${pkgs.fftwLongDouble}/include" + ''; + + meta = { + description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms"; + homepage = http://hgomersall.github.com/pyFFTW/; + license = with licenses; [ bsd2 bsd3 ]; + maintainer = with maintainers; [ fridh ]; + }; +}; +``` +Note also the line `doCheck = false;`, we explicitly disabled running the test-suite. + + +#### Develop local package + +As a Python developer you're likely aware of [development mode](http://pythonhosted.org/setuptools/setuptools.html#development-mode) (`python setup.py develop`); +instead of installing the package this command creates a special link to the project code. +That way, you can run updated code without having to reinstall after each and every change you make. +Development mode is also available on Nix as [explained](http://nixos.org/nixpkgs/manual/#ssec-python-development) in the Nixpkgs manual. +Let's see how you can use it. + +In the previous Nix expression the source was fetched from an url. We can also refer to a local source instead using + +```nix +src = ./path/to/source/tree; +``` + +If we create a `shell.nix` file which calls `buildPythonPackage`, and if `src` +is a local source, and if the local source has a `setup.py`, then development +mode is activated. + +In the following example we create a simple environment that +has a Python 3.5 version of our package in it, as well as its dependencies and +other packages we like to have in the environment, all specified with `propagatedBuildInputs`. +Indeed, we can just add any package we like to have in our environment to `propagatedBuildInputs`. + +```nix +with import ; +with pkgs.python35Packages; + +buildPythonPackage rec { + name = "mypackage"; + src = ./path/to/package/source; + propagatedBuildInputs = [ pytest numpy pkgs.libsndfile ]; +}; +``` + +It is important to note that due to how development mode is implemented on Nix it is not possible to have multiple packages simultaneously in development mode. + + +### Organising your packages + +So far we discussed how you can use Python on Nix, and how you can develop with +it. We've looked at how you write expressions to package Python packages, and we +looked at how you can create environments in which specified packages are +available. + +At some point you'll likely have multiple packages which you would +like to be able to use in different projects. In order to minimise unnecessary +duplication we now look at how you can maintain yourself a repository with your +own packages. The important functions here are `import` and `callPackage`. + +### Including a derivation using `callPackage` + +Earlier we created a Python environment using `buildEnv`, and included the +`toolz` package via a `let` expression. +Let's split the package definition from the environment definition. + +We first create a function that builds `toolz` in `~/path/to/toolz/release.nix` + +```nix +{ pkgs, buildPythonPackage }: + +buildPythonPackage rec { + name = "toolz-${version}"; + version = "0.7.4"; + + src = pkgs.fetchurl{ + url = "https://pypi.python.org/packages/source/t/toolz/toolz-${version}.tar.gz"; + sha256 = "43c2c9e5e7a16b6c88ba3088a9bfc82f7db8e13378be7c78d6c14a5f8ed05afd"; + }; + + meta = { + homepage = "http://github.com/pytoolz/toolz/"; + description = "List processing tools and functional utilities"; + license = licenses.bsd3; + maintainers = with maintainers; [ fridh ]; + }; +}; +``` + +It takes two arguments, `pkgs` and `buildPythonPackage`. +We now call this function using `callPackage` in the definition of our environment + +```nix +with import {}; + +( let + toolz = pkgs.callPackage ~/path/to/toolz/release.nix { pkgs=pkgs; buildPythonPackage=pkgs.python35Packages.buildPythonPackage; }; + in pkgs.python35.buildEnv.override rec { + extraLibs = [ pkgs.python35Packages.numpy toolz ]; +} +).env +``` + +Important to remember is that the Python version for which the package is made +depends on the `python` derivation that is passed to `buildPythonPackage`. Nix +tries to automatically pass arguments when possible, which is why generally you +don't explicitly define which `python` derivation should be used. In the above +example we use `buildPythonPackage` that is part of the set `python35Packages`, +and in this case the `python35` interpreter is automatically used. + + + +## Reference + +### Interpreters + +Versions 2.6, 2.7, 3.3, 3.4 and 3.5 of the CPython interpreter are available on +Nix and are available as `python26`, `python27`, `python33`, `python34` and +`python35`. The PyPy interpreter is also available as `pypy`. Currently, the +aliases `python` and `python3` correspond to respectively `python27` and +`python35`. The Nix expressions for the interpreters can be found in +`pkgs/development/interpreters/python`. + + +#### Missing modules standard library + +The interpreters `python26` and `python27` do not include modules that +require external dependencies. This is done in order to reduce the closure size. +The following modules need to be added as `buildInput` explicitly: + +* `python.modules.bsddb` +* `python.modules.curses` +* `python.modules.curses_panel` +* `python.modules.crypt` +* `python.modules.gdbm` +* `python.modules.sqlite3` +* `python.modules.tkinter` +* `python.modules.readline` + +For convenience `python27Full` and `python26Full` are provided with all +modules included. + +All packages depending on any Python interpreter get appended +`out/{python.sitePackages}` to `$PYTHONPATH` if such directory +exists. + +#### Attributes on interpreters packages + +Each interpreter has the following attributes: + +- `libPrefix`. Name of the folder in `${python}/lib/` for corresponding interpreter. +- `interpreter`. Alias for `${python}/bin/${executable}`. +- `buildEnv`. Function to build python interpreter environments with extra packages bundled together. See section *python.buildEnv function* for usage and documentation. +- `sitePackages`. Alias for `lib/${libPrefix}/site-packages`. +- `executable`. Name of the interpreter executable, ie `python3.4`. + +### Building packages and applications + +Python packages (libraries) and applications that use `setuptools` or +`distutils` are typically built with respectively the `buildPythonPackage` and +`buildPythonApplication` functions. + +All Python packages reside in `pkgs/top-level/python-packages.nix` and all +applications elsewhere. Some packages are also defined in +`pkgs/development/python-modules`. It is important that these packages are +called in `pkgs/top-level/python-packages.nix` and not elsewhere, to guarantee +the right version of the package is built. + +Based on the packages defined in `pkgs/top-level/python-packages.nix` an +attribute set is created for each available Python interpreter. The available +sets are + +* `pkgs.python26Packages` +* `pkgs.python27Packages` +* `pkgs.python33Packages` +* `pkgs.python34Packages` +* `pkgs.python35Packages` +* `pkgs.pypyPackages` + +and the aliases + +* `pkgs.pythonPackages` pointing to `pkgs.python27Packages` +* `pkgs.python3Packages` pointing to `pkgs.python35Packages` + +#### `buildPythonPackage` function + +The `buildPythonPackage` function is implemented in +`pkgs/development/python-modules/generic/default.nix` + +and can be used as: + + twisted = buildPythonPackage { + name = "twisted-8.1.0"; + + src = pkgs.fetchurl { + url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2; + sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl"; + }; + + propagatedBuildInputs = [ self.ZopeInterface ]; + + meta = { + homepage = http://twistedmatrix.com/; + description = "Twisted, an event-driven networking engine written in Python"; + license = stdenv.lib.licenses.mit; }; + }; + +The `buildPythonPackage` mainly does four things: + +* In the `buildPhase`, it calls `${python.interpreter} setup.py bdist_wheel` to build a wheel binary zipfile. +* In the `installPhase`, it installs the wheel file using `pip install *.whl`. +* In the `postFixup` phase, the `wrapPythonPrograms` bash function is called to wrap all programs in the `$out/bin/*` directory to include `$PYTHONPATH` and `$PATH` environment variables. +* In the `installCheck` phase, `${python.interpreter} setup.py test` is ran. + +As in Perl, dependencies on other Python packages can be specified in the +`buildInputs` and `propagatedBuildInputs` attributes. If something is +exclusively a build-time dependency, use `buildInputs`; if it’s (also) a runtime +dependency, use `propagatedBuildInputs`. + +By default tests are run because `doCheck = true`. Test dependencies, like +e.g. the test runner, should be added to `buildInputs`. + +By default `meta.platforms` is set to the same value +as the interpreter unless overriden otherwise. + +##### `buildPythonPackage` parameters + +All parameters from `mkDerivation` function are still supported. + +* `namePrefix`: Prepended text to `${name}` parameter. Defaults to `"python3.3-"` for Python 3.3, etc. Set it to `""` if you're packaging an application or a command line tool. +* `disabled`: If `true`, package is not build for particular python interpreter version. Grep around `pkgs/top-level/python-packages.nix` for examples. +* `setupPyBuildFlags`: List of flags passed to `setup.py build_ext` command. +* `pythonPath`: List of packages to be added into `$PYTHONPATH`. Packages in `pythonPath` are not propagated (contrary to `propagatedBuildInputs`). +* `preShellHook`: Hook to execute commands before `shellHook`. +* `postShellHook`: Hook to execute commands after `shellHook`. +* `makeWrapperArgs`: A list of strings. Arguments to be passed to `makeWrapper`, which wraps generated binaries. By default, the arguments to `makeWrapper` set `PATH` and `PYTHONPATH` environment variables before calling the binary. Additional arguments here can allow a developer to set environment variables which will be available when the binary is run. For example, `makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]`. +* `installFlags`: A list of strings. Arguments to be passed to `pip install`. To pass options to `python setup.py install`, use `--install-option`. E.g., `installFlags=["--install-option='--cpp_implementation'"]. + +#### `buildPythonApplication` function + +The `buildPythonApplication` function is practically the same as `buildPythonPackage`. +The difference is that `buildPythonPackage` by default prefixes the names of the packages with the version of the interpreter. +Because with an application we're not interested in multiple version the prefix is dropped. + +#### python.buildEnv function + +Python environments can be created using the low-level `pkgs.buildEnv` function. +This example shows how to create an environment that has the Pyramid Web Framework. +Saving the following as `default.nix` + + with import {}; + + python.buildEnv.override { + extraLibs = [ pkgs.pythonPackages.pyramid ]; + ignoreCollisions = true; + } + +and running `nix-build` will create + + /nix/store/cf1xhjwzmdki7fasgr4kz6di72ykicl5-python-2.7.8-env + +with wrapped binaries in `bin/`. + +You can also use the `env` attribute to create local environments with needed +packages installed. This is somewhat comparable to `virtualenv`. For example, +running `nix-shell` with the following `shell.nix` + + with import {}; + + (python3.buildEnv.override { + extraLibs = with python3Packages; [ numpy requests ]; + }).env + +will drop you into a shell where Python will have the +specified packages in its path. + + +##### `python.buildEnv` arguments + +* `extraLibs`: List of packages installed inside the environment. +* `postBuild`: Shell command executed after the build of environment. +* `ignoreCollisions`: Ignore file collisions inside the environment (default is `false`). + +### Development mode + +Development or editable mode is supported. To develop Python packages +`buildPythonPackage` has additional logic inside `shellPhase` to run `pip +install -e . --prefix $TMPDIR/`for the package. + +Warning: `shellPhase` is executed only if `setup.py` exists. + +Given a `default.nix`: + + with import {}; + + buildPythonPackage { name = "myproject"; + + buildInputs = with pkgs.pythonPackages; [ pyramid ]; + + src = ./.; } + +Running `nix-shell` with no arguments should give you +the environment in which the package would be build with +`nix-build`. + +Shortcut to setup environments with C headers/libraries and python packages: + + $ nix-shell -p pythonPackages.pyramid zlib libjpeg git + +Note: There is a boolean value `lib.inNixShell` set to `true` if nix-shell is invoked. + +### Tools + +Packages inside nixpkgs are written by hand. However many tools exist in +community to help save time. No tool is preferred at the moment. + +- [python2nix](https://github.com/proger/python2nix) by Vladimir Kirillov +- [pypi2nix](https://github.com/garbas/pypi2nix) by Rok Garbas +- [pypi2nix](https://github.com/offlinehacker/pypi2nix) by Jaka Hudoklin + +## FAQ + +### How to solve circular dependencies? + +Consider the packages `A` and `B` that depend on each other. When packaging `B`, +a solution is to override package `A` not to depend on `B` as an input. The same +should also be done when packaging `A`. + +### `install_data` / `data_files` problems + +If you get the following error: + + could not create '/nix/store/6l1bvljpy8gazlsw2aw9skwwp4pmvyxw-python-2.7.8/etc': + Permission denied + +This is a [known bug](https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix) in setuptools. +Setuptools `install_data` does not respect `--prefix`. An example of such package using the feature is `pkgs/tools/X11/xpra/default.nix`. +As workaround install it as an extra `preInstall` step: + + ${python.interpreter} setup.py install_data --install-dir=$out --root=$out + sed -i '/ = data\_files/d' setup.py + + +### Rationale of non-existent global site-packages + +On most operating systems a global `site-packages` is maintained. This however +becomes problematic if you want to run multiple Python versions or have multiple +versions of certain libraries for your projects. Generally, you would solve such +issues by creating virtual environments using `virtualenv`. + +On Nix each package has an isolated dependency tree which, in the case of +Python, guarantees the right versions of the interpreter and libraries or +packages are available. There is therefore no need to maintain a global `site-packages`. + +If you want to create a Python environment for development, then the recommended +method is to use `nix-shell`, either with or without the `python.buildEnv` +function. + + +## Contributing + +### Contributing guidelines + +Following rules are desired to be respected: + +* Make sure package builds for all python interpreters. Use `disabled` argument to `buildPythonPackage` to set unsupported interpreters. +* If tests need to be disabled for a package, make sure you leave a comment about reasoning. +* Packages in `pkgs/top-level/python-packages.nix` are sorted quasi-alphabetically to avoid merge conflicts. +* Python libraries are supposed to be in `python-packages.nix` and packaged with `buildPythonPackage`. Python applications live outside of `python-packages.nix` and are packaged with `buildPythonApplication`. diff --git a/doc/languages-frameworks/python.xml b/doc/languages-frameworks/python.xml deleted file mode 100644 index 57aceeb4868..00000000000 --- a/doc/languages-frameworks/python.xml +++ /dev/null @@ -1,447 +0,0 @@ -
- -Python - - - Currently supported interpreters are python26, python27, - python33, python34, python35 - and pypy. - - - - python is an alias to python27 and python3 is an alias to python34. - - - - python26 and python27 do not include modules that require - external dependencies (to reduce dependency bloat). Following modules need to be added as - buildInput explicitly: - - - - python.modules.bsddb - python.modules.curses - python.modules.curses_panel - python.modules.crypt - python.modules.gdbm - python.modules.sqlite3 - python.modules.tkinter - python.modules.readline - - -For convenience python27Full and python26Full -are provided with all modules included. - - - Python packages that - use setuptools or distutils, - can be built using the buildPythonPackage function as documented below. - - - - All packages depending on any Python interpreter get appended $out/${python.sitePackages} - to $PYTHONPATH if such directory exists. - - - - - Useful attributes on interpreters packages: - - - - libPrefix - - Name of the folder in ${python}/lib/ for corresponding interpreter. - - - - - interpreter - - Alias for ${python}/bin/${executable}. - - - - - buildEnv - - Function to build python interpreter environments with extra packages bundled together. - See for usage and documentation. - - - - - sitePackages - - Alias for lib/${libPrefix}/site-packages. - - - - - executable - - Name of the interpreter executable, ie python3.4. - - - - -
<varname>buildPythonPackage</varname> function - - - The function is implemented in - pkgs/development/python-modules/generic/default.nix. - Example usage: - - -twisted = buildPythonPackage { - name = "twisted-8.1.0"; - - src = pkgs.fetchurl { - url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2; - sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl"; - }; - - propagatedBuildInputs = [ self.ZopeInterface ]; - - meta = { - homepage = http://twistedmatrix.com/; - description = "Twisted, an event-driven networking engine written in Python"; - license = stdenv.lib.licenses.mit; - }; -}; - - - Most of Python packages that use buildPythonPackage are defined - in pkgs/top-level/python-packages.nix - and generated for each python interpreter separately into attribute sets python26Packages, - python27Packages, python35Packages, python33Packages, - python34Packages and pypyPackages. - - - - buildPythonPackage mainly does four things: - - - - In the buildPhase, it calls - ${python.interpreter} setup.py bdist_wheel to build a wheel binary zipfile. - - - - In the installPhase, it installs the wheel file using - pip install *.whl. - - - - In the postFixup phase, wrapPythonPrograms - bash function is called to wrap all programs in $out/bin/* - directory to include $PYTHONPATH and $PATH - environment variables. - - - - In the installCheck phase, ${python.interpreter} setup.py test - is ran. - - - - - By default doCheck = true is set - - - As in Perl, dependencies on other Python packages can be specified in the - buildInputs and - propagatedBuildInputs attributes. If something is - exclusively a build-time dependency, use - buildInputs; if it’s (also) a runtime dependency, - use propagatedBuildInputs. - - - - By default meta.platforms is set to the same value - as the interpreter unless overriden otherwise. - - - - - <varname>buildPythonPackage</varname> parameters - (all parameters from <varname>mkDerivation</varname> function are still supported) - - - - namePrefix - - Prepended text to ${name} parameter. - Defaults to "python3.3-" for Python 3.3, etc. Set it to - "" - if you're packaging an application or a command line tool. - - - - - disabled - - If true, package is not build for - particular python interpreter version. Grep around - pkgs/top-level/python-packages.nix - for examples. - - - - - setupPyBuildFlags - - List of flags passed to setup.py build_ext command. - - - - - pythonPath - - List of packages to be added into $PYTHONPATH. - Packages in pythonPath are not propagated - (contrary to propagatedBuildInputs). - - - - - preShellHook - - Hook to execute commands before shellHook. - - - - - postShellHook - - Hook to execute commands after shellHook. - - - - - makeWrapperArgs - - A list of strings. Arguments to be passed to - makeWrapper, which wraps generated binaries. By - default, the arguments to makeWrapper set - PATH and PYTHONPATH environment - variables before calling the binary. Additional arguments here can - allow a developer to set environment variables which will be - available when the binary is run. For example, - makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]. - - - - - -
- -
<function>python.buildEnv</function> function - - Create Python environments using low-level pkgs.buildEnv function. Example default.nix: - - - {}; - -python.buildEnv.override { - extraLibs = [ pkgs.pythonPackages.pyramid ]; - ignoreCollisions = true; -}]]> - - - Running nix-build will create - /nix/store/cf1xhjwzmdki7fasgr4kz6di72ykicl5-python-2.7.8-env - with wrapped binaries in bin/. - - - - You can also use env attribute to create local - environments with needed packages installed (somewhat comparable to - virtualenv). For example, with the following - shell.nix: - - - {}; - -(python3.buildEnv.override { - extraLibs = with python3Packages; - [ numpy - requests - ]; -}).env]]> - - - Running nix-shell will drop you into a shell where - python will have specified packages in its path. - - - - - <function>python.buildEnv</function> arguments - - - - extraLibs - - List of packages installed inside the environment. - - - - - postBuild - - Shell command executed after the build of environment. - - - - - ignoreCollisions - - Ignore file collisions inside the environment (default is false). - - - -
- -
Tools - -Packages inside nixpkgs are written by hand. However many tools -exist in community to help save time. No tool is preferred at the moment. - - - - - - python2nix - by Vladimir Kirillov - - - - pypi2nix - by Rok Garbas - - - - pypi2nix - by Jaka Hudoklin - - - - -
- -
Development - - - To develop Python packages buildPythonPackage has - additional logic inside shellPhase to run - pip install -e . --prefix $TMPDIR/ for the package. - - - shellPhase is executed only if setup.py - exists. - - - Given a default.nix: - - - {}; - -buildPythonPackage { - name = "myproject"; - - buildInputs = with pkgs.pythonPackages; [ pyramid ]; - - src = ./.; -}]]> - - - Running nix-shell with no arguments should give you - the environment in which the package would be build with - nix-build. - - - - Shortcut to setup environments with C headers/libraries and python packages: - - $ nix-shell -p pythonPackages.pyramid zlib libjpeg git - - - - There is a boolean value lib.inNixShell set to - true if nix-shell is invoked. - - -
- -
FAQ - - - - - How to solve circular dependencies? - - If you have packages A and B that - depend on each other, when packaging B override package - A not to depend on B as input - (and also the other way around). - - - - - install_data / data_files problems resulting into error: could not create '/nix/store/6l1bvljpy8gazlsw2aw9skwwp4pmvyxw-python-2.7.8/etc': Permission denied - - - Known bug in setuptools install_data does not respect --prefix. Example of - such package using the feature is pkgs/tools/X11/xpra/default.nix. As workaround - install it as an extra preInstall step: - - ${python.interpreter} setup.py install_data --install-dir=$out --root=$out -sed -i '/ = data_files/d' setup.py - - - - - Rationale of non-existent global site-packages - - There is no need to have global site-packages in Nix. Each package has isolated - dependency tree and installing any python package will only populate $PATH - inside user environment. See to create self-contained - interpreter with a set of packages. - - - - - -
- - -
Contributing guidelines - - Following rules are desired to be respected: - - - - - - Make sure package builds for all python interpreters. Use disabled argument to - buildPythonPackage to set unsupported interpreters. - - - - If tests need to be disabled for a package, make sure you leave a comment about reasoning. - - - - Packages in pkgs/top-level/python-packages.nix - are sorted quasi-alphabetically to avoid merge conflicts. - - - - -
- -
- From 9310bd15de5eed356f36bf3c5dcab0a2d5957a37 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 5 Mar 2016 18:01:23 -0500 Subject: [PATCH 24/76] Revert "Documentation: rewrite Python docs" --- doc/default.nix | 6 - doc/languages-frameworks/python.md | 668 ---------------------------- doc/languages-frameworks/python.xml | 447 +++++++++++++++++++ 3 files changed, 447 insertions(+), 674 deletions(-) delete mode 100644 doc/languages-frameworks/python.md create mode 100644 doc/languages-frameworks/python.xml diff --git a/doc/default.nix b/doc/default.nix index 203555de131..196b9e44539 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -45,10 +45,6 @@ stdenv.mkDerivation { + toDocbook { inputFile = ./introduction.md; outputFile = "introduction.xml"; - } - + toDocbook { - inputFile = ./languages-frameworks/python.md; - outputFile = "./languages-frameworks/python.xml"; useChapters = true; } + toDocbook { @@ -65,8 +61,6 @@ stdenv.mkDerivation { outputFile = "languages-frameworks/r.xml"; } + '' - cat -n languages-frameworks/python.xml - echo ${nixpkgsVersion} > .version xmllint --noout --nonet --xinclude --noxincludenode \ diff --git a/doc/languages-frameworks/python.md b/doc/languages-frameworks/python.md deleted file mode 100644 index d05cabac3ff..00000000000 --- a/doc/languages-frameworks/python.md +++ /dev/null @@ -1,668 +0,0 @@ -# Python - -## User Guide - -Several versions of Python are available on Nix as well as a high amount of -packages. The default interpreter is CPython 2.7. - -### Using Python - -#### Installing Python and packages - -It is important to make a distinction between Python packages that are -used as libraries, and applications that are written in Python. - -Applications on Nix are installed typically into your user -profile imperatively using `nix-env -i`, and on NixOS declaratively by adding the -package name to `environment.systemPackages` in `/etc/nixos/configuration.nix`. -Dependencies such as libraries are automatically installed and should not be -installed explicitly. - -The same goes for Python applications and libraries. Python applications can be -installed in your profile, but Python libraries you would like to use to develop -cannot. If you do install libraries in your profile, then you will end up with -import errors. - -#### Python environments using `nix-shell` - -The recommended method for creating Python environments for development is with -`nix-shell`. Executing - -```sh -$ nix-shell -p python35Packages.numpy python35Packages.toolz -``` - -opens a Nix shell which has available the requested packages and dependencies. -Now you can launch the Python interpreter (which is itself a dependency) - -```sh -[nix-shell:~] python3 -``` - -If the packages were not available yet in the Nix store, Nix would download or -build them automatically. A convenient option with `nix-shell` is the `--run` -option, with which you can execute a command in the `nix-shell`. Let's say we -want the above environment and directly run the Python interpreter - -```sh -$ nix-shell -p python35Packages.numpy python35Packages.toolz --run "python3" -``` - -This way you can use the `--run` option also to directly run a script - -```sh -$ nix-shell -p python35Packages.numpy python35Packages.toolz --run "python3 myscript.py" -``` - -In fact, for this specific use case there is a more convenient method. You can -add a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) to your script -specifying which dependencies Nix shell needs. With the following shebang, you -can use `nix-shell myscript.py` and it will make available all dependencies and -run the script in the `python3` shell. - -```py -#! /usr/bin/env nix-shell -#! nix-shell -i python3 -p python3Packages.numpy - -import numpy - -print(numpy.__version__) -``` - -Likely you do not want to type your dependencies each and every time. What you -can do is write a simple Nix expression which sets up an environment for you, -requiring you only to type `nix-shell`. Say we want to have Python 3.5, `numpy` -and `toolz`, like before, in an environment. With a `shell.nix` file -containing - -```nix -with import {}; - -(pkgs.python35.buildEnv.override { - extraLibs = with pkgs.python35Packages; [ numpy toolz ]; -}).env -``` -executing `nix-shell` gives you again a Nix shell from which you can run Python. - -What's happening here? - -1. We begin with importing the Nix Packages collections. `import ` import the `` function, `{}` calls it and the `with` statement brings all attributes of `nixpkgs` in the local scope. Therefore we can now use `pkgs`. -2. Then we create a Python 3.5 environment with `pkgs.buildEnv`. Because we want to use it with a custom set of Python packages, we override it. -3. The `extraLibs` argument of the original `buildEnv` function can be used to specify which packages should be included. We want `numpy` and `toolz`. Again, we use the `with` statement to bring a set of attributes into the local scope. -4. And finally, for in interactive use we return the environment. - -### Developing with Python - - -Now that you know how to get a working Python environment on Nix, it is time to go forward and start actually developing with Python. -We will first have a look at how Python packages are packaged on Nix. Then, we will look how you can use development mode with your code. - -#### Python packaging on Nix - -On Nix all packages are built by functions. The main function in Nix for building Python packages is [`buildPythonPackage`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/generic/default.nix). -Let's see how we would build the `toolz` package. According to [`python-packages.nix`](https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/python-packages.nix) `toolz` is build using - -```nix -toolz = buildPythonPackage rec{ - name = "toolz-${version}"; - version = "0.7.4"; - - src = pkgs.fetchurl{ - url = "https://pypi.python.org/packages/source/t/toolz/toolz-${version}.tar.gz"; - sha256 = "43c2c9e5e7a16b6c88ba3088a9bfc82f7db8e13378be7c78d6c14a5f8ed05afd"; - }; - - meta = { - homepage = "http://github.com/pytoolz/toolz/"; - description = "List processing tools and functional utilities"; - license = licenses.bsd3; - maintainers = with maintainers; [ fridh ]; - }; -}; -``` - -What happens here? The function `buildPythonPackage` is called and as argument -it accepts a set. In this case the set is a recursive set ([`rec`](http://nixos.org/nix/manual/#sec-constructs)). -One of the arguments is the name of the package, which consists of a basename -(generally following the name on PyPi) and a version. Another argument, `src` -specifies the source, which in this case is fetched from an url. `fetchurl` not -only downloads the target file, but also validates its hash. Furthermore, we -specify some (optional) [meta information](http://nixos.org/nixpkgs/manual/#chap-meta). - -The output of the function is a derivation, which is an attribute with the name -`toolz` of the set `pythonPackages`. Actually, sets are created for all interpreter versions, -so `python27Packages`, `python34Packages`, `python35Packages` and `pypyPackages`. - -The above example works when you're directly working on -`pkgs/top-level/python-packages.nix` in the Nixpkgs repository. Often though, -you will want to test a Nix expression outside of the Nixpkgs tree. If you -create a `shell.nix` file with the following contents - -```nix -with import {}; - -pkgs.python35Packages.buildPythonPackage rec { - name = "toolz-${version}"; - version = "0.7.4"; - - src = pkgs.fetchurl{ - url = "https://pypi.python.org/packages/source/t/toolz/toolz-${version}.tar.gz"; - sha256 = "43c2c9e5e7a16b6c88ba3088a9bfc82f7db8e13378be7c78d6c14a5f8ed05afd"; - }; - - meta = { - homepage = "http://github.com/pytoolz/toolz/"; - description = "List processing tools and functional utilities"; - license = licenses.bsd3; - maintainers = with maintainers; [ fridh ]; - }; -} -``` - -and then execute `nix-shell` will result in an environment in which you can use -Python 3.5 and the `toolz` package. As you can see we had to explicitly mention -for which Python version we want to build a package. - -The above example considered only a single package. Generally you will want to use multiple packages. -If we create a `shell.nix` file with the following contents - -```nix -with import {}; - -( let - toolz = pkgs.python35Packages.buildPythonPackage rec { - name = "toolz-${version}"; - version = "0.7.4"; - - src = pkgs.fetchurl{ - url = "https://pypi.python.org/packages/source/t/toolz/toolz-${version}.tar.gz"; - sha256 = "43c2c9e5e7a16b6c88ba3088a9bfc82f7db8e13378be7c78d6c14a5f8ed05afd"; - }; - - meta = { - homepage = "http://github.com/pytoolz/toolz/"; - description = "List processing tools and functional utilities"; - license = licenses.bsd3; - maintainers = with maintainers; [ fridh ]; - }; - }; - - in pkgs.python35.buildEnv.override rec { - - extraLibs = [ pkgs.python35Packages.numpy toolz ]; -} -).env -``` - -and again execute `nix-shell`, then we get a Python 3.5 environment with our -locally defined package as well as `numpy` which is build according to the -definition in Nixpkgs. What did we do here? Well, we took the Nix expression -that we used earlier to build a Python environment, and said that we wanted to -include our own version of `toolz`. To introduce our own package in the scope of -`buildEnv.override` we used a -[`let`](http://nixos.org/nix/manual/#sec-constructs) expression. - -### Handling dependencies - -Our example, `toolz`, doesn't have any dependencies on other Python -packages or system libraries. According to the manual, `buildPythonPackage` -uses the arguments `buildInputs` and `propagatedBuildInputs` to specify dependencies. If something is -exclusively a build-time dependency, then the dependency should be included as a -`buildInput`, but if it is (also) a runtime dependency, then it should be added -to `propagatedBuildInputs`. Test dependencies are considered build-time dependencies. - -The following example shows which arguments are given to `buildPythonPackage` in -order to build [`datashape`](https://github.com/blaze/datashape). - -```nix -datashape = buildPythonPackage rec { - name = "datashape-${version}"; - version = "0.4.7"; - - src = pkgs.fetchurl { - url = "https://pypi.python.org/packages/source/D/DataShape/${name}.tar.gz"; - sha256 = "14b2ef766d4c9652ab813182e866f493475e65e558bed0822e38bf07bba1a278"; - }; - - buildInputs = with self; [ pytest ]; - propagatedBuildInputs = with self; [ numpy multipledispatch dateutil ]; - - meta = { - homepage = https://github.com/ContinuumIO/datashape; - description = "A data description language"; - license = licenses.bsd2; - maintainers = with maintainers; [ fridh ]; - }; -}; -``` - -We can see several runtime dependencies, `numpy`, `multipledispatch`, and -`dateutil`. Furthermore, we have one `buildInput`, i.e. `pytest`. `pytest` is a -test runner and is only used during the `checkPhase` and is therefore not added -to `propagatedBuildInputs`. - -In the previous case we had only dependencies on other Python packages to consider. -Occasionally you have also system libraries to consider. E.g., `lxml` provides -Python bindings to `libxml2` and `libxslt`. These libraries are only required -when building the bindings and are therefore added as `buildInputs`. - -```nix -lxml = buildPythonPackage rec { - name = "lxml-3.4.4"; - - src = pkgs.fetchurl { - url = "http://pypi.python.org/packages/source/l/lxml/${name}.tar.gz"; - sha256 = "16a0fa97hym9ysdk3rmqz32xdjqmy4w34ld3rm3jf5viqjx65lxk"; - }; - - buildInputs = with self; [ pkgs.libxml2 pkgs.libxslt ]; - - meta = { - description = "Pythonic binding for the libxml2 and libxslt libraries"; - homepage = http://lxml.de; - license = licenses.bsd3; - maintainers = with maintainers; [ sjourdois ]; - }; -}; -``` - -In this example `lxml` and Nix are able to work out exactly where the relevant -files of the dependencies are. This is not always the case. - -The example below shows bindings to The Fastest Fourier Transform in the West, commonly known as -FFTW. On Nix we have separate packages of FFTW for the different types of floats -(`"single"`, `"double"`, `"long-double"`). The bindings need all three types, -and therefore we add all three as `buildInputs`. The bindings don't expect to -find each of them in a different folder, and therefore we have to set `LDFLAGS` -and `CFLAGS`. - -```nix -pyfftw = buildPythonPackage rec { - name = "pyfftw-${version}"; - version = "0.9.2"; - - src = pkgs.fetchurl { - url = "https://pypi.python.org/packages/source/p/pyFFTW/pyFFTW-${version}.tar.gz"; - sha256 = "f6bbb6afa93085409ab24885a1a3cdb8909f095a142f4d49e346f2bd1b789074"; - }; - - buildInputs = [ pkgs.fftw pkgs.fftwFloat pkgs.fftwLongDouble]; - - propagatedBuildInputs = with self; [ numpy scipy ]; - - # Tests cannot import pyfftw. pyfftw works fine though. - doCheck = false; - - LDFLAGS="-L${pkgs.fftw}/lib -L${pkgs.fftwFloat}/lib -L${pkgs.fftwLongDouble}/lib" - CFLAGS="-I${pkgs.fftw}/include -I${pkgs.fftwFloat}/include -I${pkgs.fftwLongDouble}/include" - ''; - - meta = { - description = "A pythonic wrapper around FFTW, the FFT library, presenting a unified interface for all the supported transforms"; - homepage = http://hgomersall.github.com/pyFFTW/; - license = with licenses; [ bsd2 bsd3 ]; - maintainer = with maintainers; [ fridh ]; - }; -}; -``` -Note also the line `doCheck = false;`, we explicitly disabled running the test-suite. - - -#### Develop local package - -As a Python developer you're likely aware of [development mode](http://pythonhosted.org/setuptools/setuptools.html#development-mode) (`python setup.py develop`); -instead of installing the package this command creates a special link to the project code. -That way, you can run updated code without having to reinstall after each and every change you make. -Development mode is also available on Nix as [explained](http://nixos.org/nixpkgs/manual/#ssec-python-development) in the Nixpkgs manual. -Let's see how you can use it. - -In the previous Nix expression the source was fetched from an url. We can also refer to a local source instead using - -```nix -src = ./path/to/source/tree; -``` - -If we create a `shell.nix` file which calls `buildPythonPackage`, and if `src` -is a local source, and if the local source has a `setup.py`, then development -mode is activated. - -In the following example we create a simple environment that -has a Python 3.5 version of our package in it, as well as its dependencies and -other packages we like to have in the environment, all specified with `propagatedBuildInputs`. -Indeed, we can just add any package we like to have in our environment to `propagatedBuildInputs`. - -```nix -with import ; -with pkgs.python35Packages; - -buildPythonPackage rec { - name = "mypackage"; - src = ./path/to/package/source; - propagatedBuildInputs = [ pytest numpy pkgs.libsndfile ]; -}; -``` - -It is important to note that due to how development mode is implemented on Nix it is not possible to have multiple packages simultaneously in development mode. - - -### Organising your packages - -So far we discussed how you can use Python on Nix, and how you can develop with -it. We've looked at how you write expressions to package Python packages, and we -looked at how you can create environments in which specified packages are -available. - -At some point you'll likely have multiple packages which you would -like to be able to use in different projects. In order to minimise unnecessary -duplication we now look at how you can maintain yourself a repository with your -own packages. The important functions here are `import` and `callPackage`. - -### Including a derivation using `callPackage` - -Earlier we created a Python environment using `buildEnv`, and included the -`toolz` package via a `let` expression. -Let's split the package definition from the environment definition. - -We first create a function that builds `toolz` in `~/path/to/toolz/release.nix` - -```nix -{ pkgs, buildPythonPackage }: - -buildPythonPackage rec { - name = "toolz-${version}"; - version = "0.7.4"; - - src = pkgs.fetchurl{ - url = "https://pypi.python.org/packages/source/t/toolz/toolz-${version}.tar.gz"; - sha256 = "43c2c9e5e7a16b6c88ba3088a9bfc82f7db8e13378be7c78d6c14a5f8ed05afd"; - }; - - meta = { - homepage = "http://github.com/pytoolz/toolz/"; - description = "List processing tools and functional utilities"; - license = licenses.bsd3; - maintainers = with maintainers; [ fridh ]; - }; -}; -``` - -It takes two arguments, `pkgs` and `buildPythonPackage`. -We now call this function using `callPackage` in the definition of our environment - -```nix -with import {}; - -( let - toolz = pkgs.callPackage ~/path/to/toolz/release.nix { pkgs=pkgs; buildPythonPackage=pkgs.python35Packages.buildPythonPackage; }; - in pkgs.python35.buildEnv.override rec { - extraLibs = [ pkgs.python35Packages.numpy toolz ]; -} -).env -``` - -Important to remember is that the Python version for which the package is made -depends on the `python` derivation that is passed to `buildPythonPackage`. Nix -tries to automatically pass arguments when possible, which is why generally you -don't explicitly define which `python` derivation should be used. In the above -example we use `buildPythonPackage` that is part of the set `python35Packages`, -and in this case the `python35` interpreter is automatically used. - - - -## Reference - -### Interpreters - -Versions 2.6, 2.7, 3.3, 3.4 and 3.5 of the CPython interpreter are available on -Nix and are available as `python26`, `python27`, `python33`, `python34` and -`python35`. The PyPy interpreter is also available as `pypy`. Currently, the -aliases `python` and `python3` correspond to respectively `python27` and -`python35`. The Nix expressions for the interpreters can be found in -`pkgs/development/interpreters/python`. - - -#### Missing modules standard library - -The interpreters `python26` and `python27` do not include modules that -require external dependencies. This is done in order to reduce the closure size. -The following modules need to be added as `buildInput` explicitly: - -* `python.modules.bsddb` -* `python.modules.curses` -* `python.modules.curses_panel` -* `python.modules.crypt` -* `python.modules.gdbm` -* `python.modules.sqlite3` -* `python.modules.tkinter` -* `python.modules.readline` - -For convenience `python27Full` and `python26Full` are provided with all -modules included. - -All packages depending on any Python interpreter get appended -`out/{python.sitePackages}` to `$PYTHONPATH` if such directory -exists. - -#### Attributes on interpreters packages - -Each interpreter has the following attributes: - -- `libPrefix`. Name of the folder in `${python}/lib/` for corresponding interpreter. -- `interpreter`. Alias for `${python}/bin/${executable}`. -- `buildEnv`. Function to build python interpreter environments with extra packages bundled together. See section *python.buildEnv function* for usage and documentation. -- `sitePackages`. Alias for `lib/${libPrefix}/site-packages`. -- `executable`. Name of the interpreter executable, ie `python3.4`. - -### Building packages and applications - -Python packages (libraries) and applications that use `setuptools` or -`distutils` are typically built with respectively the `buildPythonPackage` and -`buildPythonApplication` functions. - -All Python packages reside in `pkgs/top-level/python-packages.nix` and all -applications elsewhere. Some packages are also defined in -`pkgs/development/python-modules`. It is important that these packages are -called in `pkgs/top-level/python-packages.nix` and not elsewhere, to guarantee -the right version of the package is built. - -Based on the packages defined in `pkgs/top-level/python-packages.nix` an -attribute set is created for each available Python interpreter. The available -sets are - -* `pkgs.python26Packages` -* `pkgs.python27Packages` -* `pkgs.python33Packages` -* `pkgs.python34Packages` -* `pkgs.python35Packages` -* `pkgs.pypyPackages` - -and the aliases - -* `pkgs.pythonPackages` pointing to `pkgs.python27Packages` -* `pkgs.python3Packages` pointing to `pkgs.python35Packages` - -#### `buildPythonPackage` function - -The `buildPythonPackage` function is implemented in -`pkgs/development/python-modules/generic/default.nix` - -and can be used as: - - twisted = buildPythonPackage { - name = "twisted-8.1.0"; - - src = pkgs.fetchurl { - url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2; - sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl"; - }; - - propagatedBuildInputs = [ self.ZopeInterface ]; - - meta = { - homepage = http://twistedmatrix.com/; - description = "Twisted, an event-driven networking engine written in Python"; - license = stdenv.lib.licenses.mit; }; - }; - -The `buildPythonPackage` mainly does four things: - -* In the `buildPhase`, it calls `${python.interpreter} setup.py bdist_wheel` to build a wheel binary zipfile. -* In the `installPhase`, it installs the wheel file using `pip install *.whl`. -* In the `postFixup` phase, the `wrapPythonPrograms` bash function is called to wrap all programs in the `$out/bin/*` directory to include `$PYTHONPATH` and `$PATH` environment variables. -* In the `installCheck` phase, `${python.interpreter} setup.py test` is ran. - -As in Perl, dependencies on other Python packages can be specified in the -`buildInputs` and `propagatedBuildInputs` attributes. If something is -exclusively a build-time dependency, use `buildInputs`; if it’s (also) a runtime -dependency, use `propagatedBuildInputs`. - -By default tests are run because `doCheck = true`. Test dependencies, like -e.g. the test runner, should be added to `buildInputs`. - -By default `meta.platforms` is set to the same value -as the interpreter unless overriden otherwise. - -##### `buildPythonPackage` parameters - -All parameters from `mkDerivation` function are still supported. - -* `namePrefix`: Prepended text to `${name}` parameter. Defaults to `"python3.3-"` for Python 3.3, etc. Set it to `""` if you're packaging an application or a command line tool. -* `disabled`: If `true`, package is not build for particular python interpreter version. Grep around `pkgs/top-level/python-packages.nix` for examples. -* `setupPyBuildFlags`: List of flags passed to `setup.py build_ext` command. -* `pythonPath`: List of packages to be added into `$PYTHONPATH`. Packages in `pythonPath` are not propagated (contrary to `propagatedBuildInputs`). -* `preShellHook`: Hook to execute commands before `shellHook`. -* `postShellHook`: Hook to execute commands after `shellHook`. -* `makeWrapperArgs`: A list of strings. Arguments to be passed to `makeWrapper`, which wraps generated binaries. By default, the arguments to `makeWrapper` set `PATH` and `PYTHONPATH` environment variables before calling the binary. Additional arguments here can allow a developer to set environment variables which will be available when the binary is run. For example, `makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]`. -* `installFlags`: A list of strings. Arguments to be passed to `pip install`. To pass options to `python setup.py install`, use `--install-option`. E.g., `installFlags=["--install-option='--cpp_implementation'"]. - -#### `buildPythonApplication` function - -The `buildPythonApplication` function is practically the same as `buildPythonPackage`. -The difference is that `buildPythonPackage` by default prefixes the names of the packages with the version of the interpreter. -Because with an application we're not interested in multiple version the prefix is dropped. - -#### python.buildEnv function - -Python environments can be created using the low-level `pkgs.buildEnv` function. -This example shows how to create an environment that has the Pyramid Web Framework. -Saving the following as `default.nix` - - with import {}; - - python.buildEnv.override { - extraLibs = [ pkgs.pythonPackages.pyramid ]; - ignoreCollisions = true; - } - -and running `nix-build` will create - - /nix/store/cf1xhjwzmdki7fasgr4kz6di72ykicl5-python-2.7.8-env - -with wrapped binaries in `bin/`. - -You can also use the `env` attribute to create local environments with needed -packages installed. This is somewhat comparable to `virtualenv`. For example, -running `nix-shell` with the following `shell.nix` - - with import {}; - - (python3.buildEnv.override { - extraLibs = with python3Packages; [ numpy requests ]; - }).env - -will drop you into a shell where Python will have the -specified packages in its path. - - -##### `python.buildEnv` arguments - -* `extraLibs`: List of packages installed inside the environment. -* `postBuild`: Shell command executed after the build of environment. -* `ignoreCollisions`: Ignore file collisions inside the environment (default is `false`). - -### Development mode - -Development or editable mode is supported. To develop Python packages -`buildPythonPackage` has additional logic inside `shellPhase` to run `pip -install -e . --prefix $TMPDIR/`for the package. - -Warning: `shellPhase` is executed only if `setup.py` exists. - -Given a `default.nix`: - - with import {}; - - buildPythonPackage { name = "myproject"; - - buildInputs = with pkgs.pythonPackages; [ pyramid ]; - - src = ./.; } - -Running `nix-shell` with no arguments should give you -the environment in which the package would be build with -`nix-build`. - -Shortcut to setup environments with C headers/libraries and python packages: - - $ nix-shell -p pythonPackages.pyramid zlib libjpeg git - -Note: There is a boolean value `lib.inNixShell` set to `true` if nix-shell is invoked. - -### Tools - -Packages inside nixpkgs are written by hand. However many tools exist in -community to help save time. No tool is preferred at the moment. - -- [python2nix](https://github.com/proger/python2nix) by Vladimir Kirillov -- [pypi2nix](https://github.com/garbas/pypi2nix) by Rok Garbas -- [pypi2nix](https://github.com/offlinehacker/pypi2nix) by Jaka Hudoklin - -## FAQ - -### How to solve circular dependencies? - -Consider the packages `A` and `B` that depend on each other. When packaging `B`, -a solution is to override package `A` not to depend on `B` as an input. The same -should also be done when packaging `A`. - -### `install_data` / `data_files` problems - -If you get the following error: - - could not create '/nix/store/6l1bvljpy8gazlsw2aw9skwwp4pmvyxw-python-2.7.8/etc': - Permission denied - -This is a [known bug](https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix) in setuptools. -Setuptools `install_data` does not respect `--prefix`. An example of such package using the feature is `pkgs/tools/X11/xpra/default.nix`. -As workaround install it as an extra `preInstall` step: - - ${python.interpreter} setup.py install_data --install-dir=$out --root=$out - sed -i '/ = data\_files/d' setup.py - - -### Rationale of non-existent global site-packages - -On most operating systems a global `site-packages` is maintained. This however -becomes problematic if you want to run multiple Python versions or have multiple -versions of certain libraries for your projects. Generally, you would solve such -issues by creating virtual environments using `virtualenv`. - -On Nix each package has an isolated dependency tree which, in the case of -Python, guarantees the right versions of the interpreter and libraries or -packages are available. There is therefore no need to maintain a global `site-packages`. - -If you want to create a Python environment for development, then the recommended -method is to use `nix-shell`, either with or without the `python.buildEnv` -function. - - -## Contributing - -### Contributing guidelines - -Following rules are desired to be respected: - -* Make sure package builds for all python interpreters. Use `disabled` argument to `buildPythonPackage` to set unsupported interpreters. -* If tests need to be disabled for a package, make sure you leave a comment about reasoning. -* Packages in `pkgs/top-level/python-packages.nix` are sorted quasi-alphabetically to avoid merge conflicts. -* Python libraries are supposed to be in `python-packages.nix` and packaged with `buildPythonPackage`. Python applications live outside of `python-packages.nix` and are packaged with `buildPythonApplication`. diff --git a/doc/languages-frameworks/python.xml b/doc/languages-frameworks/python.xml new file mode 100644 index 00000000000..57aceeb4868 --- /dev/null +++ b/doc/languages-frameworks/python.xml @@ -0,0 +1,447 @@ +
+ +Python + + + Currently supported interpreters are python26, python27, + python33, python34, python35 + and pypy. + + + + python is an alias to python27 and python3 is an alias to python34. + + + + python26 and python27 do not include modules that require + external dependencies (to reduce dependency bloat). Following modules need to be added as + buildInput explicitly: + + + + python.modules.bsddb + python.modules.curses + python.modules.curses_panel + python.modules.crypt + python.modules.gdbm + python.modules.sqlite3 + python.modules.tkinter + python.modules.readline + + +For convenience python27Full and python26Full +are provided with all modules included. + + + Python packages that + use setuptools or distutils, + can be built using the buildPythonPackage function as documented below. + + + + All packages depending on any Python interpreter get appended $out/${python.sitePackages} + to $PYTHONPATH if such directory exists. + + + + + Useful attributes on interpreters packages: + + + + libPrefix + + Name of the folder in ${python}/lib/ for corresponding interpreter. + + + + + interpreter + + Alias for ${python}/bin/${executable}. + + + + + buildEnv + + Function to build python interpreter environments with extra packages bundled together. + See for usage and documentation. + + + + + sitePackages + + Alias for lib/${libPrefix}/site-packages. + + + + + executable + + Name of the interpreter executable, ie python3.4. + + + + +
<varname>buildPythonPackage</varname> function + + + The function is implemented in + pkgs/development/python-modules/generic/default.nix. + Example usage: + + +twisted = buildPythonPackage { + name = "twisted-8.1.0"; + + src = pkgs.fetchurl { + url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2; + sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl"; + }; + + propagatedBuildInputs = [ self.ZopeInterface ]; + + meta = { + homepage = http://twistedmatrix.com/; + description = "Twisted, an event-driven networking engine written in Python"; + license = stdenv.lib.licenses.mit; + }; +}; + + + Most of Python packages that use buildPythonPackage are defined + in pkgs/top-level/python-packages.nix + and generated for each python interpreter separately into attribute sets python26Packages, + python27Packages, python35Packages, python33Packages, + python34Packages and pypyPackages. + + + + buildPythonPackage mainly does four things: + + + + In the buildPhase, it calls + ${python.interpreter} setup.py bdist_wheel to build a wheel binary zipfile. + + + + In the installPhase, it installs the wheel file using + pip install *.whl. + + + + In the postFixup phase, wrapPythonPrograms + bash function is called to wrap all programs in $out/bin/* + directory to include $PYTHONPATH and $PATH + environment variables. + + + + In the installCheck phase, ${python.interpreter} setup.py test + is ran. + + + + + By default doCheck = true is set + + + As in Perl, dependencies on other Python packages can be specified in the + buildInputs and + propagatedBuildInputs attributes. If something is + exclusively a build-time dependency, use + buildInputs; if it’s (also) a runtime dependency, + use propagatedBuildInputs. + + + + By default meta.platforms is set to the same value + as the interpreter unless overriden otherwise. + + + + + <varname>buildPythonPackage</varname> parameters + (all parameters from <varname>mkDerivation</varname> function are still supported) + + + + namePrefix + + Prepended text to ${name} parameter. + Defaults to "python3.3-" for Python 3.3, etc. Set it to + "" + if you're packaging an application or a command line tool. + + + + + disabled + + If true, package is not build for + particular python interpreter version. Grep around + pkgs/top-level/python-packages.nix + for examples. + + + + + setupPyBuildFlags + + List of flags passed to setup.py build_ext command. + + + + + pythonPath + + List of packages to be added into $PYTHONPATH. + Packages in pythonPath are not propagated + (contrary to propagatedBuildInputs). + + + + + preShellHook + + Hook to execute commands before shellHook. + + + + + postShellHook + + Hook to execute commands after shellHook. + + + + + makeWrapperArgs + + A list of strings. Arguments to be passed to + makeWrapper, which wraps generated binaries. By + default, the arguments to makeWrapper set + PATH and PYTHONPATH environment + variables before calling the binary. Additional arguments here can + allow a developer to set environment variables which will be + available when the binary is run. For example, + makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]. + + + + + +
+ +
<function>python.buildEnv</function> function + + Create Python environments using low-level pkgs.buildEnv function. Example default.nix: + + + {}; + +python.buildEnv.override { + extraLibs = [ pkgs.pythonPackages.pyramid ]; + ignoreCollisions = true; +}]]> + + + Running nix-build will create + /nix/store/cf1xhjwzmdki7fasgr4kz6di72ykicl5-python-2.7.8-env + with wrapped binaries in bin/. + + + + You can also use env attribute to create local + environments with needed packages installed (somewhat comparable to + virtualenv). For example, with the following + shell.nix: + + + {}; + +(python3.buildEnv.override { + extraLibs = with python3Packages; + [ numpy + requests + ]; +}).env]]> + + + Running nix-shell will drop you into a shell where + python will have specified packages in its path. + + + + + <function>python.buildEnv</function> arguments + + + + extraLibs + + List of packages installed inside the environment. + + + + + postBuild + + Shell command executed after the build of environment. + + + + + ignoreCollisions + + Ignore file collisions inside the environment (default is false). + + + +
+ +
Tools + +Packages inside nixpkgs are written by hand. However many tools +exist in community to help save time. No tool is preferred at the moment. + + + + + + python2nix + by Vladimir Kirillov + + + + pypi2nix + by Rok Garbas + + + + pypi2nix + by Jaka Hudoklin + + + + +
+ +
Development + + + To develop Python packages buildPythonPackage has + additional logic inside shellPhase to run + pip install -e . --prefix $TMPDIR/ for the package. + + + shellPhase is executed only if setup.py + exists. + + + Given a default.nix: + + + {}; + +buildPythonPackage { + name = "myproject"; + + buildInputs = with pkgs.pythonPackages; [ pyramid ]; + + src = ./.; +}]]> + + + Running nix-shell with no arguments should give you + the environment in which the package would be build with + nix-build. + + + + Shortcut to setup environments with C headers/libraries and python packages: + + $ nix-shell -p pythonPackages.pyramid zlib libjpeg git + + + + There is a boolean value lib.inNixShell set to + true if nix-shell is invoked. + + +
+ +
FAQ + + + + + How to solve circular dependencies? + + If you have packages A and B that + depend on each other, when packaging B override package + A not to depend on B as input + (and also the other way around). + + + + + install_data / data_files problems resulting into error: could not create '/nix/store/6l1bvljpy8gazlsw2aw9skwwp4pmvyxw-python-2.7.8/etc': Permission denied + + + Known bug in setuptools install_data does not respect --prefix. Example of + such package using the feature is pkgs/tools/X11/xpra/default.nix. As workaround + install it as an extra preInstall step: + + ${python.interpreter} setup.py install_data --install-dir=$out --root=$out +sed -i '/ = data_files/d' setup.py + + + + + Rationale of non-existent global site-packages + + There is no need to have global site-packages in Nix. Each package has isolated + dependency tree and installing any python package will only populate $PATH + inside user environment. See to create self-contained + interpreter with a set of packages. + + + + + +
+ + +
Contributing guidelines + + Following rules are desired to be respected: + + + + + + Make sure package builds for all python interpreters. Use disabled argument to + buildPythonPackage to set unsupported interpreters. + + + + If tests need to be disabled for a package, make sure you leave a comment about reasoning. + + + + Packages in pkgs/top-level/python-packages.nix + are sorted quasi-alphabetically to avoid merge conflicts. + + + + +
+ +
+ From a90196d4cda5fac99bf60c5a254e5bc02b58e71e Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 6 Mar 2016 00:56:53 +0100 Subject: [PATCH 25/76] nvidia_x11_legacy304: fix evaluation nvidia-340.76-kernel-4.0.patch was removed from nvidia_x11_legacy340 54d342add8ab512c5650e1b2da25708622dd327d but is still needed for 304. I think. CC @vcunat. --- .../nvidia-x11/nvidia-340.76-kernel-4.0.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch diff --git a/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch b/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch new file mode 100644 index 00000000000..5fdc1fed727 --- /dev/null +++ b/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch @@ -0,0 +1,28 @@ +--- a/kernel/nv-pat.c 2015-07-03 08:39:35.417031728 +0200 ++++ b/kernel/nv-pat.c 2015-07-03 08:42:15.631838988 +0200 +@@ -35,8 +35,13 @@ + unsigned long cr0 = read_cr0(); + write_cr0(((cr0 & (0xdfffffff)) | 0x40000000)); + wbinvd(); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) + *cr4 = read_cr4(); + if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80); ++#else ++ *cr4 = __read_cr4(); ++ if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80); ++#endif + __flush_tlb(); + } + +@@ -46,7 +51,11 @@ + wbinvd(); + __flush_tlb(); + write_cr0((cr0 & 0x9fffffff)); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) + if (cr4 & 0x80) write_cr4(cr4); ++#else ++ if (cr4 & 0x80) __write_cr4(cr4); ++#endif + } + + static int nv_determine_pat_mode(void) From 225edbd9b599d0634fc7e68a7a84739d6e1ef185 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 2 Mar 2016 06:39:02 +0100 Subject: [PATCH 26/76] ms-sys: 2.5.2 -> 2.5.3 --- pkgs/tools/misc/ms-sys/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/ms-sys/default.nix b/pkgs/tools/misc/ms-sys/default.nix index c0b1de6c1e8..4d6a317276a 100644 --- a/pkgs/tools/misc/ms-sys/default.nix +++ b/pkgs/tools/misc/ms-sys/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "ms-sys-${version}"; - version = "2.5.2"; + version = "2.5.3"; src = fetchurl { url = "mirror://sourceforge/ms-sys/${name}.tar.gz"; - sha256 = "0c7ld5pglcacnrvy2gzzg1ny1jyknlj9iz1mvadq3hn8ai1d83px"; + sha256 = "0mijf82cbji4laip6hiy3l5ka5mzq5sivjvyv7wxnc2fd3v7hgp0"; }; buildInputs = [ gettext ]; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" ]; meta = with stdenv.lib; { - description = "A program for writing Microsoft compatible boot records"; + description = "A program for writing Microsoft-compatible boot records"; homepage = http://ms-sys.sourceforge.net/; license = licenses.gpl2Plus; maintainers = with maintainers; [ nckx ]; From d5eb96938ad20254d91134fb0c40a28cee01969a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 5 Mar 2016 23:19:40 +0100 Subject: [PATCH 27/76] sane-backends-git -> 2016-03-05 --- pkgs/applications/graphics/sane/backends/git.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/graphics/sane/backends/git.nix b/pkgs/applications/graphics/sane/backends/git.nix index 0e4d7ae1b83..84e1f783e2a 100644 --- a/pkgs/applications/graphics/sane/backends/git.nix +++ b/pkgs/applications/graphics/sane/backends/git.nix @@ -1,10 +1,10 @@ { callPackage, fetchgit, ... } @ args: callPackage ./generic.nix (args // { - version = "2016-02-25"; + version = "2016-03-05"; src = fetchgit { - sha256 = "842b1186d38de14221be514a58f77c23d9f83979ea45f846440cf9cbb1f26c1f"; - rev = "c5117ed0f1b522eab10fd2248f140b2acad2a708"; + sha256 = "dc84530d5e0233427acfd132aa08a4cf9973c936ff72a66ee08ecf836200d367"; + rev = "23eb95582da718791103b83ea002e947caa0f5fc"; url = "git://alioth.debian.org/git/sane/sane-backends.git"; }; }) From 7951dd531eb29794d4258507dc2a50c579a003d4 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 5 Mar 2016 23:43:28 +0100 Subject: [PATCH 28/76] mcelog: 132 -> 133 Bugfix: no longer hangs on unknown errors in non-daemon mode. --- pkgs/os-specific/linux/mcelog/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/mcelog/default.nix b/pkgs/os-specific/linux/mcelog/default.nix index 9b347a8da54..a30558092c3 100644 --- a/pkgs/os-specific/linux/mcelog/default.nix +++ b/pkgs/os-specific/linux/mcelog/default.nix @@ -2,10 +2,10 @@ stdenv.mkDerivation rec { name = "mcelog-${version}"; - version = "132"; + version = "133"; src = fetchFromGitHub { - sha256 = "0qr0rdkva8a8wzsdmk0dm9zhpdnwp1lmla324xnayf0afyym3zj8"; + sha256 = "1qj9jz67bd834sgqcxhyhn9fzxg8y9vfw7gmza5ikmjm6yi6mmfr"; rev = "v${version}"; repo = "mcelog"; owner = "andikleen"; From b61e7c2610384eb905712d0e7398cbc5d1d92b49 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 5 Mar 2016 23:51:24 +0100 Subject: [PATCH 29/76] libpsl: 0.12.0 -> 0.13.0 --- pkgs/development/libraries/libpsl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libpsl/default.nix b/pkgs/development/libraries/libpsl/default.nix index d1da2bbf3aa..231216cbc69 100644 --- a/pkgs/development/libraries/libpsl/default.nix +++ b/pkgs/development/libraries/libpsl/default.nix @@ -11,14 +11,14 @@ let owner = "publicsuffix"; }; - libVersion = "0.12.0"; + libVersion = "0.13.0"; in stdenv.mkDerivation rec { name = "libpsl-${version}"; version = "${libVersion}-list-${listVersion}"; src = fetchFromGitHub { - sha256 = "13w3lc752az2swymg408f3w2lbqs0f2h5ri6d5jw1vv9z0ij9xlw"; + sha256 = "12inl984r2qks51wyrzgll83y7k79q2lbhyc545dpk19qnfvp7gz"; rev = "libpsl-${libVersion}"; repo = "libpsl"; owner = "rockdaboot"; From b747253700d40c0a3abcb595bdcbf102709cc4f0 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 6 Mar 2016 00:00:31 +0100 Subject: [PATCH 30/76] borgbackup: 0.30.0 -> 1.0.0 Major upgrade, be sure to read the release notes: https://github.com/borgbackup/borg/blob/1.0.0/docs/changes.rst --- pkgs/tools/backup/borg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/backup/borg/default.nix b/pkgs/tools/backup/borg/default.nix index 208c3d4b1aa..b46ea186dee 100644 --- a/pkgs/tools/backup/borg/default.nix +++ b/pkgs/tools/backup/borg/default.nix @@ -2,12 +2,12 @@ python3Packages.buildPythonApplication rec { name = "borgbackup-${version}"; - version = "0.30.0"; + version = "1.0.0"; namePrefix = ""; src = fetchurl { url = "https://pypi.python.org/packages/source/b/borgbackup/borgbackup-${version}.tar.gz"; - sha256 = "0n78c982kdfqbyi9jawcvzgdik4l36c2s7rpzkfr1ka6506k2rx4"; + sha256 = "0wa6cvqs3rni5nwrgagigchcly8a53rxk56z0zn8iaii2cqrw2sh"; }; nativeBuildInputs = with python3Packages; [ From 0bf8a1a86df67649893726d50761567121330006 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 6 Mar 2016 05:06:24 +0300 Subject: [PATCH 31/76] crawl: cleanup --- pkgs/games/crawl/default.nix | 4 +--- pkgs/top-level/all-packages.nix | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/games/crawl/default.nix b/pkgs/games/crawl/default.nix index e6a1eb2c1a6..0b9287faf37 100644 --- a/pkgs/games/crawl/default.nix +++ b/pkgs/games/crawl/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, which, sqlite, lua5_1, perl, zlib, pkgconfig, ncurses , dejavu_fonts, libpng, SDL2, SDL2_image, mesa, freetype -, tileMode ? true +, tileMode ? false }: let version = "0.17.1"; @@ -26,8 +26,6 @@ stdenv.mkDerivation rec { preBuild = '' cd crawl-ref/source echo "${version}" > util/release_ver - # Related to issue #1963 - sed -i 's/-fuse-ld=gold//g' Makefile for i in util/*; do patchShebangs $i done diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a370802389a..c540ff849c8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14449,12 +14449,12 @@ let crafty = callPackage ../games/crafty { }; craftyFull = appendToName "full" (crafty.override { fullVariant = true; }); - crawlTiles = callPackage ../games/crawl { }; - - crawl = callPackage ../games/crawl { - tileMode = false; + crawlTiles = crawl.override { + tileMode = true; }; + crawl = callPackage ../games/crawl { }; + crrcsim = callPackage ../games/crrcsim {}; cuyo = callPackage ../games/cuyo { }; From 2843d8390593b55651573809b40c426ab6c3d0d2 Mon Sep 17 00:00:00 2001 From: Kevin Cox Date: Mon, 22 Feb 2016 17:25:50 -0500 Subject: [PATCH 32/76] Mesos: 26.0 -> 27.1 --- .../networking/cluster/mesos/default.nix | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/cluster/mesos/default.nix b/pkgs/applications/networking/cluster/mesos/default.nix index 25bd659d63a..86b82db60e1 100644 --- a/pkgs/applications/networking/cluster/mesos/default.nix +++ b/pkgs/applications/networking/cluster/mesos/default.nix @@ -1,7 +1,8 @@ { stdenv, lib, makeWrapper, fetchurl, curl, sasl, openssh, autoconf , automake115x, libtool, unzip, gnutar, jdk, maven, python, wrapPython -, setuptools, boto, pythonProtobuf, apr, subversion, gzip +, setuptools, boto, pythonProtobuf, apr, subversion, gzip, systemd , leveldb, glog, perf, utillinux, libnl, iproute, openssl, libevent +, bash }: let @@ -9,14 +10,15 @@ let soext = if stdenv.system == "x86_64-darwin" then "dylib" else "so"; in stdenv.mkDerivation rec { - version = "0.26.0"; + version = "0.27.1"; name = "mesos-${version}"; + enableParallelBuilding = true; dontDisableStatic = true; src = fetchurl { url = "mirror://apache/mesos/${version}/${name}.tar.gz"; - sha256 = "0csvaql9gky15w23gmiw6cvlfnrlhfxvdqd2pv3j3grr44ph0ab5"; + sha256 = "147iq7vwi09kqblx1h8r6lkrg9g50i257qk1cph1zr5j3rncz7l8"; }; patches = [ @@ -70,6 +72,15 @@ in stdenv.mkDerivation rec { --replace '"ip ' '"${iproute}/bin/ip ' \ --replace '"mount ' '"${utillinux}/bin/mount ' \ --replace '/bin/sh' "${stdenv.shell}" + + substituteInPlace src/launcher/executor.cpp \ + --replace '"sh"' '"${bash}/bin/bash"' + + substituteInPlace src/slave/containerizer/mesos/launch.cpp \ + --replace '"sh"' '"${bash}/bin/bash"' + + substituteInPlace src/linux/systemd.cpp \ + --replace 'os::realpath("/sbin/init")' '"${systemd}/lib/systemd/systemd"' ''; configureFlags = [ @@ -114,7 +125,7 @@ in stdenv.mkDerivation rec { rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py* popd - # optional python dependency for mesos cli + # optional python dependency for mesos cli pushd src/python/cli ${python}/bin/${python.executable} setup.py install \ --install-lib=$out/lib/${python.libPrefix}/site-packages \ @@ -150,7 +161,7 @@ in stdenv.mkDerivation rec { homepage = "http://mesos.apache.org"; license = licenses.asl20; description = "A cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks"; - maintainers = with maintainers; [ cstrahan offline rushmorem ]; + maintainers = with maintainers; [ cstrahan kevincox offline rushmorem ]; platforms = platforms.linux; }; } From bb39304ce6169ca0c7f421f15cb1b0c378999b7e Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Sat, 5 Mar 2016 23:56:32 -0500 Subject: [PATCH 33/76] openssh: use bin instead of sbin folder References #11939. --- nixos/modules/services/networking/ssh/sshd.nix | 2 +- pkgs/tools/networking/openssh/default.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix index 20a1777f3cc..5971a5a250d 100644 --- a/nixos/modules/services/networking/ssh/sshd.nix +++ b/nixos/modules/services/networking/ssh/sshd.nix @@ -263,7 +263,7 @@ in serviceConfig = { ExecStart = - "${cfgc.package}/sbin/sshd " + (optionalString cfg.startWhenNeeded "-i ") + + "${cfgc.package}/bin/sshd " + (optionalString cfg.startWhenNeeded "-i ") + "-f ${pkgs.writeText "sshd_config" cfg.extraConfig}"; KillMode = "process"; } // (if cfg.startWhenNeeded then { diff --git a/pkgs/tools/networking/openssh/default.nix b/pkgs/tools/networking/openssh/default.nix index 4d3ffb1257f..f2a7642ea55 100644 --- a/pkgs/tools/networking/openssh/default.nix +++ b/pkgs/tools/networking/openssh/default.nix @@ -46,6 +46,7 @@ stdenv.mkDerivation rec { # I set --disable-strip because later we strip anyway. And it fails to strip # properly when cross building. configureFlags = [ + "--sbindir=\${out}/bin" "--localstatedir=/var" "--with-pid-dir=/run" "--with-mantype=man" From 54c7ef17a913fde534a22edbe5557aa24d1f4847 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 6 Mar 2016 09:39:22 +0100 Subject: [PATCH 34/76] eclipse-plugin-checkstyle: 6.14.0 -> 6.16.0 --- pkgs/applications/editors/eclipse/plugins.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/eclipse/plugins.nix b/pkgs/applications/editors/eclipse/plugins.nix index 50975d061eb..3bde9b1434c 100644 --- a/pkgs/applications/editors/eclipse/plugins.nix +++ b/pkgs/applications/editors/eclipse/plugins.nix @@ -171,12 +171,12 @@ rec { checkstyle = buildEclipseUpdateSite rec { name = "checkstyle-${version}"; - version = "6.14.0.201601142217"; + version = "6.16.0.201603042325"; src = fetchzip { stripRoot = false; - url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/6.14.0/net.sf.eclipsecs-updatesite_${version}-bin.zip"; - sha256 = "0ysxir1fv0mb9xnidc9hv6llnk48lkav0sryjbx7pw7vy1f8nd4c"; + url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/6.16.0/net.sf.eclipsecs-updatesite_${version}.zip"; + sha256 = "0bm1linyw82bryblyabcx89zqw1ingh8mx62bwp3qj05yc9ksnly"; }; meta = with stdenv.lib; { From 3ab6d7b5a115a16ba41afdc12bc3afa1c6aabf67 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 6 Mar 2016 09:53:44 +0100 Subject: [PATCH 35/76] perl-CGI: 4.26 -> 4.27 --- pkgs/top-level/perl-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 18ef6145df0..a73bcca7454 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -1416,10 +1416,10 @@ let self = _self // overrides; _self = with self; { }; CGI = buildPerlPackage rec { - name = "CGI-4.26"; + name = "CGI-4.27"; src = fetchurl { url = "mirror://cpan/authors/id/L/LE/LEEJO/${name}.tar.gz"; - sha256 = "0k8rcmgl9ysk6h4racd5sximida5ypn8fdzi7q34rpq4l7xqcm2n"; + sha256 = "0rjif2z44lnfk4hkf95mq52nsgvlgjdigabjpx3v697lfibhx37c"; }; buildInputs = [ TestDeep TestWarn ]; propagatedBuildInputs = [ HTMLParser self."if" ]; From b1b85ddb816a92dc89ee860de206cf12d6a9ec47 Mon Sep 17 00:00:00 2001 From: Mathieu Boespflug Date: Sun, 6 Mar 2016 10:35:25 +0100 Subject: [PATCH 36/76] buildStackPackage: Fix path to generic-stack-builder.nix. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: ``` error: getting status of ‘/home/user/nixpkgs/pkgs/development/development/haskell-modules/generic-stack-builder.nix’: No such file or directory ``` --- pkgs/development/haskell-modules/lib.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/lib.nix b/pkgs/development/haskell-modules/lib.nix index 59020264b3c..a4db98f2e61 100644 --- a/pkgs/development/haskell-modules/lib.nix +++ b/pkgs/development/haskell-modules/lib.nix @@ -81,7 +81,7 @@ rec { buildStrictly = pkg: buildFromSdist (appendConfigureFlag pkg "--ghc-option=-Wall --ghc-option=-Werror"); - buildStackProject = pkgs.callPackage ../development/haskell-modules/generic-stack-builder.nix { }; + buildStackProject = pkgs.callPackage ./generic-stack-builder.nix { }; triggerRebuild = drv: i: overrideCabal drv (drv: { postUnpack = ": trigger rebuild ${toString i}"; }); From 4074042744c383d9cfe8fb602c79a2584c814223 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 6 Mar 2016 10:52:46 +0100 Subject: [PATCH 37/76] perl-Sub-Name: 0.0502 -> 0.14 Also clean up meta section and add myself as maintainer. --- pkgs/top-level/perl-packages.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index a73bcca7454..89b5236f11d 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -10796,14 +10796,17 @@ let self = _self // overrides; _self = with self; { }; }; - SubName = buildPerlPackage { - name = "Sub-Name-0.0502"; + SubName = buildPerlPackage rec { + name = "Sub-Name-0.14"; src = fetchurl { - url = mirror://cpan/authors/id/C/CH/CHIPS/Sub-Name-0.0502.tar.gz; - sha256 = "1r197binpdy4xfh65qkxxvi9c39pmvvcny4rl8a7zrk1jcws6fac"; + url = "mirror://cpan/authors/id/E/ET/ETHER/${name}.tar.gz"; + sha256 = "9276412677b445e7e9bdf6ab3a034a05a860e5c5dc560dd9272967745eeb3f17"; }; meta = { - description = "(Re)name a sub"; + homepage = https://github.com/karenetheridge/Sub-Name; + description = "(re)name a sub"; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + maintainers = [ maintainers.rycee ]; }; }; From d541d47e076e7204701afc261ad12a2ba263a839 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 6 Mar 2016 10:53:20 +0100 Subject: [PATCH 38/76] perl-Moo: 2.000002 -> 2.001001 --- pkgs/top-level/perl-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 89b5236f11d..af668f5251a 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -7688,10 +7688,10 @@ let self = _self // overrides; _self = with self; { }; Moo = buildPerlPackage rec { - name = "Moo-2.000002"; + name = "Moo-2.001001"; src = fetchurl { url = "mirror://cpan/authors/id/H/HA/HAARG/${name}.tar.gz"; - sha256 = "fb4bfa751f0dd06bd70f2e06e811f85a640501f263c228a8efafbf6b26691fd4"; + sha256 = "a68155b642f389cb1cc40139e2663d0c5d15eb71d9ecb0961623a73c10dd8ec0"; }; buildInputs = [ TestFatal ]; propagatedBuildInputs = [ ClassMethodModifiers DevelGlobalDestruction ModuleRuntime RoleTiny ]; From af4e8a4d3b4da1dfb91784dfd2290f5ba39be4b9 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sun, 6 Mar 2016 00:59:08 +0100 Subject: [PATCH 39/76] manual/installing: add loadkeys hint Closes #13702 and fixes #3132. (Tiny changes by vcunat.) --- nixos/doc/manual/installation/installing.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml index 9aec57fb6d5..7e71df28cdb 100644 --- a/nixos/doc/manual/installation/installing.xml +++ b/nixos/doc/manual/installation/installing.xml @@ -22,7 +22,10 @@ (with empty password). If you downloaded the graphical ISO image, you can - run start display-manager to start KDE. + run start display-manager to start KDE. If you + want to continue on the terminal, you can use + loadkeys to switch to your preferred keyboard layout. + (We even provide neo2 via loadkeys de neo!) The boot process should have brought up networking (check ip a). Networking is necessary for the From a458a9f78fe1649eae1c011a1572979b70500875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 6 Mar 2016 11:12:23 +0100 Subject: [PATCH 40/76] curl: use an official download link It works now that we have e6f61b4cf33. --- pkgs/tools/networking/curl/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index c75cceb46a5..c59ea619942 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { name = "curl-7.47.1"; src = fetchurl { - url = "http://ngcobalt13.uxnr.de/mirror/curl/${name}.tar.bz2"; + url = "http://curl.haxx.se/download/${name}.tar.bz2"; sha256 = "13z9gba3q2ybp50z0gdkzhwcx9m0i7qkvm278yz4pql2jfml7inx"; }; From 5ac1de516e3de6e036a079bcdc4fe949ac3d3d0a Mon Sep 17 00:00:00 2001 From: Hoang Xuan Phu Date: Sun, 6 Mar 2016 15:08:33 +0800 Subject: [PATCH 41/76] archiveopteryx: override specific build settings instead of PREFIX Closes #13708 and fixes #13707. --- pkgs/servers/mail/archiveopteryx/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/mail/archiveopteryx/default.nix b/pkgs/servers/mail/archiveopteryx/default.nix index 966f90c40f1..bb2ab16ae66 100644 --- a/pkgs/servers/mail/archiveopteryx/default.nix +++ b/pkgs/servers/mail/archiveopteryx/default.nix @@ -11,12 +11,18 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ jam ]; buildInputs = [ openssl perl zlib ]; - preConfigure = ''export PREFIX="$out" ''; + preConfigure = '' + export INSTALLROOT=installroot + sed -i 's:BINDIR = $(PREFIX)/bin:BINDIR = '$out'/bin:' ./Jamsettings + sed -i 's:SBINDIR = $(PREFIX)/sbin:SBINDIR = '$out'/bin:' ./Jamsettings + sed -i 's:LIBDIR = $(PREFIX)/lib:LIBDIR = '$out'/lib:' ./Jamsettings + sed -i 's:MANDIR = $(PREFIX)/man:MANDIR = '$out'/share/man:' ./Jamsettings + sed -i 's:READMEDIR = $(PREFIX):READMEDIR = '$out'/share/doc/archiveopteryx:' ./Jamsettings + ''; buildPhase = ''jam "-j$NIX_BUILD_CORES" ''; installPhase = '' jam install - mkdir -p "$out/share/doc/archiveopteryx" - mv -t "$out/share/doc/archiveopteryx/" "$out"/{bsd.txt,COPYING,README} + mv installroot/$out $out ''; meta = with stdenv.lib; { From 14e6b7aeb9df36b26914a32061f37930ce0367bc Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 6 Mar 2016 12:11:40 +0000 Subject: [PATCH 42/76] unbound: 1.5.7 -> 1.5.8 --- pkgs/tools/networking/unbound/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index 4819c004c1b..4ada77e14b6 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "unbound-${version}"; - version = "1.5.7"; + version = "1.5.8"; src = fetchurl { url = "http://unbound.net/downloads/${name}.tar.gz"; - sha256 = "1a0wfgp6wqpf7cxlcbprqhnjx6z9ywf0rhrpcf7x98l1mbjqh82b"; + sha256 = "33567a20f73e288f8daa4ec021fbb30fe1824b346b34f12677ad77899ecd09be"; }; buildInputs = [ openssl expat libevent ]; From 7135553cf1ed6b033d6167ea8b2d5b4a30508674 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 6 Mar 2016 12:50:41 +0000 Subject: [PATCH 43/76] unbound: drop sbin directory --- nixos/modules/services/networking/unbound.nix | 2 +- pkgs/tools/networking/unbound/default.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/unbound.nix b/nixos/modules/services/networking/unbound.nix index e154aed0843..89762fe5248 100644 --- a/nixos/modules/services/networking/unbound.nix +++ b/nixos/modules/services/networking/unbound.nix @@ -113,7 +113,7 @@ in ''; serviceConfig = { - ExecStart = "${pkgs.unbound}/sbin/unbound -d -c ${stateDir}/unbound.conf"; + ExecStart = "${pkgs.unbound}/bin/unbound -d -c ${stateDir}/unbound.conf"; ExecStopPost="${pkgs.utillinux}/bin/umount ${stateDir}/dev/random"; }; }; diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index 4ada77e14b6..edbf32bb775 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -17,6 +17,7 @@ stdenv.mkDerivation rec { "--with-libevent=${libevent}" "--localstatedir=/var" "--sysconfdir=/etc" + "--sbindir=\${out}/bin" "--enable-pie" "--enable-relro-now" ]; From fe37f2893976dbcb417adda19f5d0aa91d92fd7a Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sun, 6 Mar 2016 14:04:37 +0100 Subject: [PATCH 44/76] pixie: fix description --- pkgs/development/interpreters/pixie/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/pixie/default.nix b/pkgs/development/interpreters/pixie/default.nix index 85af751809c..c4086078d7d 100644 --- a/pkgs/development/interpreters/pixie/default.nix +++ b/pkgs/development/interpreters/pixie/default.nix @@ -70,7 +70,7 @@ let --prefix PATH : ${bin-path} ''; meta = { - description = "Pixie is a clojure-like lisp, built with the pypy vm toolkit."; + description = "A clojure-like lisp, built with the pypy vm toolkit"; homepage = "https://github.com/pixie-lang/pixie"; license = stdenv.lib.licenses.lgpl3; platforms = stdenv.lib.platforms.linux; From ee9b151f5b9f880fa1d2b01268e5e7130c015fea Mon Sep 17 00:00:00 2001 From: Kevin Cox Date: Sun, 6 Mar 2016 08:04:32 -0500 Subject: [PATCH 45/76] marathon: 0.15.1 -> 0.15.3 --- pkgs/applications/networking/cluster/marathon/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/marathon/default.nix b/pkgs/applications/networking/cluster/marathon/default.nix index ac666030897..11c275c9f49 100644 --- a/pkgs/applications/networking/cluster/marathon/default.nix +++ b/pkgs/applications/networking/cluster/marathon/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "marathon-${version}"; - version = "0.15.1"; + version = "0.15.3"; src = fetchurl { url = "https://downloads.mesosphere.io/marathon/v${version}/marathon-${version}.tgz"; - sha256 = "1ch3nvcwj7pzjjqw4k07gdf7nmdbfkks5j07wl3518bagjqrajj2"; + sha256 = "1br4k596sjp4cf5l2nyaqhlsfdr443n08fvdyf4kilhr803x2rjq"; }; buildInputs = [ makeWrapper jdk mesos ]; @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { homepage = https://mesosphere.github.io/marathon; description = "Cluster-wide init and control system for services in cgroups or Docker containers"; license = licenses.asl20; - maintainers = with maintainers; [ rushmorem kamilchm ]; + maintainers = with maintainers; [ rushmorem kamilchm kevincox ]; platforms = platforms.linux; }; } From 65dd28c5697b5967eb963431c830944373e0f9b1 Mon Sep 17 00:00:00 2001 From: Maxwell Date: Sat, 5 Mar 2016 22:21:50 -0500 Subject: [PATCH 46/76] xdo from 0.3 -> 0.5 This incorporates a number of bugfixes, as well as adding the `below` and `above` actions Also moved package from fetchurl to fetchFromGitHub --- pkgs/tools/misc/xdo/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/xdo/default.nix b/pkgs/tools/misc/xdo/default.nix index e7a3d91967e..26a5b485bf6 100644 --- a/pkgs/tools/misc/xdo/default.nix +++ b/pkgs/tools/misc/xdo/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, libxcb, xcbutilwm }: stdenv.mkDerivation rec { - name = "xdo-0.3"; + name = "xdo-0.5"; src = fetchurl { - url = "https://github.com/baskerville/xdo/archive/0.3.tar.gz"; - sha256 = "128flaydag9ixsai87p85r84arg2pn1j9h3zgdjwlmbcpb8d4ia8"; + url = "https://github.com/baskerville/xdo/archive/0.5.tar.gz"; + sha256 = "0sjnjs12i0gp1dg1m5jid4a3bg9am4qkf0qafyp6yn176yzcz1i6"; }; prePatch = ''sed -i "s@/usr/local@$out@" Makefile''; From 56705a1fa372cc5948572feba2b4b0ec0ed20648 Mon Sep 17 00:00:00 2001 From: Christoph Hrdinka Date: Sun, 6 Mar 2016 15:04:16 +0100 Subject: [PATCH 47/76] retrofe: fix gstreamer plugin path --- pkgs/misc/emulators/retrofe/default.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/misc/emulators/retrofe/default.nix b/pkgs/misc/emulators/retrofe/default.nix index bf3091d1d70..a13cc49b572 100644 --- a/pkgs/misc/emulators/retrofe/default.nix +++ b/pkgs/misc/emulators/retrofe/default.nix @@ -2,11 +2,7 @@ , python, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, sqlite, zlib }: -let - gstPlugins = with gst_all_1; [ gst-libav gst-plugins-base gst-plugins-good ]; - GST_PLUGIN_PATH = stdenv.lib.makeSearchPath "lib/gstreamer-1.0" gstPlugins; - -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { name = "retrofe-${version}"; version = "0.6.169"; @@ -20,7 +16,7 @@ in stdenv.mkDerivation rec { buildInputs = [ glib gst_all_1.gstreamer SDL2 SDL2_image SDL2_mixer SDL2_ttf sqlite zlib - ] ++ gstPlugins; + ] ++ (with gst_all_1; [ gst-libav gst-plugins-base gst-plugins-good ]); patches = [ ./include-paths.patch ]; @@ -58,22 +54,24 @@ in stdenv.mkDerivation rec { EOF chmod +x $out/bin/retrofe-init + + runHook postInstall ''; # retrofe will look for config files in its install path ($out/bin). # When set it will use $RETROFE_PATH instead. Sadly this behaviour isn't # documented well. To make it behave more like as expected it's set to # $PWD by default here. - fixupPhase = '' + postInstall = '' wrapProgram "$out/bin/retrofe" \ - --prefix GST_PLUGIN_PATH : '${GST_PLUGIN_PATH}/lib/gstreamer-1.0' \ + --prefix GST_PLUGIN_PATH : "$GST_PLUGIN_SYSTEM_PATH_1_0" \ --set RETROFE_PATH "\''${RETROFE_PATH:-\$PWD}" ''; meta = with stdenv.lib; { description = "A frontend for arcade cabinets and media PCs"; - license = licenses.gpl3Plus; homepage = http://retrofe.com; + license = licenses.gpl3Plus; maintainers = with maintainers; [ hrdinka ]; }; } From 0d459431672f2b14804be1f0cba385e1531c9c95 Mon Sep 17 00:00:00 2001 From: koral Date: Thu, 25 Feb 2016 12:27:18 +0100 Subject: [PATCH 48/76] sshfsFuse: 2.5 -> 2.6 --- pkgs/tools/filesystems/sshfs-fuse/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/filesystems/sshfs-fuse/default.nix b/pkgs/tools/filesystems/sshfs-fuse/default.nix index a5b01db4cd2..5e1b8db6912 100644 --- a/pkgs/tools/filesystems/sshfs-fuse/default.nix +++ b/pkgs/tools/filesystems/sshfs-fuse/default.nix @@ -1,14 +1,17 @@ -{ stdenv, fetchurl, pkgconfig, glib, fuse }: +{ stdenv, fetchFromGitHub, pkgconfig, glib, fuse, autoreconfHook }: stdenv.mkDerivation rec { - name = "sshfs-fuse-2.5"; + name = "sshfs-fuse-2.6"; - src = fetchurl { - url = "mirror://sourceforge/fuse/${name}.tar.gz"; - sha256 = "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9"; + src = fetchFromGitHub { + repo = "sshfs"; + owner = "libfuse"; + rev = "sshfs_2_6"; + sha256 = "08ffvviinjf8ncs8z494q739a8lky9z46i09ghj1y38qzgvk3fpw"; }; - buildInputs = [ pkgconfig glib fuse ]; + buildInputs = [ pkgconfig glib fuse autoreconfHook ]; + postInstall = '' mkdir -p $out/sbin ln -sf $out/bin/sshfs $out/sbin/mount.sshfs From d80811d881ca35f5771b5922b0d8b212d1c90db1 Mon Sep 17 00:00:00 2001 From: Jakub Skrzypnik Date: Fri, 4 Mar 2016 09:35:08 +0100 Subject: [PATCH 49/76] ahoviewer: init at 1.4.6 --- lib/maintainers.nix | 1 + .../graphics/ahoviewer/default.nix | 36 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 pkgs/applications/graphics/ahoviewer/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 7362c6ab659..ce59d5e3ba4 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -307,6 +307,7 @@ sjmackenzie = "Stewart Mackenzie "; sjourdois = "Stéphane ‘kwisatz’ Jourdois "; skeidel = "Sven Keidel "; + skrzyp = "Jakub Skrzypnik "; sleexyz = "Sean Lee "; smironov = "Sergey Mironov "; spacefrogg = "Michael Raitza "; diff --git a/pkgs/applications/graphics/ahoviewer/default.nix b/pkgs/applications/graphics/ahoviewer/default.nix new file mode 100644 index 00000000000..79d6ff06578 --- /dev/null +++ b/pkgs/applications/graphics/ahoviewer/default.nix @@ -0,0 +1,36 @@ +{ stdenv, pkgs, fetchurl, fetchFromGitHub, pkgconfig, libconfig, + gtkmm, glibmm, libxml2, libsecret, curl, unrar, libzip, + librsvg, gst_all_1, autoreconfHook, makeWrapper }: +stdenv.mkDerivation { + name = "ahoviewer-1.4.6"; + src = fetchFromGitHub { + owner = "ahodesuka"; + repo = "ahoviewer"; + rev = "414cb91d66d96fab4b48593a7ef4d9ad461306aa"; + sha256 = "081jgfmbwf2av0cn229cf4qyv6ha80ridymsgwq45124b78y2bmb"; + }; + enableParallelBuilding = true; + nativeBuildInputs = [ autoreconfHook pkgconfig makeWrapper ]; + buildInputs = [ glibmm libconfig gtkmm glibmm libxml2 + libsecret curl unrar libzip librsvg + gst_all_1.gstreamer + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-bad + gst_all_1.gst-libav + gst_all_1.gst-plugins-base ]; + postPatch = ''patchShebangs version.sh''; + postInstall = '' + wrapProgram $out/bin/ahoviewer \ + --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" \ + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" + ''; + meta = { + homepage = "https://github.com/ahodesuka/ahoviewer"; + description = "A GTK2 image viewer, manga reader, and booru browser"; + maintainers = [ stdenv.lib.maintainers.skrzyp ]; + license = stdenv.lib.licenses.mit; + platforms = stdenv.lib.platforms.allBut [ "darwin" "cygwin" ]; + }; +} + + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e45a7466aaf..a6e399b9d29 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11389,6 +11389,8 @@ let gtk = gtk2; }; + ahoviewer = callPackage ../applications/graphics/ahoviewer { }; + alchemy = callPackage ../applications/graphics/alchemy { }; alock = callPackage ../misc/screensavers/alock { }; From dc170b713d6aa1f5aa53024d83f9c3b8aa08c261 Mon Sep 17 00:00:00 2001 From: koral Date: Sun, 6 Mar 2016 17:22:17 +0100 Subject: [PATCH 50/76] sshfs: 2.6 -> 2.7 --- pkgs/tools/filesystems/sshfs-fuse/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/filesystems/sshfs-fuse/default.nix b/pkgs/tools/filesystems/sshfs-fuse/default.nix index 5e1b8db6912..3a460241daa 100644 --- a/pkgs/tools/filesystems/sshfs-fuse/default.nix +++ b/pkgs/tools/filesystems/sshfs-fuse/default.nix @@ -1,13 +1,14 @@ { stdenv, fetchFromGitHub, pkgconfig, glib, fuse, autoreconfHook }: stdenv.mkDerivation rec { - name = "sshfs-fuse-2.6"; + version = "2.7"; + name = "sshfs-fuse-${version}"; src = fetchFromGitHub { repo = "sshfs"; owner = "libfuse"; - rev = "sshfs_2_6"; - sha256 = "08ffvviinjf8ncs8z494q739a8lky9z46i09ghj1y38qzgvk3fpw"; + rev = "sshfs-${version}"; + sha256 = "17l9b89zy5qzfcknw3krk74rfrqaa8q1r8jwdsahaqajsy09h4x4"; }; buildInputs = [ pkgconfig glib fuse autoreconfHook ]; From 9206abe64238c06377fe463989a4105cfd78de07 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 6 Mar 2016 20:44:09 +0100 Subject: [PATCH 51/76] mimeo: init at 2016.2 --- pkgs/tools/misc/mimeo/default.nix | 33 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/tools/misc/mimeo/default.nix diff --git a/pkgs/tools/misc/mimeo/default.nix b/pkgs/tools/misc/mimeo/default.nix new file mode 100644 index 00000000000..66e91ed1424 --- /dev/null +++ b/pkgs/tools/misc/mimeo/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, desktop_file_utils, file, python3Packages }: + +python3Packages.buildPythonApplication rec { + name = "mimeo-${version}"; + version = "2016.2"; + + src = fetchurl { + url = "http://xyne.archlinux.ca/projects/mimeo/src/${name}.tar.xz"; + sha256 = "1y3a60983ind2cakjwxq3cgc76xhcdqz5lcpnyii34s6wviybkn1"; + }; + + buildInputs = [ file desktop_file_utils ]; + + propagatedBuildInputs = [ python3Packages.pyxdg ]; + + preConfigure = '' + substituteInPlace Mimeo.py \ + --replace "EXE_UPDATE_DESKTOP_DATABASE = 'update-desktop-database'" \ + "EXE_UPDATE_DESKTOP_DATABASE = '${desktop_file_utils}/bin/update-desktop-database'" \ + --replace "EXE_FILE = 'file'" \ + "EXE_FILE = '${file}/bin/file'" + ''; + + installPhase = "install -Dm755 Mimeo.py $out/bin/mimeo"; + + meta = with stdenv.lib; { + description = "Open files by MIME-type or file name using regular expressions"; + homepage = http://xyne.archlinux.ca/projects/mimeo/; + license = [ licenses.gpl2 ]; + maintainers = [ maintainers.rycee ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 52c5e120ff4..ee54f66f222 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2424,6 +2424,8 @@ let mgba = qt5.callPackage ../misc/emulators/mgba { }; + mimeo = callPackage ../tools/misc/mimeo { }; + minissdpd = callPackage ../tools/networking/minissdpd { }; miniupnpc = callPackage ../tools/networking/miniupnpc { }; From d99033beb928edb040e9302904b7a736344e5bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 6 Mar 2016 20:57:50 +0100 Subject: [PATCH 52/76] grafana service: unbreak Accidentally broken by 4fede53c0996938979d2966a69f108782a8c1c12 ("nixos manuals: bring back package references"). Without this fix, grafana won't start: $ systemctl status grafana ... systemd[1]: Starting Grafana Service Daemon... systemd[1]: Started Grafana Service Daemon. grafana[666]: 2016/03/06 19:57:32 [log.go:75 Fatal()] [E] Failed to detect generated css or javascript files in static root (%!s(MISSING)), have you executed default grunt task? systemd[1]: grafana.service: Main process exited, code=exited, status=1/FAILURE systemd[1]: grafana.service: Unit entered failed state. systemd[1]: grafana.service: Failed with result 'exit-code'. --- nixos/modules/services/monitoring/grafana.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix index 1dec528b5a2..5c6f063b149 100644 --- a/nixos/modules/services/monitoring/grafana.nix +++ b/nixos/modules/services/monitoring/grafana.nix @@ -87,7 +87,7 @@ in { staticRootPath = mkOption { description = "Root path for static assets."; - default = "${cfg.package.out}/share/grafana/public"; + default = "${cfg.package}/share/grafana/public"; type = types.str; }; From e4abe06b8ab61b9808d753f3fa74421f68ad1ad3 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 5 Mar 2016 12:39:29 -0800 Subject: [PATCH 53/76] ghcjs: Use bootpkgs to override build tools, not hardcoded compiler's pgks --- pkgs/development/haskell-modules/configuration-ghcjs.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-ghcjs.nix b/pkgs/development/haskell-modules/configuration-ghcjs.nix index 5c14fe788f7..90f84d4387b 100644 --- a/pkgs/development/haskell-modules/configuration-ghcjs.nix +++ b/pkgs/development/haskell-modules/configuration-ghcjs.nix @@ -28,7 +28,8 @@ self: super: # LLVM is not supported on this GHC; use the latest one. inherit (pkgs) llvmPackages; - inherit (pkgs.haskell.packages.ghc7103) jailbreak-cabal alex happy gtk2hs-buildtools rehoo hoogle; + inherit (self.ghc.bootPkgs) + jailbreak-cabal alex happy gtk2hs-buildtools rehoo hoogle; # This is the list of the Stage 1 packages that are built into a booted ghcjs installation # It can be generated with the command: From 14201da332494161be2241b9caa0aad2cde203bb Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Sun, 6 Mar 2016 16:36:55 -0500 Subject: [PATCH 54/76] openssh: allow building without linking openssl http://undeadly.org/cgi?action=article&sid=20140430045723 has the original announcement of this option. Note, openssl headers are still required at build time, see this comment: http://www.gossamer-threads.com/lists/openssh/dev/61125#61125 --- pkgs/tools/networking/openssh/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/openssh/default.nix b/pkgs/tools/networking/openssh/default.nix index 4d3ffb1257f..494c7dfb69e 100644 --- a/pkgs/tools/networking/openssh/default.nix +++ b/pkgs/tools/networking/openssh/default.nix @@ -4,6 +4,7 @@ , withKerberos ? false , withGssapiPatches ? withKerberos , kerberos +, linkOpenssl? true }: assert withKerberos -> kerberos != null; @@ -54,7 +55,8 @@ stdenv.mkDerivation rec { (if pam != null then "--with-pam" else "--without-pam") ] ++ optional (etcDir != null) "--sysconfdir=${etcDir}" ++ optional withKerberos "--with-kerberos5=${kerberos}" - ++ optional stdenv.isDarwin "--disable-libutil"; + ++ optional stdenv.isDarwin "--disable-libutil" + ++ optional (!linkOpenssl) "--without-openssl"; preConfigure = '' configureFlagsArray+=("--with-privsep-path=$out/empty") From cdb0267efe5e867efade305d22f8eb50cf00af53 Mon Sep 17 00:00:00 2001 From: Louis Taylor Date: Mon, 7 Mar 2016 00:58:40 +0000 Subject: [PATCH 55/76] linux-testing: 4.5-rc6 -> 4.5-rc7 --- pkgs/os-specific/linux/kernel/linux-testing.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix index 9b0ec5c355a..57a825ec0a0 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.5-rc6"; - modDirVersion = "4.5.0-rc6"; + version = "4.5-rc7"; + modDirVersion = "4.5.0-rc7"; extraMeta.branch = "4.5"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/testing/linux-${version}.tar.xz"; - sha256 = "1cpbg6w0mzlxrc6crgqh5n4c8wxxr4yyikmk0bkpgsbr6qk3bydk"; + sha256 = "0z43s7ccikmqigv4insjvizs3bkx2lgjvzsz5rmmpcga28dz44kq"; }; features.iwlwifi = true; From 0360e410b76adf1176888ec4394c41e98558f58a Mon Sep 17 00:00:00 2001 From: Nathan Zadoks Date: Mon, 7 Mar 2016 01:11:41 +0100 Subject: [PATCH 56/76] bird module: run as user/group `bird`, not `ircd` --- nixos/modules/services/networking/bird.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/networking/bird.nix b/nixos/modules/services/networking/bird.nix index e7e1db19152..e76cdac14ca 100644 --- a/nixos/modules/services/networking/bird.nix +++ b/nixos/modules/services/networking/bird.nix @@ -30,7 +30,7 @@ in user = mkOption { type = types.string; - default = "ircd"; + default = "bird"; description = '' BIRD Internet Routing Daemon user. ''; @@ -38,7 +38,7 @@ in group = mkOption { type = types.string; - default = "ircd"; + default = "bird"; description = '' BIRD Internet Routing Daemon group. ''; From 68702d24bfc1a6e0a299df43aecf1cacca141372 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 7 Mar 2016 02:49:38 +0100 Subject: [PATCH 57/76] libebml: 1.3.1 -> 1.3.3 (security) This release fixes CVE-2015-8790 & CVE-2015-8791. --- pkgs/development/libraries/libebml/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libebml/default.nix b/pkgs/development/libraries/libebml/default.nix index 818177ff49d..3bdcfeda6a5 100644 --- a/pkgs/development/libraries/libebml/default.nix +++ b/pkgs/development/libraries/libebml/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "libebml-1.3.1"; + name = "libebml-1.3.3"; src = fetchurl { url = "http://dl.matroska.org/downloads/libebml/${name}.tar.bz2"; - sha256 = "15a2d15rq0x9lp7rfsv0jxaw5c139xs7s5dwr5bmd9dc3arr8n0r"; + sha256 = "16alhwd1yz5bv3765xfn5azwk37805lg1f61195gjq8rlkd49yrm"; }; meta = with stdenv.lib; { From 5e204092294e0763288d3c7fc42a29030b448f15 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 7 Mar 2016 02:50:51 +0100 Subject: [PATCH 58/76] libmatroska: 1.4.1 -> 1.4.4 (security) This fixes CVE-2015-8790 & CVE-2015-8791. --- pkgs/development/libraries/libmatroska/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/libmatroska/default.nix b/pkgs/development/libraries/libmatroska/default.nix index b4032f3c22d..134f6b1bf27 100644 --- a/pkgs/development/libraries/libmatroska/default.nix +++ b/pkgs/development/libraries/libmatroska/default.nix @@ -1,17 +1,16 @@ -{ stdenv, fetchurl, libebml }: +{ stdenv, fetchurl, pkgconfig, libebml }: stdenv.mkDerivation rec { - name = "libmatroska-1.4.1"; + name = "libmatroska-1.4.4"; src = fetchurl { url = "http://dl.matroska.org/downloads/libmatroska/${name}.tar.bz2"; - sha256 = "1dzglkl0hpimld1kahkrrp857hw5pg1r7xxbpnx7jmlj7s3j2vq8"; + sha256 = "1mvb54q3gag9dj0pkwci8w75gp6mm14gi85y0ld3ar1rdngsmvyk"; }; - configurePhase = "cd make/linux"; - makeFlags = "prefix=$(out) LIBEBML_INCLUDE_DIR=${libebml}/include LIBEBML_LIB_DIR=${libebml}/lib" - + stdenv.lib.optionalString stdenv.isDarwin " CXX=clang++"; - propagatedBuildInputs = [ libebml ]; + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ libebml ]; meta = with stdenv.lib; { description = "A library to parse Matroska files"; From 0da9c6b358c3ec2515795f825db3e45f05606975 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 7 Mar 2016 04:37:40 +0300 Subject: [PATCH 59/76] octoprint-plugins.m3d-fio: 0.29 -> 0.28.2 --- pkgs/applications/misc/octoprint/plugins.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/octoprint/plugins.nix b/pkgs/applications/misc/octoprint/plugins.nix index ba31d3fb342..1ae11be3cdd 100644 --- a/pkgs/applications/misc/octoprint/plugins.nix +++ b/pkgs/applications/misc/octoprint/plugins.nix @@ -8,13 +8,13 @@ in { m3d-fio = buildPlugin rec { name = "M3D-Fio-${version}"; - version = "0.29"; + version = "0.28.2"; src = fetchFromGitHub { owner = "donovan6000"; repo = "M3D-Fio"; rev = "V${version}"; - sha256 = "1ifbq7yibq42jjvqvklnx3qzr6vk2ngsxh3xhlbdrhqrg54gky4r"; + sha256 = "1fwy6xmbid89rn7w7v779wb34gmfzc1fkggv3im1r7a7jrzph6nx"; }; patches = [ From 3f3e8ed82bc9d80d5acf0c0513e3b3eb770b9ed9 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Mon, 7 Mar 2016 02:04:20 +0000 Subject: [PATCH 60/76] upower: 0.99.3 -> 0.99.4 --- pkgs/os-specific/linux/upower/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/upower/default.nix b/pkgs/os-specific/linux/upower/default.nix index 0f7f93a5741..490df3e1abe 100644 --- a/pkgs/os-specific/linux/upower/default.nix +++ b/pkgs/os-specific/linux/upower/default.nix @@ -6,11 +6,11 @@ assert stdenv.isLinux; stdenv.mkDerivation rec { - name = "upower-0.99.3"; + name = "upower-0.99.4"; src = fetchurl { url = "http://upower.freedesktop.org/releases/${name}.tar.xz"; - sha256 = "0f6x9mi1jzgqdpycaikyhjljnw3aacsl3gxndyg0dfqkq6y9jwb9"; + sha256 = "1c1ph1j1fnrf3vipxb7ncmdfc36dpvcvpsv8n8lmal7grjk2b8ww"; }; buildInputs = From 7f44b58609d6393f9716d187c7dc4f8f999b73e9 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 7 Mar 2016 00:54:38 +0100 Subject: [PATCH 61/76] =?UTF-8?q?wheter=20=E2=86=92=20whether?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nice weather today, isn’t it? --- nixos/lib/make-iso9660-image.nix | 2 +- nixos/modules/services/networking/nsd.nix | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nixos/lib/make-iso9660-image.nix b/nixos/lib/make-iso9660-image.nix index b2409c6006b..21c9cca316d 100644 --- a/nixos/lib/make-iso9660-image.nix +++ b/nixos/lib/make-iso9660-image.nix @@ -22,7 +22,7 @@ , # Whether this should be an efi-bootable El-Torito CD. efiBootable ? false -, # Wheter this should be an hybrid CD (bootable from USB as well as CD). +, # Whether this should be an hybrid CD (bootable from USB as well as CD). usbBootable ? false , # The path (in the ISO file system) of the boot image. diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix index ca08bb57895..333a3378c4c 100644 --- a/nixos/modules/services/networking/nsd.nix +++ b/nixos/modules/services/networking/nsd.nix @@ -346,7 +346,7 @@ in type = types.bool; default = true; description = '' - Wheter NSD should answer VERSION.BIND and VERSION.SERVER CHAOS class queries. + Whether NSD should answer VERSION.BIND and VERSION.SERVER CHAOS class queries. ''; }; @@ -378,7 +378,7 @@ in type = types.bool; default = true; description = '' - Wheter to listen on IPv4 connections. + Whether to listen on IPv4 connections. ''; }; @@ -394,7 +394,7 @@ in type = types.bool; default = true; description = '' - Wheter to listen on IPv6 connections. + Whether to listen on IPv6 connections. ''; }; @@ -434,7 +434,7 @@ in type = types.bool; default = pkgs.stdenv.isLinux; description = '' - Wheter to enable SO_REUSEPORT on all used sockets. This lets multiple + Whether to enable SO_REUSEPORT on all used sockets. This lets multiple processes bind to the same port. This speeds up operation especially if the server count is greater than one and makes fast restarts less prone to fail @@ -445,7 +445,7 @@ in type = types.bool; default = false; description = '' - Wheter if this server will be a root server (a DNS root server, you + Whether this server will be a root server (a DNS root server, you usually don't want that). ''; }; @@ -524,7 +524,7 @@ in type = types.bool; default = true; description = '' - Wheter to check mtime of all zone files on start and sighup. + Whether to check mtime of all zone files on start and sighup. ''; }; From c686f03305334b247d8fb742fa98ab559f661b6e Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 7 Mar 2016 03:05:28 +0100 Subject: [PATCH 62/76] tomcat: 6.0.44 -> 6.0.45, 7.0.62 -> 7.0.68, 8.0.23 -> 8.0.32 Fixes at least CVE-2015-5174, CVE-2015-5345, CVE-2015-5351, CVE-2016-0706, CVE-2016-0714, CVE-2016-0763. --- pkgs/servers/http/tomcat/6.0.nix | 4 ++-- pkgs/servers/http/tomcat/7.0.nix | 4 ++-- pkgs/servers/http/tomcat/8.0.nix | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/servers/http/tomcat/6.0.nix b/pkgs/servers/http/tomcat/6.0.nix index 71f1d62f4d8..c01e5065764 100644 --- a/pkgs/servers/http/tomcat/6.0.nix +++ b/pkgs/servers/http/tomcat/6.0.nix @@ -1,6 +1,6 @@ import ./recent.nix { versionMajor = "6"; - versionMinor = "0.44"; - sha256 = "0942f0ss6w9k23xg94nir2dbbkqrqp5k628jflk51ikm5qr95dxa"; + versionMinor = "0.45"; + sha256 = "0ba8h86padpk23xmscp7sg70g0v8ji2jbwwriz59hxqy5zhd76wg"; } diff --git a/pkgs/servers/http/tomcat/7.0.nix b/pkgs/servers/http/tomcat/7.0.nix index 221feb9c30e..b38f4353cc4 100644 --- a/pkgs/servers/http/tomcat/7.0.nix +++ b/pkgs/servers/http/tomcat/7.0.nix @@ -1,6 +1,6 @@ import ./recent.nix { versionMajor = "7"; - versionMinor = "0.62"; - sha256 = "0v8zvyd4h85ynnday58x0ppplw4flxyjsrmrpg78rrv3w49fm1x7"; + versionMinor = "0.68"; + sha256 = "1q5qgci5ia25zqa1k1n2xzarsgk1317ya89mfgg0fmi65x1046ic"; } diff --git a/pkgs/servers/http/tomcat/8.0.nix b/pkgs/servers/http/tomcat/8.0.nix index a6da1198c9a..00460179667 100644 --- a/pkgs/servers/http/tomcat/8.0.nix +++ b/pkgs/servers/http/tomcat/8.0.nix @@ -1,6 +1,6 @@ import ./recent.nix { versionMajor = "8"; - versionMinor = "0.23"; - sha256 = "0f0s35iqs1zpifya0qvdrk55r77jr074sc0zk5cjivxaxnhik2y9"; + versionMinor = "0.32"; + sha256 = "1f59x5z8qf4rzy49m8d5ifi4h1ghkz5r33l3i67sib414h7jc8vy"; } From d3e3b135eae02727e9d58e32cb785748cdcdfd24 Mon Sep 17 00:00:00 2001 From: Christoph Hrdinka Date: Mon, 7 Mar 2016 00:08:46 +0100 Subject: [PATCH 63/76] pidgin: fix gstreamer plugin path Closes #13722, fixes #13719 and maybe #10556. --- .../instant-messengers/pidgin/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix index 5e8f266930f..7e9e41ea0bf 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, gtk, gtkspell, aspell -, gstreamer, gst_plugins_base, startupnotification, gettext +{ stdenv, fetchurl, makeWrapper, pkgconfig, gtk, gtkspell, aspell +, gstreamer, gst_plugins_base, gst_plugins_good, startupnotification, gettext , perl, perlXMLParser, libxml2, nss, nspr, farsight2 , libXScrnSaver, ncurses, avahi, dbus, dbus_glib, intltool, libidn , lib, python, libICE, libXext, libSM @@ -22,9 +22,11 @@ stdenv.mkDerivation rec { inherit nss ncurses; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ gtkspell aspell - gstreamer gst_plugins_base startupnotification + gstreamer gst_plugins_base gst_plugins_good startupnotification libxml2 nss nspr farsight2 libXScrnSaver ncurses python avahi dbus dbus_glib intltool libidn @@ -54,6 +56,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + postInstall = '' + wrapProgram $out/bin/pidgin \ + --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" + ''; + meta = with stdenv.lib; { description = "Multi-protocol instant messaging client"; homepage = http://pidgin.im; From 4f013e9159cdf997f3a8b4f4fe0bd235d245270d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 7 Mar 2016 00:44:36 -0700 Subject: [PATCH 64/76] libsoundio: 1.0.3 -> 1.1.0 --- pkgs/development/libraries/libsoundio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libsoundio/default.nix b/pkgs/development/libraries/libsoundio/default.nix index 9f9f89ec812..a35ab14e253 100644 --- a/pkgs/development/libraries/libsoundio/default.nix +++ b/pkgs/development/libraries/libsoundio/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchFromGitHub, cmake, alsaLib, libjack2-git, libpulseaudio }: stdenv.mkDerivation rec { - version = "1.0.3"; + version = "1.1.0"; name = "libsoundio-${version}"; src = fetchFromGitHub { owner = "andrewrk"; repo = "libsoundio"; rev = "${version}"; - sha256 = "0xnv0rsan57i07ky823jczylbcpbzjk6j06fw9x0md65arcgcqfy"; + sha256 = "0mw197l4bci1cjc2z877gxwsvk8r43dr7qiwci2hwl2cjlcnqr2p"; }; buildInputs = [ cmake alsaLib libjack2-git libpulseaudio ]; From ada105188814daf32f8ac559250b08a3167453aa Mon Sep 17 00:00:00 2001 From: Avery Glitch Date: Mon, 7 Mar 2016 18:53:40 +1100 Subject: [PATCH 65/76] Added vim plugins Lightline and Spacegray --- pkgs/misc/vim-plugins/default.nix | 20 ++++++++++++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 2 ++ 2 files changed, 22 insertions(+) diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix index 5e6e73419d2..c61947fc8f7 100644 --- a/pkgs/misc/vim-plugins/default.nix +++ b/pkgs/misc/vim-plugins/default.nix @@ -1616,4 +1616,24 @@ rec { }; + lightline-vim = buildVimPluginFrom2Nix { + name = "lightline-2016-02-10"; + src = fetchgit { + url = "git://github.com/itchyny/lightline.vim"; + rev = "e6a43f98fab1ee2e373bd0b670803222607ed123"; + sha256 = "abb836d728a8f674f3aa71c4936798c9be02bb352ca0e6e5f5b262886622ac3b"; + }; + dependencies = []; + }; + + Spacegray-vim = buildVimPluginFrom2Nix { + name = "spacegray-2015-04-05"; + src = fetchgit { + url = "git://github.com/ajh17/Spacegray.vim"; + rev = "1c10d0da045609910e8fb03b33c043bbcff35d9e"; + sha256 = "bced8987539ca42f84350b90e2570a226dad66e8061b90b79a41d51f9fb4b4b5"; + }; + dependencies = []; + }; + } diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 87420a7a4ca..82b59f1ebaa 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -21,6 +21,7 @@ "ghcmod" "github:Chiel92/vim-autoformat" "github:LnL7/vim-nix" +"github:ajh17/Spacegray.vim" "github:ap/vim-css-color" "github:benekastah/neomake" "github:bitc/vim-hdevtools" @@ -34,6 +35,7 @@ "github:idris-hackers/idris-vim" "github:itchyny/calendar.vim" "github:itchyny/thumbnail.vim" +"github:itchyny/lightline.vim" "github:ivanov/vim-ipython" "github:jceb/vim-hier" "github:jeetsukumaran/vim-buffergator" From a6479aa58088409fac6194c662cd76a71d16de6d Mon Sep 17 00:00:00 2001 From: = Date: Mon, 7 Mar 2016 11:01:29 +0100 Subject: [PATCH 66/76] non: 2016-02-07 -> 2016-03-06 --- pkgs/applications/audio/non/default.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/audio/non/default.nix b/pkgs/applications/audio/non/default.nix index 5a54c94f1f9..ead53721950 100644 --- a/pkgs/applications/audio/non/default.nix +++ b/pkgs/applications/audio/non/default.nix @@ -1,23 +1,23 @@ -{ stdenv, fetchFromGitHub, pkgconfig, python2, cairo, libjpeg, ntk, libjack2, libsndfile, -ladspaH, liblrdf, liblo, libsigcxx +{ stdenv, fetchFromGitHub, pkgconfig, python2, cairo, libjpeg, ntk, libjack2 +, libsndfile, ladspaH, liblrdf, liblo, libsigcxx }: stdenv.mkDerivation rec { name = "non-${version}"; - version = "2016-02-07"; + version = "2016-03-06"; src = fetchFromGitHub { owner = "original-male"; repo = "non"; - rev = "1ef382fbbea598fdb56b25244a703c64ecaf8446"; - sha256 = "1mi3nm0nrrqlk36920irvqf5080lbnj1qc8vnxspgwkjjqgdc22g"; + rev = "3946d392216ee999b560d8b7cdee7c4347110e29"; + sha256 = "02vnq2mfimgdrmv3lmz80yif4h9a1lympv0wqc5dr2l0f8amj2fp"; }; - buildInputs = [ pkgconfig python2 cairo libjpeg ntk libjack2 libsndfile + buildInputs = [ pkgconfig python2 cairo libjpeg ntk libjack2 libsndfile ladspaH liblrdf liblo libsigcxx - ]; - configurePhase = ''python waf configure --prefix=$out''; - buildPhase = ''python waf build''; - installPhase = ''python waf install''; + ]; + configurePhase = "python waf configure --prefix=$out"; + buildPhase = "python waf build"; + installPhase = "python waf install"; meta = { description = "Lightweight and lightning fast modular Digital Audio Workstation"; From 495985ace397cb24f6d3bc317945aa32fdabf4db Mon Sep 17 00:00:00 2001 From: "Matthias C. M. Troffaes" Date: Mon, 7 Mar 2016 09:50:52 +0000 Subject: [PATCH 67/76] wolfssl: 3.7.0 -> 3.8.0 changes by @globin: use autoreconfHook closes #13731 Signed-off-by: Robin Gloster --- pkgs/development/libraries/wolfssl/default.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/wolfssl/default.nix b/pkgs/development/libraries/wolfssl/default.nix index 5bb63c915e6..31ac49a2ce4 100644 --- a/pkgs/development/libraries/wolfssl/default.nix +++ b/pkgs/development/libraries/wolfssl/default.nix @@ -1,19 +1,17 @@ -{ stdenv, fetchurl, autoconf, automake, libtool }: +{ stdenv, fetchFromGitHub, autoreconfHook }: stdenv.mkDerivation rec { name = "wolfssl-${version}"; - version = "3.7.0"; + version = "3.8.0"; - src = fetchurl { - url = "https://github.com/wolfSSL/wolfssl/archive/v${version}.tar.gz"; - sha256 = "1r1awivral4xjjvnna9lrfz2rh84rcbp04834rymbsz0kbyykgb6"; + src = fetchFromGitHub { + owner = "wolfSSL"; + repo = "wolfssl"; + rev = "v${version}"; + sha256 = "0vc2120a9gfxg3rv018ch1g84ia2cpplcqbpy8v6vpfb79rn1nf5"; }; - nativeBuildInputs = [ autoconf automake libtool ]; - - preConfigure = '' - ./autogen.sh - ''; + nativeBuildInputs = [ autoreconfHook ]; meta = with stdenv.lib; { description = "A small, fast, portable implementation of TLS/SSL for embedded devices"; From e338d6a0fc1293c1d5b63d9e38e690526fc7d1b1 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 7 Mar 2016 13:32:20 +0100 Subject: [PATCH 68/76] splix: revert "2.0.0 -> svn-r315" version update This reverts commit 6ea526462b1a1adf and a9f8613dae32b10d to fix https://github.com/NixOS/nixpkgs/issues/13734. --- pkgs/misc/cups/drivers/splix/default.nix | 22 +++++++++---------- .../drivers/splix/splix-2.0.0-gcc45.patch | 18 +++++++++++++++ 2 files changed, 29 insertions(+), 11 deletions(-) create mode 100644 pkgs/misc/cups/drivers/splix/splix-2.0.0-gcc45.patch diff --git a/pkgs/misc/cups/drivers/splix/default.nix b/pkgs/misc/cups/drivers/splix/default.nix index ab6bcfba6a1..532ef2a45d5 100644 --- a/pkgs/misc/cups/drivers/splix/default.nix +++ b/pkgs/misc/cups/drivers/splix/default.nix @@ -1,20 +1,20 @@ -{ stdenv, fetchsvn, fetchurl, cups, zlib }: -let rev = "315"; in +{stdenv, fetchurl, cups, zlib}: + stdenv.mkDerivation rec { - name = "splix-svn-${rev}"; - src = fetchsvn { - # We build this from svn, because splix hasn't been in released in several years - # although the community has been adding some new printer models. - url = "svn://svn.code.sf.net/p/splix/code/splix"; - rev = "r${rev}"; - sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl"; + name = "splix-2.0.0"; + + src = fetchurl { + url = "mirror://sourceforge/splix/${name}.tar.bz2"; + sha256 = "0bwivrwwvh6hzvnycpzqs7a0capgycahc4s3v9ihx552fgy07xwp"; }; - preBuild = '' + patches = [ ./splix-2.0.0-gcc45.patch ]; + + preBuild='' makeFlags="V=1 DISABLE_JBIG=1 CUPSFILTER=$out/lib/cups/filter CUPSPPD=$out/share/cups/model" ''; - buildInputs = [ cups zlib ]; + buildInputs = [cups zlib]; meta = { homepage = http://splix.sourceforge.net; diff --git a/pkgs/misc/cups/drivers/splix/splix-2.0.0-gcc45.patch b/pkgs/misc/cups/drivers/splix/splix-2.0.0-gcc45.patch new file mode 100644 index 00000000000..5ccdcb2514c --- /dev/null +++ b/pkgs/misc/cups/drivers/splix/splix-2.0.0-gcc45.patch @@ -0,0 +1,18 @@ +Fixing build with gcc 4.5 + +http://bugs.gentoo.org/show_bug.cgi?id=318581 + +downloaded from +http://gentoo-overlays.zugaina.org/gentoo/portage/net-print/splix/files/splix-2.0.0-gcc45.patch + +--- splix-old/src/ppdfile.cpp ++++ splix-new/src/ppdfile.cpp +@@ -282,7 +282,7 @@ + * Opérateur d'assignation + * Assignment operator + */ +-void PPDFile::Value::operator = (const PPDFile::Value::Value &val) ++void PPDFile::Value::operator = (const PPDFile::Value &val) + { + if (_preformatted) + delete[] _preformatted; From 17f0573c900372bcaf0c8c406563350949539c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Galliat?= Date: Mon, 7 Mar 2016 10:06:18 -0500 Subject: [PATCH 69/76] go2nix: update to 4c552da --- pkgs/top-level/go-packages.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/go-packages.nix b/pkgs/top-level/go-packages.nix index dd9a9dde7bb..888ffe474f2 100644 --- a/pkgs/top-level/go-packages.nix +++ b/pkgs/top-level/go-packages.nix @@ -3767,12 +3767,22 @@ let }; go2nix = buildFromGitHub rec { - rev = "dd513f1f1336a3cdceb9dd4be0f3c47a09929651"; + rev = "4c552dadd855e3694ed3499feb46dca9cd855f60"; owner = "kamilchm"; repo = "go2nix"; - sha256 = "1ad7zcab5vjbw7a8ns0aspkblqqz0z96b7ak3zdx409rq7rlqdsj"; - buildInputs = [ go-bindata.bin tools.bin vcs go-spew gls go-difflib assertions goconvey testify kingpin ]; + sha256 = "1pwnm1vrjxvgl17pk9n1k5chmhgwxkrwp2s1bzi64xf12anibj63"; + + buildInputs = [ pkgs.makeWrapper go-bindata.bin tools.bin vcs go-spew gls go-difflib assertions goconvey testify kingpin ]; + preBuild = ''go generate ./...''; + + postInstall = '' + wrapProgram $bin/bin/go2nix \ + --prefix PATH : ${pkgs.nix-prefetch-git}/bin \ + --prefix PATH : ${pkgs.git}/bin + ''; + + allowGoReference = true; }; godotenv = buildFromGitHub rec { From 0ee75214f336474e127c2e3546c0406a0c4d5fa7 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 7 Mar 2016 07:16:04 -0800 Subject: [PATCH 70/76] proofgeneral_HEAD: New expr: Proof General from GitHub --- .../editors/emacs-modes/proofgeneral/HEAD.nix | 52 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 56 insertions(+) create mode 100644 pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix diff --git a/pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix b/pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix new file mode 100644 index 00000000000..a8760afc58b --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/proofgeneral/HEAD.nix @@ -0,0 +1,52 @@ +{ stdenv, fetchgit, emacs, texinfo, texLive, perl, which, automake, enableDoc ? false }: + +stdenv.mkDerivation (rec { + name = "ProofGeneral-HEAD"; + + src = fetchgit { + url = "https://github.com/ProofGeneral/PG.git"; + rev = "16991280fb09743ae7320aef77f6a166afb907d7"; + sha256 = "08zhfl6xbl4q7lrl7wdp72xr155k06778by0d60g28mfx59b7sqc"; + }; + + buildInputs = [ emacs texinfo perl which ] ++ stdenv.lib.optional enableDoc texLive; + + prePatch = + '' sed -i "Makefile" \ + -e "s|^\(\(DEST_\)\?PREFIX\)=.*$|\1=$out|g ; \ + s|/sbin/install-info|install-info|g" + + + sed -i "bin/proofgeneral" -e's/which/type -p/g' + + # @image{ProofGeneral} fails, so remove it. + sed -i '94d' doc/PG-adapting.texi + sed -i '96d' doc/ProofGeneral.texi + ''; + + patches = [ ./pg.patch ]; + + preBuild = '' + make clean; + ''; + + installPhase = + if enableDoc + then + # Copy `texinfo.tex' in the right place so that `texi2pdf' works. + '' cp -v "${automake}/share/"automake-*/texinfo.tex doc + make install install-doc + '' + else "make install"; + + meta = { + description = "Proof General, an Emacs front-end for proof assistants"; + longDescription = '' + Proof General is a generic front-end for proof assistants (also known as + interactive theorem provers), based on the customizable text editor Emacs. + ''; + homepage = http://proofgeneral.inf.ed.ac.uk; + license = stdenv.lib.licenses.gpl2Plus; + platforms = stdenv.lib.platforms.unix; # arbitrary choice + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7c81b48f31f..b6c83a3cbbf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12000,6 +12000,10 @@ let texinfo = texinfo4 ; texLive = texlive.combine { inherit (texlive) scheme-basic cm-super ec; }; }; + proofgeneral_HEAD = callPackage ../applications/editors/emacs-modes/proofgeneral/HEAD.nix { + texinfo = texinfo4 ; + texLive = texlive.combine { inherit (texlive) scheme-basic cm-super ec; }; + }; proofgeneral = self.proofgeneral_4_2; quack = callPackage ../applications/editors/emacs-modes/quack { }; From cf71bc9255b6a71ee756a82e05e9204cc32eaffa Mon Sep 17 00:00:00 2001 From: Henry Till Date: Mon, 7 Mar 2016 10:49:19 -0500 Subject: [PATCH 71/76] racket: fix build error https://github.com/racket/racket/issues/1222 closes #13733 --- pkgs/development/interpreters/racket/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/interpreters/racket/default.nix b/pkgs/development/interpreters/racket/default.nix index d22d3849b1b..748482b1bf0 100644 --- a/pkgs/development/interpreters/racket/default.nix +++ b/pkgs/development/interpreters/racket/default.nix @@ -28,6 +28,11 @@ let sqlite ]; + boolPatch = fetchurl { + url = "http://copr-dist-git.fedorainfracloud.org/cgit/bthomas/racket/racket.git/plain/xform-errors-converting-fix.patch"; + sha256 = "0h5g7a7w8wwj43jb8q69xldgbyxkn0y0i1na6r9fk17dd56nsm68"; + }; + in stdenv.mkDerivation rec { @@ -51,6 +56,10 @@ stdenv.mkDerivation rec { cd src/build ''; + # https://github.com/racket/racket/issues/1222 + # Fixed upstream after the release of 6.4 + patches = [ boolPatch ]; + shared = if stdenv.isDarwin then "dylib" else "shared"; configureFlags = [ "--enable-${shared}" "--enable-lt=${libtool}/bin/libtool" ] ++ stdenv.lib.optional disableDocs [ "--disable-docs" ] From aaa443516f247c07946ba31995c04d020ff6ad77 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Mon, 7 Mar 2016 19:24:24 +0100 Subject: [PATCH 72/76] mkvtoolnix: 8.4.0 -> 8.9.0 --- .../applications/video/mkvtoolnix/default.nix | 94 +++++++------------ pkgs/top-level/all-packages.nix | 3 - 2 files changed, 36 insertions(+), 61 deletions(-) diff --git a/pkgs/applications/video/mkvtoolnix/default.nix b/pkgs/applications/video/mkvtoolnix/default.nix index cda861497e1..54bd2b5f979 100644 --- a/pkgs/applications/video/mkvtoolnix/default.nix +++ b/pkgs/applications/video/mkvtoolnix/default.nix @@ -1,76 +1,54 @@ -{ stdenv, fetchurl, gettext, pkgconfig, ruby -, boost, expat, file, flac, libebml, libmatroska, libogg, libvorbis, xdg_utils, zlib -# pugixml (not packaged) -, buildConfig ? "all" -, withGUI ? false, qt5 ? null # Disabled for now until upstream issues are resolved -, legacyGUI ? true, wxGTK ? null -# For now both qt5 and wxwidgets gui's are enabled, if wxwidgets is disabled the -# build system doesn't install desktop entries, icons, etc... -, libiconv +{ stdenv, fetchgit, pkgconfig, autoconf, automake +, ruby, file, xdg_utils, gettext, expat, qt5, boost +, libebml, zlib, libmatroska, libogg, libvorbis, flac +, withGUI ? true }: -let - inherit (stdenv.lib) enableFeature optional; -in - assert withGUI -> qt5 != null; -assert legacyGUI -> wxGTK != null; + +with stdenv.lib; stdenv.mkDerivation rec { name = "mkvtoolnix-${version}"; - version = "8.4.0"; + version = "8.9.0"; - src = fetchurl { - url = "http://www.bunkus.org/videotools/mkvtoolnix/sources/${name}.tar.xz"; - sha256 = "0y7qm8q9vpvjiw7b69k9140pw9nhvs6ggmk56yxnmcd02inm19gn"; + src = fetchgit { + url = "https://github.com/mbunkus/mkvtoolnix.git"; + rev = "54e6b52b3dde07f89da4542997ef059e18802128"; + sha256 = "1hm9f9q60c0axmmlsalazsiil8gk3v8q6cl5qxsfa95m51i39878"; }; - patchPhase = '' - patchShebangs ./rake.d/ - patchShebangs ./Rakefile - # Force ruby encoding to use UTF-8 or else when enabling qt5 the Rakefile may - # fail with `invalid byte sequence in US-ASCII' due to UTF-8 characters - # This workaround replaces an arbitrary comment in the drake file - sed -e 's,#--,Encoding.default_external = Encoding::UTF_8,' -i ./drake - ''; - - configureFlags = [ - "--with-boost-libdir=${boost.lib}/lib" - "--without-curl" - ] ++ ( - if (withGUI || legacyGUI) then [ - "--with-mkvtoolnix-gui" - "--enable-gui" - (enableFeature withGUI "qt") - (enableFeature legacyGUI "wxwidgets") - ] else [ - "--disable-gui" - ] - ); - - nativeBuildInputs = [ gettext pkgconfig ruby ]; + nativeBuildInputs = [ gettext ruby ]; buildInputs = [ - boost expat file flac libebml libmatroska libogg libvorbis xdg_utils zlib - ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ] - ++ optional withGUI qt5 - ++ optional legacyGUI wxGTK; + pkgconfig autoconf automake expat + file xdg_utils boost libebml zlib + libmatroska libogg libvorbis flac + (optional withGUI qt5.qtbase) + ]; - enableParallelBuilding = true; + preConfigure = "./autogen.sh"; + buildPhase = "./drake -j $NIX_BUILD_CORES"; + installPhase = "./drake install -j $NIX_BUILD_CORES"; - buildPhase = '' - ./drake - ''; - - installPhase = '' - ./drake install - ''; + configureFlags = [ + "--enable-magic" + "--enable-optimization" + "--with-boost-libdir=${boost.lib}/lib" + "--disable-debug" + "--disable-profiling" + "--disable-precompiled-headers" + "--disable-static-qt" + "--without-curl" + "--with-gettext" + (enableFeature withGUI "qt") + ]; meta = with stdenv.lib; { description = "Cross-platform tools for Matroska"; - homepage = http://www.bunkus.org/videotools/mkvtoolnix/; - license = licenses.gpl2; - maintainers = with maintainers; [ codyopel fuuzetsu ]; - platforms = platforms.all; + homepage = http://www.bunkus.org/videotools/mkvtoolnix/; + license = licenses.gpl2; + maintainers = with maintainers; [ codyopel fuuzetsu rnhmjoj ]; + platforms = platforms.linux; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b6c83a3cbbf..faba12c71c0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8148,9 +8148,6 @@ let mkvtoolnix-cli = mkvtoolnix.override { withGUI = false; - qt5 = null; - legacyGUI = false; - wxGTK = null; }; mlt-qt4 = callPackage ../development/libraries/mlt { From 4c1be2b7da9bcab6428aaf10b1681c7436a4c12e Mon Sep 17 00:00:00 2001 From: obadz Date: Mon, 7 Mar 2016 17:33:32 +0000 Subject: [PATCH 73/76] pithos: add desktop item --- pkgs/applications/audio/pithos/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/audio/pithos/default.nix b/pkgs/applications/audio/pithos/default.nix index 1083f9434a9..ac42fc71642 100644 --- a/pkgs/applications/audio/pithos/default.nix +++ b/pkgs/applications/audio/pithos/default.nix @@ -19,6 +19,11 @@ pythonPackages.buildPythonApplication rec { substituteInPlace setup.py --replace "/usr/share" "$out/share" ''; + postInstall = '' + mkdir -p $out/share/applications + cp -v data/pithos.desktop $out/share/applications + ''; + buildInputs = [ wrapGAppsHook ]; propagatedBuildInputs = From 99a27e7137a232117155e1d8f368761559bc2601 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Thu, 18 Feb 2016 13:18:10 +0100 Subject: [PATCH 74/76] nixos.transmission: whitelist lz4 in AppArmor rules --- nixos/modules/services/torrent/transmission.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index 5ae12ac1e95..7718a721763 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -128,6 +128,7 @@ in ${pkgs.c-ares}/lib/libcares*.so* mr, ${pkgs.libcap}/lib/libcap*.so* mr, ${pkgs.attr}/lib/libattr*.so* mr, + ${pkgs.lz4}/lib/liblz4*.so* mr, @{PROC}/sys/kernel/random/uuid r, @{PROC}/sys/vm/overcommit_memory r, From a227bd4e3b9c98f61fa98f305ea191cb20dbbabd Mon Sep 17 00:00:00 2001 From: Al Zohali Date: Mon, 7 Mar 2016 22:48:14 +0300 Subject: [PATCH 75/76] nix.requireSignedBinaryCaches: description fix --- nixos/modules/services/misc/nix-daemon.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index cf2ee20801a..78f0cd18040 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -257,13 +257,11 @@ in type = types.bool; default = true; description = '' - If enabled, Nix will only download binaries from binary - caches if they are cryptographically signed with any of the - keys listed in - . If disabled (the - default), signatures are neither required nor checked, so - it's strongly recommended that you use only trustworthy - caches and https to prevent man-in-the-middle attacks. + If enabled (the default), Nix will only download binaries from binary caches if + they are cryptographically signed with any of the keys listed in + . If disabled, signatures are neither + required nor checked, so it's strongly recommended that you use only + trustworthy caches and https to prevent man-in-the-middle attacks. ''; }; From 896a70aa52ad1cd912d07859dfb69db2bcc24181 Mon Sep 17 00:00:00 2001 From: Al Zohali Date: Mon, 7 Mar 2016 23:04:34 +0300 Subject: [PATCH 76/76] KDC description fix --- nixos/modules/config/krb5.nix | 2 +- nixos/modules/services/system/kerberos.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/config/krb5.nix b/nixos/modules/config/krb5.nix index d2198e4ac1a..b845ef69a75 100644 --- a/nixos/modules/config/krb5.nix +++ b/nixos/modules/config/krb5.nix @@ -32,7 +32,7 @@ in kdc = mkOption { default = "kerberos.mit.edu"; - description = "Kerberos Domain Controller."; + description = "Key Distribution Center"; }; kerberosAdminServer = mkOption { diff --git a/nixos/modules/services/system/kerberos.nix b/nixos/modules/services/system/kerberos.nix index e0c3f95c3cc..347302c6090 100644 --- a/nixos/modules/services/system/kerberos.nix +++ b/nixos/modules/services/system/kerberos.nix @@ -46,7 +46,7 @@ in }; systemd.services.kdc = { - description = "Kerberos Domain Controller daemon"; + description = "Key Distribution Center daemon"; wantedBy = [ "multi-user.target" ]; preStart = '' mkdir -m 0755 -p ${stateDir} @@ -55,7 +55,7 @@ in }; systemd.services.kpasswdd = { - description = "Kerberos Domain Controller daemon"; + description = "Kerberos Password Changing daemon"; wantedBy = [ "multi-user.target" ]; script = "${heimdal}/sbin/kpasswdd"; };