From 833ef67312b011663758eb46a3b0b19bef5b87b9 Mon Sep 17 00:00:00 2001 From: Johannes Frankenau Date: Wed, 7 Mar 2018 15:30:29 +0100 Subject: [PATCH 01/87] nixos/i18n: add option for extra locale settings --- nixos/modules/config/i18n.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix index 46b22fc1285..105cec86022 100644 --- a/nixos/modules/config/i18n.nix +++ b/nixos/modules/config/i18n.nix @@ -34,6 +34,17 @@ with lib; ''; }; + extraLocaleSettings = mkOption { + type = types.attrsOf types.str; + default = {}; + example = { LC_MESSAGES = "en_US.UTF-8"; LC_TIME = "de_DE.UTF-8"; }; + description = '' + A set of additional system-wide locale settings other than + LANG which can be configured with + . + ''; + }; + supportedLocales = mkOption { type = types.listOf types.str; default = ["all"]; @@ -129,7 +140,7 @@ with lib; environment.sessionVariables = { LANG = config.i18n.defaultLocale; LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive"; - }; + } // config.i18n.extraLocaleSettings; systemd.globalEnvironment = mkIf (config.i18n.supportedLocales != []) { LOCALE_ARCHIVE = "${config.i18n.glibcLocales}/lib/locale/locale-archive"; @@ -141,6 +152,7 @@ with lib; source = pkgs.writeText "locale.conf" '' LANG=${config.i18n.defaultLocale} + ${concatStringsSep "\n" (mapAttrsToList (n: v: ''${n}=${v}'') config.i18n.extraLocaleSettings)} ''; }; From d65b39a8052e60f6ad3e70472f7a64d8e2c8c613 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Tue, 30 Oct 2018 17:29:37 +0100 Subject: [PATCH 02/87] kernel: enable MLX5_CORE_EN when possible Hydra's builders from Packet.net use this option a lot, causing lots of slow deploys. --- pkgs/os-specific/linux/kernel/common-config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 27a615d7bb9..20a2fc2c8e6 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -638,6 +638,7 @@ let MEGARAID_NEWGEN = yes; MLX4_EN_VXLAN = whenOlder "4.8" yes; + MLX5_CORE_EN = option yes; MODVERSIONS = whenOlder "4.9" yes; MOUSE_PS2_ELANTECH = yes; # Elantech PS/2 protocol extension From a27e3b2acb6ec2c0c48ac049cdab49596a29e07c Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 18 Nov 2018 16:35:21 -0800 Subject: [PATCH 03/87] pipenv: 2018.10.13 -> 2018.11.14 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/pipenv/versions --- pkgs/development/tools/pipenv/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/pipenv/default.nix b/pkgs/development/tools/pipenv/default.nix index 7d4a58d0e39..46b77a2b998 100644 --- a/pkgs/development/tools/pipenv/default.nix +++ b/pkgs/development/tools/pipenv/default.nix @@ -2,11 +2,11 @@ with python3Packages; buildPythonApplication rec { name = "${pname}-${version}"; pname = "pipenv"; - version = "2018.10.13"; + version = "2018.11.14"; src = fetchPypi { inherit pname version; - sha256 = "0qwflq00rwk3pnldndb30f3avnbi4hvv6c8mm6l5xxnxy9dj71d7"; + sha256 = "1ni2cjgm04dwi8a0376nzwwy3gklqk9d0hkl8d9j760lvqshsxjz"; }; LC_ALL = "en_US.UTF-8"; From 2f629c1a47e795ec3a41a865ee65433b309e49a2 Mon Sep 17 00:00:00 2001 From: Roger Qiu Date: Mon, 19 Nov 2018 12:03:32 +1100 Subject: [PATCH 04/87] python-mnist: init at 0.6 --- .../python-modules/python-mnist/default.nix | 18 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 pkgs/development/python-modules/python-mnist/default.nix diff --git a/pkgs/development/python-modules/python-mnist/default.nix b/pkgs/development/python-modules/python-mnist/default.nix new file mode 100644 index 00000000000..67cb4eae251 --- /dev/null +++ b/pkgs/development/python-modules/python-mnist/default.nix @@ -0,0 +1,18 @@ +{ stdenv, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "python-mnist"; + version = "0.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "5d59a44335eccb4b310efb2ebb76f44e8588a1732cfb4923f4a502b61d8b653a"; + }; + + meta = with stdenv.lib; { + homepage = https://github.com/sorki/python-mnist; + description = "Simple MNIST data parser written in Python"; + license = licenses.bsd3; + maintainers = with maintainers; [ cmcdragonkai ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d5a0d57a2d5..387faecb168 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -617,6 +617,8 @@ in { python-ldap-test = callPackage ../development/python-modules/python-ldap-test { }; + python-mnist = callPackage ../development/python-modules/python-mnist { }; + python-igraph = callPackage ../development/python-modules/python-igraph { pkgconfig = pkgs.pkgconfig; igraph = pkgs.igraph; From 24af67b42be7916ed4e38e1021a8b9c653492c1d Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 18 Nov 2018 21:01:34 -0800 Subject: [PATCH 05/87] ocamlPackages.visitors: 20171124 -> 20180513 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/ocaml4.06.1-visitors/versions --- pkgs/development/ocaml-modules/visitors/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/visitors/default.nix b/pkgs/development/ocaml-modules/visitors/default.nix index 506721f7bf5..25a83fa7912 100644 --- a/pkgs/development/ocaml-modules/visitors/default.nix +++ b/pkgs/development/ocaml-modules/visitors/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, ocaml, findlib, ocamlbuild, cppo, ppx_tools, ppx_deriving, result }: stdenv.mkDerivation { - name = "ocaml${ocaml.version}-visitors-20171124"; + name = "ocaml${ocaml.version}-visitors-20180513"; src = fetchurl { - url = http://gallium.inria.fr/~fpottier/visitors/visitors-20171124.tar.gz; - sha256 = "04047k2v0pgwcdkgw7jk4955pgil0nj2ji0zfhmlqrdbinyfqzac"; + url = http://gallium.inria.fr/~fpottier/visitors/visitors-20180513.tar.gz; + sha256 = "12j8n9fkl43sd0j78x2zqix8m1vinswl2jgwndd62vmx98f5rl1v"; }; buildInputs = [ ocaml findlib ocamlbuild cppo ]; From bd54510d163231cf6b52c5206ab7125f1b3cef27 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 18 Nov 2018 21:17:09 -0800 Subject: [PATCH 06/87] ocamlPackages.opam-file-format: 2.0.0-rc2 -> 2.0.0 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/ocaml4.06.1-opam-file-format/versions --- pkgs/development/ocaml-modules/opam-file-format/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/opam-file-format/default.nix b/pkgs/development/ocaml-modules/opam-file-format/default.nix index 1dec7e36e1c..f61a690da19 100644 --- a/pkgs/development/ocaml-modules/opam-file-format/default.nix +++ b/pkgs/development/ocaml-modules/opam-file-format/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchFromGitHub, ocaml, findlib }: stdenv.mkDerivation rec { - version = "2.0.0-rc2"; + version = "2.0.0"; name = "ocaml${ocaml.version}-opam-file-format-${version}"; src = fetchFromGitHub { owner = "ocaml"; repo = "opam-file-format"; rev = "${version}"; - sha256 = "05g0pikmifmfkwyws5x82fglgsz3d317yfn6nrz7zmpn22cirvir"; + sha256 = "0fqb99asnair0043hhc8r158d6krv5nzvymd0xwycr5y72yrp0hv"; }; buildInputs = [ ocaml findlib ]; From c64467de653590e05aea1db3b6ea8f1d933667e6 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 18 Nov 2018 23:32:14 -0800 Subject: [PATCH 07/87] ocamlPackages.csv: 2.1 -> 2.2 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/ocaml4.06.1-csv/versions --- pkgs/development/ocaml-modules/csv/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/csv/default.nix b/pkgs/development/ocaml-modules/csv/default.nix index e10b21286dd..bfddc8d1c66 100644 --- a/pkgs/development/ocaml-modules/csv/default.nix +++ b/pkgs/development/ocaml-modules/csv/default.nix @@ -2,11 +2,11 @@ buildDunePackage rec { pname = "csv"; - version = "2.1"; + version = "2.2"; src = fetchurl { url = "https://github.com/Chris00/ocaml-${pname}/releases/download/${version}/csv-${version}.tbz"; - sha256 = "0cgfb6cwhwy7ypc1i3jyfz6sdnykp75aqi6kk0g1a2d81yjwzbcg"; + sha256 = "1llwjdi14vvfy4966crapibq0djii71x47b0yxhjcl5jw4xnsaha"; }; meta = { From 48518b481d6f3f8ae0114d00a54fd086575c3984 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Cugnet Date: Sat, 24 Nov 2018 12:29:47 +0100 Subject: [PATCH 08/87] erlangR21: 21.1.2 -> 21.1.3 --- pkgs/development/interpreters/erlang/R21.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/erlang/R21.nix b/pkgs/development/interpreters/erlang/R21.nix index 1ca652eed66..965845c5a33 100644 --- a/pkgs/development/interpreters/erlang/R21.nix +++ b/pkgs/development/interpreters/erlang/R21.nix @@ -1,8 +1,8 @@ { mkDerivation }: mkDerivation rec { - version = "21.1.2"; - sha256 = "0kn6ghr151b1qmbazc1c8k1r0wpsrqh9l3wrhfyxix3ld5yc3a5c"; + version = "21.1.3"; + sha256 = "0374qpafrpnfspsvjaa3sgs0h8ryi3ah8fvmr7dm7zsmgb4ihdsg"; prePatch = '' substituteInPlace configure.in --replace '`sw_vers -productVersion`' '10.10' From b200613f4e33cc92f28dfc18cd63d791a200acd7 Mon Sep 17 00:00:00 2001 From: Daniel Wehner Date: Sun, 25 Nov 2018 21:34:16 +0000 Subject: [PATCH 09/87] tychus: init at version 0.6.3 --- pkgs/development/tools/tychus/default.nix | 28 +++++++++++++++++++++ pkgs/development/tools/tychus/deps.nix | 30 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 3 files changed, 62 insertions(+) create mode 100644 pkgs/development/tools/tychus/default.nix create mode 100644 pkgs/development/tools/tychus/deps.nix diff --git a/pkgs/development/tools/tychus/default.nix b/pkgs/development/tools/tychus/default.nix new file mode 100644 index 00000000000..775e26eb6a8 --- /dev/null +++ b/pkgs/development/tools/tychus/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub, buildGoPackage, CoreFoundation }: + +buildGoPackage rec { + name = "tychus-${version}"; + version = "0.6.3"; + + goPackagePath = "github.com/devlocker/tychus"; + goDeps = ./deps.nix; + subPackages = []; + + src = fetchFromGitHub { + owner = "devlocker"; + repo = "tychus"; + rev = "v${version}"; + sha256 = "02ybxjsfga89gpg0k21zmykhhnpx1vy3ny8fcwj0qsg73i11alvw"; + }; + + buildInputs = stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation ]; + + buildFlags = "--tags release"; + + meta = { + description = "Command line utility to live-reload your application."; + homepage = https://github.com/devlocker/tychus; + license = stdenv.lib.licenses.mit; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/development/tools/tychus/deps.nix b/pkgs/development/tools/tychus/deps.nix new file mode 100644 index 00000000000..194aa96ae3c --- /dev/null +++ b/pkgs/development/tools/tychus/deps.nix @@ -0,0 +1,30 @@ +# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix) +[ + { + goPackagePath = "github.com/inconshreveable/mousetrap"; + fetch = { + type = "git"; + url = "https://github.com/inconshreveable/mousetrap"; + rev = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"; + sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152"; + }; + } + { + goPackagePath = "github.com/spf13/cobra"; + fetch = { + type = "git"; + url = "https://github.com/spf13/cobra"; + rev = "f91529fc609202eededff4de2dc0ba2f662240a3"; + sha256 = "10c3d5dp98rys134dnsl19ldj8bca183z91lj8rkbsy78qzrr9af"; + }; + } + { + goPackagePath = "github.com/spf13/pflag"; + fetch = { + type = "git"; + url = "https://github.com/spf13/pflag"; + rev = "e57e3eeb33f795204c1ca35f56c44f83227c6e66"; + sha256 = "13mhx4i913jil32j295m3a36jzvq1y64xig0naadiz7q9ja011r2"; + }; + } +] \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 76f9067f787..a3b17612a3c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9009,6 +9009,10 @@ with pkgs; tweak = callPackage ../applications/editors/tweak { }; + tychus = callPackage ../development/tools/tychus { + inherit (darwin.apple_sdk.frameworks) CoreFoundation; + }; + uhd = callPackage ../development/tools/misc/uhd { }; uisp = callPackage ../development/tools/misc/uisp { }; From 6db866cbd2e90525163074788dabbb3d7374e0ba Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 26 Nov 2018 17:51:18 -0500 Subject: [PATCH 10/87] Revert "zfs cannot be distributed. Disabling it in the isos." ZFS's popularity is growing, and not including it by default is a bit frustrating. On top of that, the base iso includes ZFS _anyway_ due to other packages depending upon it. I think we're in the clear to do this on the basis that Oracle probably doesn't care, it is probably fine (the SFLC agrees) and we're a small fish. If a copyright holder asks us to, we can definitely revert it again. This reverts commit 33d07c7ea9f0d05d47dd4b41ded3b261380acfac. --- nixos/modules/profiles/base.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/profiles/base.nix b/nixos/modules/profiles/base.nix index 7e14b0e2114..2a2fe119d30 100644 --- a/nixos/modules/profiles/base.nix +++ b/nixos/modules/profiles/base.nix @@ -49,7 +49,7 @@ ]; # Include support for various filesystems. - boot.supportedFilesystems = [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; + boot.supportedFilesystems = [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "zfs" "ntfs" "cifs" ]; # Configure host id for ZFS to work networking.hostId = lib.mkDefault "8425e349"; From 6c0601713730cc8e732e0c2410b6af2652ae6902 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Wed, 28 Nov 2018 09:54:31 +0100 Subject: [PATCH 11/87] jackett: 0.10.446 -> 0.10.471 --- pkgs/servers/jackett/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/jackett/default.nix b/pkgs/servers/jackett/default.nix index 9f297873dd0..b3328538496 100644 --- a/pkgs/servers/jackett/default.nix +++ b/pkgs/servers/jackett/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "jackett-${version}"; - version = "0.10.446"; + version = "0.10.471"; src = fetchurl { url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.Mono.tar.gz"; - sha256 = "1vmgywklax5br3pynjp5b74l2mkmhk3njiccjrl0l7j8ikyar1fw"; + sha256 = "0la05akvpvfg9jdgfd39wnc87zi7axzx7499w9m3py7qqqyvgyin"; }; buildInputs = [ makeWrapper ]; From b5120953c6f27e5bab6a4a02744c0bae47f80a3c Mon Sep 17 00:00:00 2001 From: Victor SENE Date: Mon, 1 Oct 2018 17:12:56 +0200 Subject: [PATCH 12/87] nixos/roundcube: add roundcube module and default configuration --- nixos/modules/services/mail/roundcube.nix | 89 +++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 nixos/modules/services/mail/roundcube.nix diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix new file mode 100644 index 00000000000..fc655add00e --- /dev/null +++ b/nixos/modules/services/mail/roundcube.nix @@ -0,0 +1,89 @@ +{ lib, config, pkgs, ... }: + +with lib; + +let + cfg = config.services.roundcube; +in +{ + options.services.roundcube = { + enable = mkEnableOption "Roundcube"; + + listenAddress = mkOption { + type = types.str; + default = 127.0.0.1; + description = "Listening address"; + }; + + listenPort = mkOption { + type = types.int; + default = 80; + description = "Listening port"; + }; + + subDomain = mkOption { + type = types.str; + example = "webmail"; + description = "Sub-domain to use which is the name of the nginx vhost"; + }; + + extraConfig = mkOption { + type = types.str; + default = '' + Date: Tue, 2 Oct 2018 11:05:20 +0200 Subject: [PATCH 13/87] nixos/roundcube: add to module-list --- nixos/modules/module-list.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 15fa7b1ac36..75e8446523f 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -332,6 +332,7 @@ ./services/mail/rspamd.nix ./services/mail/rss2email.nix ./services/mail/rmilter.nix + ./services/mail/roundcube.nix ./services/mail/nullmailer.nix ./services/misc/airsonic.nix ./services/misc/apache-kafka.nix From 2f8073bd92a8289d52c19e574ea3db96911d9e82 Mon Sep 17 00:00:00 2001 From: Victor SENE Date: Wed, 3 Oct 2018 11:22:50 +0200 Subject: [PATCH 14/87] roundcube: IPv6 by default --- nixos/modules/services/mail/roundcube.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix index fc655add00e..4639af33b63 100644 --- a/nixos/modules/services/mail/roundcube.nix +++ b/nixos/modules/services/mail/roundcube.nix @@ -11,8 +11,8 @@ in listenAddress = mkOption { type = types.str; - default = 127.0.0.1; - description = "Listening address"; + default = "[::]"; + description = "Listening address. IPv6 addresses must be enclosed in square brackets"; }; listenPort = mkOption { From 9ace7f640996bb3e95f8233a74ef980af3a35559 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 11 Oct 2018 10:09:29 +0200 Subject: [PATCH 15/87] roundcube: clean-up and add test --- nixos/modules/services/mail/roundcube.nix | 143 +++++++++++++++------- nixos/tests/roundcube.nix | 28 +++++ 2 files changed, 128 insertions(+), 43 deletions(-) create mode 100644 nixos/tests/roundcube.nix diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix index 4639af33b63..b4ab429b520 100644 --- a/nixos/modules/services/mail/roundcube.nix +++ b/nixos/modules/services/mail/roundcube.nix @@ -9,65 +9,98 @@ in options.services.roundcube = { enable = mkEnableOption "Roundcube"; - listenAddress = mkOption { - type = types.str; - default = "[::]"; - description = "Listening address. IPv6 addresses must be enclosed in square brackets"; + nginx.enable = mkOption { + type = types.bool; + default = true; + description = '' + Whether to enable nginx virtual host management. + Further nginx configuration can be done by adapting services.nginx.virtualHosts.<name>. + See for further information. + ''; }; - listenPort = mkOption { - type = types.int; - default = 80; - description = "Listening port"; - }; - - subDomain = mkOption { + hostName = mkOption { type = types.str; example = "webmail"; - description = "Sub-domain to use which is the name of the nginx vhost"; + description = "Host name to use which for the nginx vhost"; }; - - extraConfig = mkOption { - type = types.str; - default = '' - start; + $roundcube->waitForUnit("postgresql.service"); + $roundcube->waitForUnit("phpfpm-roundcube.service"); + $roundcube->succeed("curl -sSfL http://roundcube/"); + ''; +}) From 1262a5ca975b26fe113b5a03cddbc184cc7a4f58 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 28 Nov 2018 17:33:26 +0100 Subject: [PATCH 16/87] roundcube: apply code review suggestions --- nixos/modules/services/mail/roundcube.nix | 29 ++++++++++++++--------- nixos/tests/all-tests.nix | 1 + nixos/tests/roundcube.nix | 2 +- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix index b4ab429b520..6d81c7374f4 100644 --- a/nixos/modules/services/mail/roundcube.nix +++ b/nixos/modules/services/mail/roundcube.nix @@ -7,13 +7,13 @@ let in { options.services.roundcube = { - enable = mkEnableOption "Roundcube"; - - nginx.enable = mkOption { + enable = mkOption { type = types.bool; - default = true; + default = false; description = '' - Whether to enable nginx virtual host management. + Whether to enable roundcube. + + Also enables nginx virtual host management. Further nginx configuration can be done by adapting services.nginx.virtualHosts.<name>. See for further information. ''; @@ -21,8 +21,8 @@ in hostName = mkOption { type = types.str; - example = "webmail"; - description = "Host name to use which for the nginx vhost"; + example = "webmail.example.com"; + description = "Hostname to use for the nginx vhost"; }; database = { @@ -34,7 +34,12 @@ in host = mkOption { type = types.str; default = "localhost"; - description = "Host of the postgresql server"; + description = '' + Host of the postgresql server. If this is not set to + localhost, you have to create the + postgresql user and database yourself, with appropriate + permissions. + ''; }; password = mkOption { type = types.str; @@ -51,7 +56,7 @@ in type = types.listOf types.str; default = []; description = '' - List of roundcube plugins to enable. + List of roundcube plugins to enable. Currently, only those directly shipped with Roundcube are supported. ''; }; @@ -74,7 +79,7 @@ in ${cfg.extraConfig} ''; - services.nginx = mkIf cfg.nginx.enable { + services.nginx = { enable = true; virtualHosts = { ${cfg.hostName} = { @@ -100,7 +105,7 @@ in enable = true; }; - services.phpfpm.poolConfigs.${cfg.hostName} = '' + services.phpfpm.poolConfigs.roundcube = '' listen = /run/phpfpm/roundcube listen.owner = nginx listen.group = nginx @@ -139,6 +144,8 @@ in -h ${cfg.database.host} ${cfg.database.dbname} touch /var/lib/roundcube/db-created fi + + ${pkgs.php}/bin/php ${pkgs.roundcube}/bin/update.sh ''; serviceConfig.Type = "oneshot"; }; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 7bf261b58d6..feffdb97c18 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -178,6 +178,7 @@ in rabbitmq = handleTest ./rabbitmq.nix {}; radicale = handleTest ./radicale.nix {}; redmine = handleTest ./redmine.nix {}; + roundcube = handleTest ./roundcube.nix {}; rspamd = handleTest ./rspamd.nix {}; rss2email = handleTest ./rss2email.nix {}; rsyslogd = handleTest ./rsyslogd.nix {}; diff --git a/nixos/tests/roundcube.nix b/nixos/tests/roundcube.nix index faa5f3fa0df..178134fd9b3 100644 --- a/nixos/tests/roundcube.nix +++ b/nixos/tests/roundcube.nix @@ -9,7 +9,6 @@ import ./make-test.nix ({ pkgs, ...} : { services.roundcube = { enable = true; hostName = "roundcube"; - nginx.enable = true; database.password = "notproduction"; }; services.nginx.virtualHosts.roundcube = { @@ -23,6 +22,7 @@ import ./make-test.nix ({ pkgs, ...} : { $roundcube->start; $roundcube->waitForUnit("postgresql.service"); $roundcube->waitForUnit("phpfpm-roundcube.service"); + $roundcube->waitForUnit("nginx.service"); $roundcube->succeed("curl -sSfL http://roundcube/"); ''; }) From a3ec5dce2bcc7b346acd7a507821dc2bc105fbac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Th=C3=B8mt=20Ravneberg?= Date: Thu, 8 Nov 2018 13:11:19 +0100 Subject: [PATCH 17/87] gitlab-shell: don't hardcode gitlab-shell paths in authorized_keys --- .../gitlab-shell/remove-hardcoded-locations.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch b/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch index 6d29f5f9e6c..3d381404c63 100644 --- a/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch +++ b/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch @@ -43,3 +43,16 @@ index 57c70f5..700569b 100644 end def api +diff --git a/lib/gitlab_keys.rb b/lib/gitlab_keys.rb +index 0600a18..6814f0a 100644 +--- a/lib/gitlab_keys.rb ++++ b/lib/gitlab_keys.rb +@@ -10,7 +10,7 @@ class GitlabKeys # rubocop:disable Metrics/ClassLength + attr_accessor :auth_file, :key + + def self.command(whatever) +- "#{ROOT_PATH}/bin/gitlab-shell #{whatever}" ++ "/run/current-system/sw/bin/gitlab-shell #{whatever}" + end + + def self.command_key(key_id) From 3caeeabb1484358b5d6d63f346767dc1764c424a Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 28 Nov 2018 19:16:33 +0100 Subject: [PATCH 18/87] gitlab: stop regenerating the authorized_keys file --- nixos/doc/manual/release-notes/rl-1903.xml | 18 ++++++++++++++++-- nixos/modules/services/misc/gitlab.nix | 4 ---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-1903.xml b/nixos/doc/manual/release-notes/rl-1903.xml index cedd5fc21c6..376a5355f7c 100644 --- a/nixos/doc/manual/release-notes/rl-1903.xml +++ b/nixos/doc/manual/release-notes/rl-1903.xml @@ -241,8 +241,22 @@ (networking.firewall.interfaces.default.*), and assigning to this pseudo device will override the (networking.firewall.allow*) options. - - + + + + + GitLab Shell previously used the nix store paths for the + gitlab-shell command in its + authorized_keys file, which might stop working after + garbage collection. To circumvent that, we regenerated that file on each + startup. As gitlab-shell has now been changed to use + /var/run/current-system/sw/bin/gitlab-shell, this is + not necessary anymore, but there might be leftover lines with a nix store + path. Regenerate the authorized_keys file via + sudo -u git -H gitlab-rake gitlab:shell:setup in that + case. + + diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index 07adf58c9b2..769a9526cf6 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -609,10 +609,6 @@ in { touch "${cfg.statePath}/db-seeded" fi - # The gitlab:shell:setup regenerates the authorized_keys file so that - # the store path to the gitlab-shell in it gets updated - ${pkgs.sudo}/bin/sudo -u ${cfg.user} -H force=yes ${gitlab-rake}/bin/gitlab-rake gitlab:shell:setup - # The gitlab:shell:create_hooks task seems broken for fixing links # so we instead delete all the hooks and create them anew rm -f ${cfg.statePath}/repositories/**/*.git/hooks From fd78464de91d5d64dda217397586996e0b7ff37f Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 26 Nov 2018 18:00:08 -0600 Subject: [PATCH 19/87] premake: add setup-hook Adds a configure phase for packages using premake. premakeConfigurePhase runs the correct premake version for the premake you are using (see premake_cmd). --- pkgs/development/tools/misc/premake/3.nix | 3 +++ pkgs/development/tools/misc/premake/5.nix | 3 +++ .../tools/misc/premake/default.nix | 7 +++++-- .../tools/misc/premake/setup-hook.sh | 19 +++++++++++++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/tools/misc/premake/setup-hook.sh diff --git a/pkgs/development/tools/misc/premake/3.nix b/pkgs/development/tools/misc/premake/3.nix index 77f61386874..8b02bf96fd5 100644 --- a/pkgs/development/tools/misc/premake/3.nix +++ b/pkgs/development/tools/misc/premake/3.nix @@ -18,6 +18,9 @@ stdenv.mkDerivation { install -Dm755 bin/premake $out/bin/premake ''; + premake_cmd = "premake3"; + setupHook = ./setup-hook.sh; + meta = { homepage = http://industriousone.com/premake; description = "A simple build configuration and project generation tool using lua"; diff --git a/pkgs/development/tools/misc/premake/5.nix b/pkgs/development/tools/misc/premake/5.nix index 93220a02e2d..8ceb3d4a436 100644 --- a/pkgs/development/tools/misc/premake/5.nix +++ b/pkgs/development/tools/misc/premake/5.nix @@ -31,6 +31,9 @@ stdenv.mkDerivation rec { install -Dm755 bin/release/premake5 $out/bin/premake5 ''; + premake_cmd = "premake5"; + setupHook = ./setup-hook.sh; + meta = { homepage = https://premake.github.io; description = "A simple build configuration and project generation tool using lua"; diff --git a/pkgs/development/tools/misc/premake/default.nix b/pkgs/development/tools/misc/premake/default.nix index 770c8071095..99bf8cac81f 100644 --- a/pkgs/development/tools/misc/premake/default.nix +++ b/pkgs/development/tools/misc/premake/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation { sha256 = "1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn"; }; - buildInputs = [ unzip ]; + nativeBuildInputs = [ unzip ]; buildPhase = '' make -C build/gmake.unix/ @@ -22,11 +22,14 @@ stdenv.mkDerivation { install -Dm755 bin/release/premake4 $out/bin/premake4 ''; + premake_cmd = "premake4"; + setupHook = ./setup-hook.sh; + meta = with stdenv.lib; { homepage = http://industriousone.com/premake; description = "A simple build configuration and project generation tool using lua"; license = stdenv.lib.licenses.bsd3; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = [ maintainers.bjornfor ]; }; } diff --git a/pkgs/development/tools/misc/premake/setup-hook.sh b/pkgs/development/tools/misc/premake/setup-hook.sh new file mode 100644 index 00000000000..ba06ea2c761 --- /dev/null +++ b/pkgs/development/tools/misc/premake/setup-hook.sh @@ -0,0 +1,19 @@ +premakeConfigurePhase() { + runHook preConfigure + + local flagsArray=( + ${premakefile:+--file=$premakefile} + $premakeFlags ${premakeFlagsArray[@]} + ${premakeBackend:-gmake} + ) + + echoCmd 'configure flags' "${flagsArray[@]}" + + @premake_cmd@ "${flagsArray[@]}" + + runHook postConfigure +} + +if [ -z "$configurePhase" ]; then + configurePhase=premakeConfigurePhase +fi From a06eb847058584480487e840a1c9b78cb7828e84 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 26 Nov 2018 18:02:16 -0600 Subject: [PATCH 20/87] bootil: cleanup installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A few changes needed here: - We don’t want to guess what our platform is. We can patch location and targetdir to not put things in an unpredictable directory. - Make premake4 a native build input. - Set the premakefile variable. --- pkgs/development/libraries/bootil/default.nix | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/bootil/default.nix b/pkgs/development/libraries/bootil/default.nix index b64cdd5245f..0ed223832b6 100644 --- a/pkgs/development/libraries/bootil/default.nix +++ b/pkgs/development/libraries/bootil/default.nix @@ -23,21 +23,21 @@ stdenv.mkDerivation rec { url = https://github.com/garrynewman/bootil/pull/22.patch; name = "github-pull-request-22.patch"; sha256 = "1qf8wkv00pb9w1aa0dl89c8gm4rmzkxfl7hidj4gz0wpy7a24qa2"; - })]; + }) ]; - platform = - if stdenv.isLinux then "linux" - else if stdenv.isDarwin then "macosx" - else throw "unrecognized system ${stdenv.hostPlatform.system}"; + # Avoid guessing where files end up. Just use current directory. + postPatch = '' + substituteInPlace projects/premake4.lua \ + --replace 'location ( os.get() .. "/" .. _ACTION )' 'location ( ".." )' + substituteInPlace projects/bootil.lua \ + --replace 'targetdir ( "../lib/" .. os.get() .. "/" .. _ACTION )' 'targetdir ( ".." )' + ''; - buildInputs = [ premake4 ]; - - configurePhase = "premake4 --file=projects/premake4.lua gmake"; - makeFlags = "-C projects/${platform}/gmake"; + nativeBuildInputs = [ premake4 ]; + premakefile = "projects/premake4.lua"; installPhase = '' - mkdir -p $out/lib - cp lib/${platform}/gmake/libbootil_static.a $out/lib/ - cp -r include $out/ + install -D libbootil_static.a $out/lib/libbootil_static.a + cp -r include $out ''; } From e0471b6c45345f66b633d15f191680408c110ce3 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 26 Nov 2018 20:13:40 -0600 Subject: [PATCH 21/87] yojimbo: use premake build hook --- pkgs/development/libraries/yojimbo/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/yojimbo/default.nix b/pkgs/development/libraries/yojimbo/default.nix index 9a3416a368b..557c46470a8 100644 --- a/pkgs/development/libraries/yojimbo/default.nix +++ b/pkgs/development/libraries/yojimbo/default.nix @@ -15,9 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ premake5 doxygen ]; propagatedBuildInputs = [ libsodium mbedtls ]; - buildPhase = '' - premake5 gmake - make all + postBuild = '' premake5 docs ''; @@ -28,6 +26,8 @@ stdenv.mkDerivation rec { cp -r docs/html $out/share/doc/yojimbo ''; + doCheck = true; + meta = with stdenv.lib; { description = "A network library for client/server games with dedicated servers"; longDescription = '' From 932c1ff4c89d8464208879abb33f3682386c8bcf Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 01:32:11 -0600 Subject: [PATCH 22/87] distrho: cleanup premake usage --- pkgs/applications/audio/distrho/default.nix | 37 ++++++++++++--------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/audio/distrho/default.nix b/pkgs/applications/audio/distrho/default.nix index bf79b68bc7d..1c41451b08f 100644 --- a/pkgs/applications/audio/distrho/default.nix +++ b/pkgs/applications/audio/distrho/default.nix @@ -1,7 +1,13 @@ { stdenv, fetchFromGitHub, alsaLib, fftwSinglePrec, freetype, libjack2 -, pkgconfig, premake3, xorg, ladspa-sdk }: +, pkgconfig, ladspa-sdk, premake3 +, libX11, libXcomposite, libXcursor, libXext, libXinerama, libXrender +}: -stdenv.mkDerivation rec { +let + premakeos = if stdenv.hostPlatform.isDarwin then "osx" + else if stdenv.hostPlatform.isWindows then "mingw" + else "linux"; +in stdenv.mkDerivation rec { name = "distrho-ports-${version}"; version = "2018-04-16"; @@ -12,27 +18,26 @@ stdenv.mkDerivation rec { sha256 = "0l4zwl4mli8jzch32a1fh7c88r9q17xnkxsdw17ds5hadnxlk12v"; }; + configurePhase = '' + runHook preConfigure + + sh ./scripts/premake-update.sh ${premakeos} + + runHook postConfigure + ''; + patchPhase = '' sed -e "s#@./scripts#sh scripts#" -i Makefile ''; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig premake3 ]; buildInputs = [ - alsaLib fftwSinglePrec freetype libjack2 premake3 - xorg.libX11 xorg.libXcomposite xorg.libXcursor xorg.libXext - xorg.libXinerama xorg.libXrender ladspa-sdk + alsaLib fftwSinglePrec freetype libjack2 + libX11 libXcomposite libXcursor libXext + libXinerama libXrender ladspa-sdk ]; - buildPhase = '' - sh ./scripts/premake-update.sh linux - make lv2 - ''; - - installPhase = '' - mkdir -p $out/bin - mkdir -p $out/lib/lv2 - cp -a bin/lv2/* $out/lib/lv2/ - ''; + makeFlags = "PREFIX=$(out)"; meta = with stdenv.lib; { homepage = http://distrho.sourceforge.net; From 0984032d6ae2d87b8a032a75f783942da2279235 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 01:35:32 -0600 Subject: [PATCH 23/87] gmad: use premake setup hook --- pkgs/games/gmad/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/games/gmad/default.nix b/pkgs/games/gmad/default.nix index a15914877cc..78936ec1949 100644 --- a/pkgs/games/gmad/default.nix +++ b/pkgs/games/gmad/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { else if stdenv.isDarwin then "gmad_osx" else "gmad"; - configurePhase = "premake4 --bootil_lib=${bootil}/lib --bootil_inc=${bootil}/include gmake"; + premakeFlags = "--bootil_lib=${bootil}/lib --bootil_inc=${bootil}/include"; installPhase = '' mkdir -p $out/bin From 9d2c6ea47a146cb6e10c4d4ec08179cf18dc26fe Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 01:42:54 -0600 Subject: [PATCH 24/87] otfcc: use premake setup hook --- pkgs/tools/misc/otfcc/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/misc/otfcc/default.nix b/pkgs/tools/misc/otfcc/default.nix index acf46a58a6b..96e5e6a1d94 100644 --- a/pkgs/tools/misc/otfcc/default.nix +++ b/pkgs/tools/misc/otfcc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, premake5, ninja }: +{ stdenv, fetchFromGitHub, premake5 }: stdenv.mkDerivation rec { name = "otfcc-${version}"; @@ -11,15 +11,15 @@ stdenv.mkDerivation rec { sha256 = "1rnjfqqyc6d9nhlh8if9k37wk94mcwz4wf3k239v6idg48nrk10b"; }; - nativeBuildInputs = [ premake5 ninja ]; + nativeBuildInputs = [ premake5 ]; - configurePhase = '' - premake5 ninja + # Don’t guess where our makefiles will end up. Just use current + # directory. + patchPhase = '' + substituteInPlace premake5.lua \ + --replace 'location "build/gmake"' 'location "."' ''; - ninjaFlags = let x = if stdenv.hostPlatform.isi686 then "x86" else "x64"; in - [ "-C" "build/ninja" "otfccdump_release_${x}" "otfccbuild_release_${x}" ]; - installPhase = '' mkdir -p $out/bin cp bin/release-x*/otfcc* $out/bin/ From 801b375925fb212eec52f74574ad4d19f74301ef Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 16:43:32 -0600 Subject: [PATCH 25/87] tome4: use premake hook --- pkgs/games/tome4/default.nix | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/pkgs/games/tome4/default.nix b/pkgs/games/tome4/default.nix index 3f6726a17f1..ec529676463 100644 --- a/pkgs/games/tome4/default.nix +++ b/pkgs/games/tome4/default.nix @@ -25,9 +25,10 @@ in stdenv.mkDerivation rec { sha256 = "0mc5dgh2x9nbili7gy6srjhb23ckalf08wqq2amyjr5rq392jvd7"; }; - nativeBuildInputs = [ premake4 makeWrapper unzip ]; + nativeBuildInputs = [ makeWrapper unzip premake4 ]; - # tome4 vendors quite a few libraries so someone might want to look into avoiding that... + # tome4 vendors quite a few libraries so someone might want to look + # into avoiding that... buildInputs = [ libGLU openal libpng libvorbis SDL2 SDL2_ttf SDL2_image ]; @@ -36,20 +37,11 @@ in stdenv.mkDerivation rec { enableParallelBuilding = false; NIX_CFLAGS_COMPILE = [ + "-I${SDL2.dev}/include/SDL2" "-I${SDL2_image}/include/SDL2" "-I${SDL2_ttf}/include/SDL2" ]; - postPatch = '' - substituteInPlace premake4.lua \ - --replace "/opt/SDL-2.0/include/SDL2" "${SDL2.dev}/include/SDL2" \ - --replace "/usr/include/GL" "/run/opengl-driver/include" - ''; - - preConfigure = '' - premake4 gmake - ''; - makeFlags = [ "config=release" ]; # The wrapper needs to cd into the correct directory as tome4's detection of From 613e262fc2f84d068da40ee6c45f0915c00e2193 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 19:48:07 -0600 Subject: [PATCH 26/87] imake: add setup hook --- .../x11/xorg/darwin-imake-setup-hook.sh | 1 - pkgs/servers/x11/xorg/imake-setup-hook.sh | 19 +++++++++++++++++++ pkgs/servers/x11/xorg/overrides.nix | 8 ++++---- 3 files changed, 23 insertions(+), 5 deletions(-) delete mode 100644 pkgs/servers/x11/xorg/darwin-imake-setup-hook.sh create mode 100644 pkgs/servers/x11/xorg/imake-setup-hook.sh diff --git a/pkgs/servers/x11/xorg/darwin-imake-setup-hook.sh b/pkgs/servers/x11/xorg/darwin-imake-setup-hook.sh deleted file mode 100644 index 6dbaf724092..00000000000 --- a/pkgs/servers/x11/xorg/darwin-imake-setup-hook.sh +++ /dev/null @@ -1 +0,0 @@ -export IMAKECPP="@tradcpp@/bin/tradcpp" diff --git a/pkgs/servers/x11/xorg/imake-setup-hook.sh b/pkgs/servers/x11/xorg/imake-setup-hook.sh new file mode 100644 index 00000000000..10f54198f7f --- /dev/null +++ b/pkgs/servers/x11/xorg/imake-setup-hook.sh @@ -0,0 +1,19 @@ +export IMAKECPP="@tradcpp@/bin/tradcpp" + +imakeConfigurePhase() { + runHook preConfigure + + echoCmd 'configuring with imake' + + if [ -z "${imakefile:-}" -a ! -e Imakefile ]; then + echo "no Imakefile, doing nothing" + else + xmkmf -a + fi + + runHook postConfigure +} + +if [ -z "$dontUseImakeConfigure" -a -z "$configurePhase" ]; then + configurePhase=imakeConfigurePhase +fi diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 8f4c251335a..48e67ac74a8 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -63,12 +63,12 @@ self: super: inherit (self) xorgcffiles; x11BuildHook = ./imake.sh; patches = [./imake.patch ./imake-cc-wrapper-uberhack.patch]; - setupHook = if stdenv.isDarwin then ./darwin-imake-setup-hook.sh else null; - CFLAGS = [ "-DIMAKE_COMPILETIME_CPP=\\\"${if stdenv.isDarwin + setupHook = ./imake-setup-hook.sh; + CFLAGS = [ ''-DIMAKE_COMPILETIME_CPP='"${if stdenv.isDarwin then "${tradcpp}/bin/cpp" - else "gcc"}\\\"" + else "gcc"}"' '' ]; - tradcpp = if stdenv.isDarwin then tradcpp else null; + inherit tradcpp; }); mkfontdir = super.mkfontdir.overrideAttrs (attrs: { From a858113076b9012664237eb619b9289936b187a9 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 19:54:15 -0600 Subject: [PATCH 27/87] oneko: use imake setup hook Simplifies some things here. --- pkgs/applications/misc/oneko/default.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/misc/oneko/default.nix b/pkgs/applications/misc/oneko/default.nix index e1cc70e4277..311f093ba6d 100644 --- a/pkgs/applications/misc/oneko/default.nix +++ b/pkgs/applications/misc/oneko/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, xorg, xlibsWrapper }: +{ stdenv, fetchurl, imake, gccmakedep, xlibsWrapper }: stdenv.mkDerivation rec { version = "1.2.sakura.5"; @@ -8,14 +8,11 @@ stdenv.mkDerivation rec { url = "http://www.daidouji.com/oneko/distfiles/oneko-${version}.tar.gz"; sha256 = "2c2e05f1241e9b76f54475b5577cd4fb6670de058218d04a741a04ebd4a2b22f"; }; - buildInputs = [ xorg.imake xorg.gccmakedep xlibsWrapper ]; + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ xlibsWrapper ]; - configurePhase = "xmkmf"; - - installPhase = '' - make install BINDIR=$out/bin - make install.man MANPATH=$out/share/man - ''; + makeFlags = [ "BINDIR=$(out)/bin" "MANPATH=$(out)/share/man" ]; + installTargets = "install install.man"; meta = with stdenv.lib; { description = "Creates a cute cat chasing around your mouse cursor"; From 3d3f87365c160f27bd6d1455ef1bd3fc4cebe915 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 19:55:08 -0600 Subject: [PATCH 28/87] xcruiser: add setup hook Cleans things up a bit here. --- pkgs/applications/misc/xcruiser/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/misc/xcruiser/default.nix b/pkgs/applications/misc/xcruiser/default.nix index 3a25147971a..945072ce026 100644 --- a/pkgs/applications/misc/xcruiser/default.nix +++ b/pkgs/applications/misc/xcruiser/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, gccmakedep, xorg }: +{ stdenv, fetchurl, gccmakedep, xorg, imake, libXt, libXaw, libXpm, libXext }: stdenv.mkDerivation { name = "xcruiser-0.30"; @@ -8,13 +8,13 @@ stdenv.mkDerivation { sha256 = "1r8whva38xizqdh7jmn6wcmfmsndc67pkw22wzfzr6rq0vf6hywi"; }; - buildInputs = with xorg; [ gccmakedep imake libXt libXaw libXpm libXext ]; + nativeBuildInputs = [ gccmakedep imake ]; + buildInputs = [ libXt libXaw libXpm libXext ]; - configurePhase = "xmkmf -a"; - - preBuild = '' - makeFlagsArray=( BINDIR=$out/bin XAPPLOADDIR=$out/etc/X11/app-defaults) - ''; + makeFlags = [ + "BINDIR=$(out)/bin" + "XAPPLOADDIR=$(out)/etc/X11/app-defaults" + ]; meta = with stdenv.lib; { description = "Filesystem visualization utility"; From f5be016c23dd4abb5b5478007484ca7341f84e1e Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 20:06:26 -0600 Subject: [PATCH 29/87] xmove: remove This package is unmaintained. https://packages.qa.debian.org/x/xmove/news/20090130T204752Z.html --- pkgs/applications/misc/xmove/default.nix | 19 ------------------- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 21 deletions(-) delete mode 100644 pkgs/applications/misc/xmove/default.nix diff --git a/pkgs/applications/misc/xmove/default.nix b/pkgs/applications/misc/xmove/default.nix deleted file mode 100644 index e461a2c8816..00000000000 --- a/pkgs/applications/misc/xmove/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{stdenv, fetchurl, libX11, libXi, imake, xauth, libXau}: -stdenv.mkDerivation { - name = "xmove-2.0b2"; - - src = fetchurl { - url = mirror://debian/pool/main/x/xmove/xmove_2.0beta2.orig.tar.gz; - sha256 = "0q310k3bi39vdk0kqqvsahnb1k6lx9hlx80iyxnkq59l6jxnhyhf"; - }; - - buildPhase = "cd xmove; sed -e 's/.*No address for our host.*/{hp = gethostbyname(\"localhost\");};/' -i main.c; cp ../man/man1/xmove.1 xmove.man ; xmkmf; make; cd .. ; cd xmovectrl ; cp ../man/man1/xmovectrl.1 xmovectrl.man; xmkmf; make ; cd .."; - installPhase = "cd xmove; make install install.man MANDIR=\${out}/man/man1 BINDIR=\${out}/bin; cd .. ; cd xmovectrl ; make install install.man MANDIR=\${out}/man/man1 BINDIR=\${out}/bin; cd .."; - - buildInputs = [libX11 libXi imake xauth libXau]; - - meta = { - platforms = stdenv.lib.platforms.linux; - license = stdenv.lib.licenses.mit; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6ce1afbb415..ff7b4f9951d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20051,8 +20051,6 @@ with pkgs; xmlcopyeditor = callPackage ../applications/editors/xmlcopyeditor { }; - xmove = callPackage ../applications/misc/xmove { }; - xmp = callPackage ../applications/audio/xmp { }; xnee = callPackage ../tools/X11/xnee { }; From cf3940ef9582d097cd7fd7c92dc80d4a86f928e6 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 20:11:15 -0600 Subject: [PATCH 30/87] xxkb: use imake setup hook --- pkgs/applications/misc/xxkb/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/misc/xxkb/default.nix b/pkgs/applications/misc/xxkb/default.nix index 90e2723a906..56638d126c1 100644 --- a/pkgs/applications/misc/xxkb/default.nix +++ b/pkgs/applications/misc/xxkb/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, libX11, libXt, libXext, libXpm, imake -, svgSupport ? true, librsvg, glib, gdk_pixbuf, pkgconfig +{ stdenv, fetchurl, libX11, libXt, libXext, libXpm, imake, gccmakedep +, svgSupport ? false, librsvg, glib, gdk_pixbuf, pkgconfig }: assert svgSupport -> @@ -13,20 +13,21 @@ stdenv.mkDerivation rec { sha256 = "0hl1i38z9xnbgfjkaz04vv1n8xbgfg88g5z8fyzyb2hxv2z37anf"; }; + nativeBuildInputs = [ imake gccmakedep ]; buildInputs = [ - imake libX11 libXt libXext libXpm ] ++ stdenv.lib.optionals svgSupport [ librsvg glib gdk_pixbuf pkgconfig ]; outputs = [ "out" "man" ]; - configurePhase = '' - xmkmf ${stdenv.lib.optionalString svgSupport "-DWITH_SVG_SUPPORT"} - ''; + imakeFlags = stdenv.lib.optionalString svgSupport "-DWITH_SVG_SUPPORT"; - preBuild = '' - makeFlagsArray=( BINDIR=$out/bin PIXMAPDIR=$out/share/xxkb XAPPLOADDIR=$out/etc/X11/app-defaults MANDIR=$man/share/man ) - ''; + makeFlags = [ + "BINDIR=${placeholder "out"}/bin" + "PIXMAPDIR=${placeholder "out"}/share/xxkb" + "XAPPLOADDIR=${placeholder "out"}/etc/X11/app-defaults" + "MANDIR=${placeholder "man"}/share/man" + ]; installTargets = "install install.man"; From 8a4da418491fab6185ce3c7cf88f38cc1c2ba2e6 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 20:12:33 -0600 Subject: [PATCH 31/87] xearth: use imake setup hook --- .../science/astronomy/xearth/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/science/astronomy/xearth/default.nix b/pkgs/applications/science/astronomy/xearth/default.nix index 5f276a1b3c7..fef4ca1907f 100644 --- a/pkgs/applications/science/astronomy/xearth/default.nix +++ b/pkgs/applications/science/astronomy/xearth/default.nix @@ -1,21 +1,20 @@ -{ stdenv, fetchurl, xorg }: +{ stdenv, fetchurl, imake, gccmakedep, libXt, libXext }: + stdenv.mkDerivation rec { name = "xearth-${version}"; version = "1.1"; - + src = fetchurl { url = "http://xearth.org/${name}.tar.gz"; sha256 = "bcb1407cc35b3f6dd3606b2c6072273b6a912cbd9ed1ae22fb2d26694541309c"; }; - buildInputs = with xorg; [ imake libXt libXext ]; - - dontAddPrefix = true; - configureScript="xmkmf"; + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ libXt libXext ]; installFlags=[ "DESTDIR=$(out)/" "BINDIR=bin" "MANDIR=man/man1"]; installTargets="install install.man"; - + meta = with stdenv.lib; { description = "sets the X root window to an image of the Earth"; homepage = "http://xplanet.org"; From cbf9b5610b83d86d7f831b3440dc9195b2e54766 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 20:14:03 -0600 Subject: [PATCH 32/87] larswm: use imake setup hook --- pkgs/applications/window-managers/larswm/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/window-managers/larswm/default.nix b/pkgs/applications/window-managers/larswm/default.nix index 21ea00d110e..4ec1a4bcd05 100644 --- a/pkgs/applications/window-managers/larswm/default.nix +++ b/pkgs/applications/window-managers/larswm/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, imake, libX11, libXext, libXmu}: +{ stdenv, fetchurl, imake, gccmakedep, libX11, libXext, libXmu }: stdenv.mkDerivation { name = "larswm-7.5.3"; @@ -8,13 +8,11 @@ stdenv.mkDerivation { sha256 = "1xmlx9g1nhklxjrg0wvsya01s4k5b9fphnpl9zdwp29mm484ni3v"; }; - buildInputs = [ imake libX11 libXext libXmu ]; + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ libX11 libXext libXmu ]; - configurePhase = '' - xmkmf - makeFlags="BINDIR=$out/bin MANPATH=$out/share/man" - installTargets="install install.man" - ''; + makeFlags = [ "BINDIR=$(out)/bin" "MANPATH=$(out)/share/man" ]; + installTargets = "install install.man"; meta = { homepage = http://www.fnurt.net/larswm; From 1eab4151d411ad62aa303ddda221a8fcf9747be8 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 20:15:45 -0600 Subject: [PATCH 33/87] xsnow: use imake setup hook --- pkgs/games/xsnow/default.nix | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/pkgs/games/xsnow/default.nix b/pkgs/games/xsnow/default.nix index 47a321c99b4..07ed50d4e7b 100644 --- a/pkgs/games/xsnow/default.nix +++ b/pkgs/games/xsnow/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libXt, libXpm, libXext, imake }: +{ stdenv, fetchurl, libXt, libXpm, libXext, imake, gccmakedep }: stdenv.mkDerivation rec { @@ -10,25 +10,17 @@ stdenv.mkDerivation rec { sha256 = "06jnbp88wc9i9dbmy7kggplw4hzlx2bhghxijmlhkjlizgqwimyh"; }; + nativeBuildInputs = [ imake gccmakedep ]; buildInputs = [ - libXt libXpm libXext imake + libXt libXpm libXext ]; - buildPhase = '' - xmkmf - make - ''; - - installPhase = '' - mkdir -p $out/bin $out/share/man/man1 - cp xsnow $out/bin/ - cp xsnow.1 $out/share/man/man1/ - ''; + makeFlags = [ "BINDIR=$(out)/bin" "MANPATH=$(out)/share/man" ]; meta = { description = "An X-windows application that will let it snow on the root, in between and on windows"; homepage = http://janswaal.home.xs4all.nl/Xsnow/; license = stdenv.lib.licenses.unfree; maintainers = [ stdenv.lib.maintainers.robberer ]; - }; + }; } From 92c119fb31c5d30e43bf35272396ad4559dc548d Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 20:17:05 -0600 Subject: [PATCH 34/87] xautolock: use imake setup hook --- pkgs/misc/screensavers/xautolock/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/misc/screensavers/xautolock/default.nix b/pkgs/misc/screensavers/xautolock/default.nix index 0c1446f0672..cce4b351c57 100644 --- a/pkgs/misc/screensavers/xautolock/default.nix +++ b/pkgs/misc/screensavers/xautolock/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, xlibsWrapper, imake, libXScrnSaver, scrnsaverproto }: +{ stdenv, fetchurl, xlibsWrapper +, imake, gccmakedep, libXScrnSaver, scrnsaverproto }: stdenv.mkDerivation rec { name = "xautolock-2.2"; @@ -14,10 +15,13 @@ stdenv.mkDerivation rec { }) ]; NIX_CFLAGS_COMPILE = "-DSYSV"; - makeFlags="BINDIR=\${out}/bin MANPATH=\${out}/man"; - preBuild = "xmkmf"; + makeFlags = [ + "BINDIR=$(out)/bin" + "MANPATH=$(out)/share/man" + ]; installTargets = "install install.man"; - buildInputs = [xlibsWrapper imake libXScrnSaver scrnsaverproto]; + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ xlibsWrapper libXScrnSaver scrnsaverproto ]; meta = with stdenv.lib; { description = "A program that launches a given program when your X session has been idle for a given time."; homepage = http://www.ibiblio.org/pub/linux/X11/screensavers; From be10bee0e48c4f3f365b947ee539d607d7b30dc7 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 21:29:40 -0600 Subject: [PATCH 35/87] x2x: use imake setup hook --- pkgs/tools/X11/x2x/default.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/X11/x2x/default.nix b/pkgs/tools/X11/x2x/default.nix index 24cf4f6b2e1..0c3538a0db9 100644 --- a/pkgs/tools/X11/x2x/default.nix +++ b/pkgs/tools/X11/x2x/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, imake, libX11, libXtst, libXext}: +{ stdenv, fetchurl, imake, libX11, libXtst, libXext, gccmakedep }: stdenv.mkDerivation { name = "x2x-1.27"; @@ -8,20 +8,16 @@ stdenv.mkDerivation { sha256 = "0dha0kn1lbc4as0wixsvk6bn4innv49z9a0sm5wlx4q1v0vzqzyj"; }; - buildInputs = [ imake libX11 libXtst libXext ]; + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ libX11 libXtst libXext ]; hardeningDisable = [ "format" ]; - configurePhase = '' - xmkmf - makeFlags="BINDIR=$out/bin x2x" - ''; + buildFlags = [ "x2x" ]; installPhase = '' - mkdir -p $out/bin - mkdir -p $out/man/man1 - cp x2x $out/bin/ - cp x2x.1 $out/man/man1/ + install -D x2x $out/bin/x2x + install -D x2x.1 $out/man/man1/x2x.1 ''; meta = with stdenv.lib; { From 39122285ba4441be27fc7b0bbbbbf647189df557 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 21:32:14 -0600 Subject: [PATCH 36/87] xbrightness: use imake setup hook --- pkgs/tools/X11/xbrightness/default.nix | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/pkgs/tools/X11/xbrightness/default.nix b/pkgs/tools/X11/xbrightness/default.nix index f4112765e67..2857ea6c7be 100644 --- a/pkgs/tools/X11/xbrightness/default.nix +++ b/pkgs/tools/X11/xbrightness/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, xorg }: +{ stdenv, fetchurl, imake, gccmakedep +, libX11, libXaw, libXext, libXmu, libXpm, libXxf86vm }: stdenv.mkDerivation { @@ -8,22 +9,11 @@ stdenv.mkDerivation { sha256 = "2564dbd393544657cdabe4cbf535d9cfb9abe8edddb1b8cdb1ed4d12f358626e"; }; - buildInputs = [ - xorg.imake - xorg.libX11 - xorg.libXaw - xorg.libXext - xorg.libXmu - xorg.libXpm - xorg.libXxf86vm - ]; + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ libX11 libXaw libXext libXmu libXpm libXxf86vm ]; - configurePhase = "xmkmf"; - - installPhase = '' - make install BINDIR=$out/bin - make install.man MANPATH=$out/share/man - ''; + makeFlags = [ "BINDIR=$(out)/bin" "MANPATH=$(out)/share/man" ]; + installTargets = "install install.man"; meta = { description = "X11 brigthness and gamma software control"; From fd1a5aecabe55f141eadd4ee5b5d8bfd3196f538 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 21:37:05 -0600 Subject: [PATCH 37/87] xvkbd: use imake setup hook --- pkgs/tools/X11/xvkbd/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/X11/xvkbd/default.nix b/pkgs/tools/X11/xvkbd/default.nix index 06824f882a4..6ccc8a24cae 100644 --- a/pkgs/tools/X11/xvkbd/default.nix +++ b/pkgs/tools/X11/xvkbd/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, imake, libXt, libXaw, libXtst, libXi, libXpm, xextproto, gccmakedep, Xaw3d }: +{ stdenv, fetchurl, imake, libXt, libXaw, libXtst +, libXi, libXpm, xextproto, gccmakedep, Xaw3d }: stdenv.mkDerivation rec { name = "xvkbd-${version}"; @@ -8,12 +9,14 @@ stdenv.mkDerivation rec { sha256 = "17csj6x5zm3g67izfwhagkal1rbqzpw09lqmmlyrjy3vzgfkf75q"; }; - buildInputs = [ imake libXt libXaw libXtst xextproto libXi Xaw3d libXpm gccmakedep ]; + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ libXt libXaw libXtst xextproto libXi Xaw3d libXpm ]; installTargets = [ "install" "install.man" ]; - preBuild = '' - makeFlagsArray=( BINDIR=$out/bin XAPPLOADDIR=$out/etc/X11/app-defaults MANPATH=$out/man ) - ''; - configurePhase = '' xmkmf -a ''; + makeFlags = [ + "BINDIR=$(out)/bin" + "XAPPLOADDIR=$(out)/etc/X11/app-defaults" + "MANPATH=$(out)/man" + ]; meta = with stdenv.lib; { description = "Virtual keyboard for X window system"; From c90dba094d84e5a1fa613682ef5bc2fc13ae0de7 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 21:38:50 -0600 Subject: [PATCH 38/87] xzoom: use imake setup hook --- pkgs/tools/X11/xzoom/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/X11/xzoom/default.nix b/pkgs/tools/X11/xzoom/default.nix index 05154e28263..d1867e3b077 100644 --- a/pkgs/tools/X11/xzoom/default.nix +++ b/pkgs/tools/X11/xzoom/default.nix @@ -1,4 +1,5 @@ -{stdenv, fetchurl, libX11, imake, libXext, libXt}: +{ stdenv, fetchurl, libX11, libXext, libXt, imake, gccmakedep}: + stdenv.mkDerivation rec { name = "${pname}-${version}.${patchlevel}"; pname = "xzoom"; @@ -16,12 +17,16 @@ stdenv.mkDerivation rec { sha256 = "0zhc06whbvaz987bzzzi2bz6h9jp6rv812qs7b71drivvd820qbh"; }) ]; - buildInputs = [libX11 imake libXext libXt]; - configurePhase = '' - xmkmf - makeFlags="$makeFlags PREFIX=$out BINDIR=$out/bin MANPATH=$out/share/man" - ''; + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ libX11 libXext libXt ]; + + makeFlags = [ + "PREFIX=$(out)" + "BINDIR=$(out)/bin" + "MANPATH=$(out)/share/man" + ]; + installTargets = "install install.man"; meta = { inherit version; From f0077dc7dad7bec5f2823834a6337cb5db1a2299 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 21:40:57 -0600 Subject: [PATCH 39/87] transfig: use imake setup hook --- pkgs/tools/graphics/transfig/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/graphics/transfig/default.nix b/pkgs/tools/graphics/transfig/default.nix index cb3f0edff0f..ceee3b7674d 100644 --- a/pkgs/tools/graphics/transfig/default.nix +++ b/pkgs/tools/graphics/transfig/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, zlib, libjpeg, libpng, imake}: +{ stdenv, fetchurl, zlib, libjpeg, libpng, imake, gccmakedep }: stdenv.mkDerivation rec { name = "transfig-3.2.4"; @@ -7,7 +7,8 @@ stdenv.mkDerivation rec { sha256 = "0429snhp5acbz61pvblwlrwv8nxr6gf12p37f9xxwrkqv4ir7dd4"; }; - buildInputs = [zlib libjpeg libpng imake]; + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ zlib libjpeg libpng ]; patches = [ ./patch-fig2dev-dev-Imakefile @@ -45,12 +46,7 @@ stdenv.mkDerivation rec { runHook postPatch ''; - preBuild = '' - xmkmf - make Makefiles - ''; - - makeFlags = [ "CC=cc" ]; + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; preInstall = '' mkdir -p $out From 3f00c67ef9ec34637b007832bf0ec9d0e44a3602 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 21:44:21 -0600 Subject: [PATCH 40/87] x11-ssh-askpass: cleanup --- pkgs/tools/networking/x11-ssh-askpass/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/networking/x11-ssh-askpass/default.nix b/pkgs/tools/networking/x11-ssh-askpass/default.nix index 896a2ff4daa..1b9d5534903 100644 --- a/pkgs/tools/networking/x11-ssh-askpass/default.nix +++ b/pkgs/tools/networking/x11-ssh-askpass/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, xlibsWrapper, imake }: +{ stdenv, fetchurl, xlibsWrapper, imake, gccmakedep }: stdenv.mkDerivation { name = "x11-ssh-askpass-1.2.4.1"; @@ -10,16 +10,16 @@ stdenv.mkDerivation { sha256 = "620de3c32ae72185a2c9aeaec03af24242b9621964e38eb625afb6cdb30b8c88"; }; - nativeBuildInputs = [ imake ]; + nativeBuildInputs = [ imake gccmakedep ]; buildInputs = [ xlibsWrapper ]; configureFlags = [ "--with-app-defaults-dir=$out/etc/X11/app-defaults" ]; - preBuild = '' - xmkmf - make includes + dontUseImakeConfigure = true; + postConfigure = '' + xmkmf -a ''; installTargets = [ "install" "install.man" ]; From 8e4b0ceeb2be26690a934bfd08a90a75d9181f40 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 27 Nov 2018 21:47:45 -0600 Subject: [PATCH 41/87] vncrec: use imake setup hook --- pkgs/tools/video/vncrec/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/video/vncrec/default.nix b/pkgs/tools/video/vncrec/default.nix index 7efcf6cbf83..49a2c4d4acb 100644 --- a/pkgs/tools/video/vncrec/default.nix +++ b/pkgs/tools/video/vncrec/default.nix @@ -12,16 +12,17 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; + nativeBuildInputs = [ imake gccmakedep ]; buildInputs = [ - libX11 xproto imake gccmakedep libXt libXmu libXaw + libX11 xproto libXt libXmu libXaw libXext xextproto libSM libICE libXpm libXp ]; - buildPhase = ''xmkmf && make World''; - - installPhase = '' - make DESTDIR=$out BINDIR=/bin MANDIR=/share/man/man1 install install.man - ''; + makeFlags = [ + "BINDIR=${placeholder "out"}/bin" + "MANDIR=${placeholder "out"}/share/man" + ]; + installTargets = "install install.man"; meta = { description = "VNC recorder"; From 5d9b3a8e8b43b8a769ea1e0f9f4b5541ed4b6108 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 28 Nov 2018 12:05:08 -0600 Subject: [PATCH 42/87] nas: use imake setup hook --- pkgs/servers/nas/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/nas/default.nix b/pkgs/servers/nas/default.nix index 9b8402ec0e0..86f75a21359 100644 --- a/pkgs/servers/nas/default.nix +++ b/pkgs/servers/nas/default.nix @@ -16,12 +16,9 @@ in stdenv.mkDerivation { buildInputs = [ xproto libXau libXt libXext libXaw libXpm ]; - buildPhase = '' - xmkmf - make WORLDOPTS="" World - ''; + buildFlags = [ "WORLDOPTS=" "World" ]; - installFlags = "LDLIBS=-lfl DESTDIR=\${out}"; + installFlags = [ "LDLIBS=-lfl" "DESTDIR=${placeholder "out"}" ]; postInstall = '' mv $out/${xorgcffiles}/* $out From 38f1b48232347d1a6e21a2c603c516b9a7128502 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 28 Nov 2018 12:11:41 -0600 Subject: [PATCH 43/87] tightvnc: use imake setup hook --- pkgs/tools/admin/tightvnc/default.nix | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/pkgs/tools/admin/tightvnc/default.nix b/pkgs/tools/admin/tightvnc/default.nix index 4027b3d531c..5a76b500d14 100644 --- a/pkgs/tools/admin/tightvnc/default.nix +++ b/pkgs/tools/admin/tightvnc/default.nix @@ -10,15 +10,14 @@ stdenv.mkDerivation { }; # for the builder script - inherit xauth fontDirectories perl; - gcc = stdenv.cc.cc; + inherit fontDirectories; hardeningDisable = [ "format" ]; buildInputs = [ xlibsWrapper zlib libjpeg imake gccmakedep libXmu libXaw libXpm libXp xauth openssh ]; - patchPhase = '' + postPatch = '' fontPath= for i in $fontDirectories; do for j in $(find $i -name fonts.dir); do @@ -27,37 +26,38 @@ stdenv.mkDerivation { done sed -i "s@/usr/bin/ssh@${openssh}/bin/ssh@g" vncviewer/vncviewer.h - ''; - buildPhase = '' - xmkmf - make World sed -e 's@/usr/bin/perl@${perl}/bin/perl@' \ -e 's@unix/:7100@'$fontPath'@' \ -i vncserver - cd Xvnc - sed -e 's@.* CppCmd .*@#define CppCmd '$gcc'/bin/cpp@' -i config/cf/linux.cf - sed -e 's@.* CppCmd .*@#define CppCmd '$gcc'/bin/cpp@' -i config/cf/Imake.tmpl + sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/linux.cf + sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/Imake.tmpl sed -i \ -e 's@"uname","xauth","Xvnc","vncpasswd"@"uname","Xvnc","vncpasswd"@g' \ -e "s@\@${xauth}/bin/xauth@g" \ - ../vncserver - ./configure - make - cd .. + vncserver + ''; + + preInstall = '' + mkdir -p $out/bin + mkdir -p $out/share/man/man1 ''; installPhase = '' - mkdir -p $out/bin - mkdir -p $out/share/man/man1 + runHook preInstall + ./vncinstall $out/bin $out/share/man + runHook postInstall + ''; + + postInstall = '' # fix HTTP client: - t=$out/share/tightvnc - mkdir -p $t - sed -i "s@/usr/local/vnc/classes@$out/vnc/classes@g" $out/bin/vncserver - cp -r classes $t + mkdir -p $out/share/tightvnc + cp -r classes $out/share/tightvnc + substituteInPlace $out/bin/vncserver \ + --replace /usr/local/vnc/classes $out/share/tightvnc/classes ''; meta = { From c0a804c747c6909c036da76472393b2fbd6413b9 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 28 Nov 2018 14:22:10 -0600 Subject: [PATCH 44/87] treewide: add dontUseImakeConfigure where needed We need to set dontUseImakeConfigure in a few places to prevent imake from overriding the default configure phase. This packages all have a configure script that needs to get run: - Xaw3d - R - tkgate - ssvnc --- pkgs/applications/networking/remote/ssvnc/default.nix | 4 +++- pkgs/applications/science/electronics/tkgate/1.x.nix | 4 +++- pkgs/applications/science/math/R/default.nix | 2 ++ pkgs/development/libraries/Xaw3d/default.nix | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/remote/ssvnc/default.nix b/pkgs/applications/networking/remote/ssvnc/default.nix index f20bb740615..99835627f87 100644 --- a/pkgs/applications/networking/remote/ssvnc/default.nix +++ b/pkgs/applications/networking/remote/ssvnc/default.nix @@ -12,7 +12,9 @@ stdenv.mkDerivation rec { buildInputs = [ imake zlib jdk libX11 libXt libXmu libXaw libXext libXpm openjpeg openssl ]; - configurePhase = "makeFlags=PREFIX=$out"; + dontUseImakeConfigure = true; + + makeFlags = "PREFIX=$(out)"; hardeningDisable = [ "format" ]; diff --git a/pkgs/applications/science/electronics/tkgate/1.x.nix b/pkgs/applications/science/electronics/tkgate/1.x.nix index aca1f9a3589..ab2b75917b9 100644 --- a/pkgs/applications/science/electronics/tkgate/1.x.nix +++ b/pkgs/applications/science/electronics/tkgate/1.x.nix @@ -12,7 +12,9 @@ stdenv.mkDerivation rec { sha256 = "1pqywkidfpdbj18i03h97f4cimld4fb3mqfy8jjsxs12kihm18fs"; }; - buildInputs = [ tcl tk libX11 which yacc flex imake xproto gccmakedep ]; + nativeBuildInputs = [ which yacc flex imake gccmakedep ]; + buildInputs = [ tcl tk libX11 xproto ]; + dontUseImakeConfigure = true; patchPhase = '' sed -i config.h \ diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix index 2fa8f3e5d7b..5cd6bbf4bdd 100644 --- a/pkgs/applications/science/math/R/default.nix +++ b/pkgs/applications/science/math/R/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { sha256 = "0463bff5eea0f3d93fa071f79c18d0993878fd4f2e18ae6cf22c1639d11457ed"; }; + dontUseImakeConfigure = true; + buildInputs = [ bzip2 gfortran libX11 libXmu libXt libXt libjpeg libpng libtiff ncurses pango pcre perl readline texLive xz zlib less texinfo graphviz icu diff --git a/pkgs/development/libraries/Xaw3d/default.nix b/pkgs/development/libraries/Xaw3d/default.nix index 0a7f02f17e5..3e496b7e981 100644 --- a/pkgs/development/libraries/Xaw3d/default.nix +++ b/pkgs/development/libraries/Xaw3d/default.nix @@ -8,6 +8,7 @@ stdenv.mkDerivation { url = https://www.x.org/releases/individual/lib/libXaw3d-1.6.3.tar.bz2; sha256 = "0i653s8g25cc0mimkwid9366bqkbyhdyjhckx7bw77j20hzrkfid"; }; + dontUseImakeConfigure = true; nativeBuildInputs = [ pkgconfig bison flex imake gccmakedep ]; buildInputs = [ libXpm libXp ]; propagatedBuildInputs = [ xlibsWrapper libXmu ]; From bd676cf69777e706a804535d27e9940e99d5596f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Thu, 29 Nov 2018 05:14:32 +0100 Subject: [PATCH 45/87] slic3r-prusa3d: 1.41.1 -> 1.41.2 --- pkgs/applications/misc/slic3r/prusa3d.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/slic3r/prusa3d.nix b/pkgs/applications/misc/slic3r/prusa3d.nix index 2f5486a0f4b..251ee4d918b 100644 --- a/pkgs/applications/misc/slic3r/prusa3d.nix +++ b/pkgs/applications/misc/slic3r/prusa3d.nix @@ -33,7 +33,7 @@ let in stdenv.mkDerivation rec { name = "slic3r-prusa-edition-${version}"; - version = "1.41.1"; + version = "1.41.2"; enableParallelBuilding = true; @@ -118,7 +118,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "prusa3d"; repo = "Slic3r"; - sha256 = "0crjrll8cjpkllval6abrqzvzp8g3rnb4vmwi5vivw0jvdv3w5y7"; + sha256 = "046ircwc0wr586v7106ys557ypslmyq9p4qgi34ads1d6bgxhlyy"; rev = "version_${version}"; }; From 59c4f4883f4719f4f81597dc9a61f4c9bfbaea7f Mon Sep 17 00:00:00 2001 From: volth Date: Thu, 29 Nov 2018 09:23:13 +0000 Subject: [PATCH 46/87] tixati: 2.57 -> 2.58 --- pkgs/applications/networking/p2p/tixati/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/p2p/tixati/default.nix b/pkgs/applications/networking/p2p/tixati/default.nix index 9f47f8464a1..13d44655df8 100644 --- a/pkgs/applications/networking/p2p/tixati/default.nix +++ b/pkgs/applications/networking/p2p/tixati/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "tixati-${version}"; - version = "2.57"; + version = "2.58"; src = fetchurl { url = "https://download2.tixati.com/download/tixati-${version}-1.x86_64.manualinstall.tar.gz"; - sha256 = "0z6znh62ry4fmc6c54zq79pk1b5bwkz93bxsfgvxpf6sajpyf9n7"; + sha256 = "077z5i0grkxkgw2npylv4r897434k2pr03brqx5hjpjw3797r141"; }; installPhase = '' From 98a2a5b5370c1e2092d09cb38b9dcff6d98a109f Mon Sep 17 00:00:00 2001 From: eburimu Date: Wed, 28 Nov 2018 00:16:59 +0300 Subject: [PATCH 47/87] fix jfsutils cross compilation --- pkgs/tools/filesystems/jfsutils/ar-fix.patch | 10 ++++++++++ pkgs/tools/filesystems/jfsutils/default.nix | 10 ++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 pkgs/tools/filesystems/jfsutils/ar-fix.patch diff --git a/pkgs/tools/filesystems/jfsutils/ar-fix.patch b/pkgs/tools/filesystems/jfsutils/ar-fix.patch new file mode 100644 index 00000000000..697029cd5a8 --- /dev/null +++ b/pkgs/tools/filesystems/jfsutils/ar-fix.patch @@ -0,0 +1,10 @@ +--- jfsutils-1.1.15/configure.in.orig 2018-11-27 20:46:55.830242385 +0300 ++++ jfsutils-1.1.15/configure.in 2018-11-27 20:47:00.596307630 +0300 +@@ -15,6 +15,7 @@ + AC_PATH_PROG(LN, ln, ln) + AC_PROG_LN_S + AC_PROG_RANLIB ++AM_PROG_AR + + dnl Checks for header files. + AC_HEADER_STDC diff --git a/pkgs/tools/filesystems/jfsutils/default.nix b/pkgs/tools/filesystems/jfsutils/default.nix index acc7a91d93f..92dfe00c951 100644 --- a/pkgs/tools/filesystems/jfsutils/default.nix +++ b/pkgs/tools/filesystems/jfsutils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libuuid }: +{ stdenv, fetchurl, libuuid, autoreconfHook }: stdenv.mkDerivation rec { name = "jfsutils-1.1.15"; @@ -8,8 +8,14 @@ stdenv.mkDerivation rec { sha256 = "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"; }; - patches = [ ./types.patch ./hardening-format.patch ]; + patches = [ + ./types.patch + ./hardening-format.patch + # required for cross-compilation + ./ar-fix.patch + ]; + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ libuuid ]; meta = with stdenv.lib; { From fc14aebab844277c4dee41a549431cac959cd1ba Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 29 Nov 2018 03:12:41 -0800 Subject: [PATCH 48/87] libngspice: 28 -> 29 * libngspice: 28 -> 29 (#50685) Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/libngspice/versions * libngspice: refresh meta.license See: https://sourceforge.net/p/ngspice/ngspice/ci/master/tree/COPYING --- pkgs/development/libraries/libngspice/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libngspice/default.nix b/pkgs/development/libraries/libngspice/default.nix index 5a34910924c..87382bd1ae2 100644 --- a/pkgs/development/libraries/libngspice/default.nix +++ b/pkgs/development/libraries/libngspice/default.nix @@ -3,11 +3,11 @@ # Note that this does not provide the ngspice command-line utility. For that see # the ngspice derivation. stdenv.mkDerivation { - name = "libngspice-28"; + name = "libngspice-29"; src = fetchurl { - url = "mirror://sourceforge/ngspice/ngspice-28.tar.gz"; - sha256 = "0rnz2rdgyav16w7wfn3sfrk2lwvvgz1fh0l9107zkcldijklz04l"; + url = "mirror://sourceforge/ngspice/ngspice-29.tar.gz"; + sha256 = "0jjwz73naq7l9yhwdqbpnrfckywp2ffkppivxjv8w92zq7xhyvcd"; }; nativeBuildInputs = [ flex bison ]; @@ -18,7 +18,7 @@ stdenv.mkDerivation { meta = with stdenv.lib; { description = "The Next Generation Spice (Electronic Circuit Simulator)"; homepage = http://ngspice.sourceforge.net; - license = with licenses; [ "BSD" gpl2 ]; + license = with licenses; [ bsd3 gpl2Plus lgpl2Plus ]; # See https://sourceforge.net/p/ngspice/ngspice/ci/master/tree/COPYING maintainers = with maintainers; [ bgamari ]; platforms = platforms.linux; }; From 2fe089c870125f7d05342a560b0db159218191f8 Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sat, 27 Oct 2018 14:52:21 +0300 Subject: [PATCH 49/87] pythonPackages.should-dsl: init at 2.1.2 --- .../python-modules/should-dsl/default.nix | 22 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/python-modules/should-dsl/default.nix diff --git a/pkgs/development/python-modules/should-dsl/default.nix b/pkgs/development/python-modules/should-dsl/default.nix new file mode 100644 index 00000000000..987d7e60cea --- /dev/null +++ b/pkgs/development/python-modules/should-dsl/default.nix @@ -0,0 +1,22 @@ +{ stdenv, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "should-dsl"; + version = "2.1.2"; + + src = fetchPypi { + inherit version; + pname = "should_dsl"; + sha256 = "0ai30dxgygwzaj9sgdzyfr9p5b7gwc9piq59nzr4xy5x1zcm7xrn"; + }; + + # There are no tests + doCheck = false; + + meta = with stdenv.lib; { + description = "Should assertions in Python as clear and readable as possible"; + homepage = http://www.should-dsl.info/; + license = licenses.mit; + maintainers = with maintainers; [ jluttine ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6cdde6f87e5..b8e7abc8f6a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3843,6 +3843,8 @@ in { simplegeneric = callPackage ../development/python-modules/simplegeneric { }; + should-dsl = callPackage ../development/python-modules/should-dsl { }; + simplejson = callPackage ../development/python-modules/simplejson { }; simplekml = callPackage ../development/python-modules/simplekml { }; From d91e61865b9279008878fff5b29e416fe3aa9f91 Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sat, 27 Oct 2018 14:53:41 +0300 Subject: [PATCH 50/87] pythonPackages.nose-pattern-exclude: init at 0.1.3 --- .../nose-pattern-exclude/default.nix | 23 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/python-modules/nose-pattern-exclude/default.nix diff --git a/pkgs/development/python-modules/nose-pattern-exclude/default.nix b/pkgs/development/python-modules/nose-pattern-exclude/default.nix new file mode 100644 index 00000000000..24d74b938af --- /dev/null +++ b/pkgs/development/python-modules/nose-pattern-exclude/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchPypi, nose }: + +buildPythonPackage rec { + pname = "nose-pattern-exclude"; + version = "0.1.3"; + + propagatedBuildInputs = [ nose ]; + + src = fetchPypi { + inherit pname version; + sha256 = "0apzxx8lavsdlxlpaxqw1snx5p7q8v5dfbip6v32f9pj2vyain1i"; + }; + + # There are no tests + doCheck = false; + + meta = with stdenv.lib; { + description = "Exclude specific files and directories from nosetests runs"; + homepage = https://github.com/jakubroztocil/nose-pattern-exclude; + license = licenses.bsd3; + maintainers = with maintainers; [ jluttine ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b8e7abc8f6a..15fe1f64ff6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3076,6 +3076,8 @@ in { nose-cprof = callPackage ../development/python-modules/nose-cprof { }; + nose-pattern-exclude = callPackage ../development/python-modules/nose-pattern-exclude { }; + nose_warnings_filters = callPackage ../development/python-modules/nose_warnings_filters { }; notebook = callPackage ../development/python-modules/notebook { }; From f5f7f1510dc1df14dc58d95fe77735e2fb9c6bb1 Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sat, 27 Oct 2018 14:54:12 +0300 Subject: [PATCH 51/87] pythonPackages.nose-of-yeti: init at 1.8 --- .../python-modules/nose-of-yeti/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/nose-of-yeti/default.nix diff --git a/pkgs/development/python-modules/nose-of-yeti/default.nix b/pkgs/development/python-modules/nose-of-yeti/default.nix new file mode 100644 index 00000000000..7a783da3117 --- /dev/null +++ b/pkgs/development/python-modules/nose-of-yeti/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, six, nose, fudge, should-dsl }: + +buildPythonPackage rec { + pname = "nose-of-yeti"; + version = "1.8"; + + propagatedBuildInputs = [ six ]; + + checkInputs = [ nose fudge should-dsl ]; + + # PyPI doesn't contain tests so let's use GitHub. + src = fetchFromGitHub { + owner = "delfick"; + repo = pname; + rev = "v${version}"; + sha256 = "1pq9bf47k0csv41vdh2g6n336p3pd11q91hj5ypk0ls3nj756gbx"; + }; + + checkPhase = '' + patchShebangs test.sh + ./test.sh + ''; + + meta = with stdenv.lib; { + description = "Nose plugin providing BDD dsl for python"; + homepage = https://github.com/delfick/nose-of-yeti; + license = licenses.mit; + maintainers = with maintainers; [ jluttine ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 15fe1f64ff6..699864f0f48 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3076,6 +3076,8 @@ in { nose-cprof = callPackage ../development/python-modules/nose-cprof { }; + nose-of-yeti = callPackage ../development/python-modules/nose-of-yeti { }; + nose-pattern-exclude = callPackage ../development/python-modules/nose-pattern-exclude { }; nose_warnings_filters = callPackage ../development/python-modules/nose_warnings_filters { }; From 0f81ac7737ba0de7a65fb3578942534544cab2c1 Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sat, 27 Oct 2018 14:55:19 +0300 Subject: [PATCH 52/87] pythonPackages.nose-focus: init at 0.1.3 --- .../python-modules/nose-focus/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/nose-focus/default.nix diff --git a/pkgs/development/python-modules/nose-focus/default.nix b/pkgs/development/python-modules/nose-focus/default.nix new file mode 100644 index 00000000000..ef86a35b304 --- /dev/null +++ b/pkgs/development/python-modules/nose-focus/default.nix @@ -0,0 +1,35 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, six, nose, nose-of-yeti +, nose-pattern-exclude, which }: + +buildPythonPackage rec { + pname = "nose-focus"; + version = "0.1.3"; + + propagatedBuildInputs = [ six ]; + + checkInputs = [ nose nose-of-yeti nose-pattern-exclude which ]; + + # PyPI doesn't contain tests so let's use GitHub. See: + # https://github.com/delfick/nose-focus/issues/4 + # + # However, the versions aren't tagged on GitHub so need to use a manually + # checked revision. See: https://github.com/delfick/nose-focus/issues/5 + src = fetchFromGitHub { + owner = "delfick"; + repo = pname; + rev = "4dac785ba07ed6e1df61b0fe2854685eef3bd115"; + sha256 = "0gpd4j4433dc5ifh31w08c3bx862md0qm1ix6aam1rz4ayxpq51f"; + }; + + checkPhase = '' + patchShebangs test.sh + ./test.sh + ''; + + meta = with stdenv.lib; { + description = "Decorator and plugin to make nose focus on specific tests"; + homepage = https://nose-focus.readthedocs.io/en/latest/; + license = licenses.wtfpl; + maintainers = with maintainers; [ jluttine ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 699864f0f48..771fd095a5b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3066,6 +3066,8 @@ in { nose-exclude = callPackage ../development/python-modules/nose-exclude { }; + nose-focus = callPackage ../development/python-modules/nose-focus { }; + nose2 = callPackage ../development/python-modules/nose2 { }; nose-cover3 = callPackage ../development/python-modules/nose-cover3 { }; From 5d2ac2cd0674987e416202464076d5af3af30418 Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sat, 27 Oct 2018 15:00:51 +0300 Subject: [PATCH 53/87] pythonPackages.yanc: init at 0.3.3 --- .../python-modules/yanc/default.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/development/python-modules/yanc/default.nix diff --git a/pkgs/development/python-modules/yanc/default.nix b/pkgs/development/python-modules/yanc/default.nix new file mode 100644 index 00000000000..690b110fc93 --- /dev/null +++ b/pkgs/development/python-modules/yanc/default.nix @@ -0,0 +1,27 @@ +{ stdenv, buildPythonPackage, pythonOlder, fetchPypi, nose }: + +buildPythonPackage rec { + pname = "yanc"; + version = "0.3.3"; + + # Tests fail on Python>=3.5. See: https://github.com/0compute/yanc/issues/10 + disabled = !(pythonOlder "3.5"); + + checkInputs = [ nose ]; + + src = fetchPypi { + inherit pname version; + sha256 = "0z35bkk9phs40lf5061k1plhjdl5fskm0dmdikrsqi1bjihnxp8w"; + }; + + checkPhase = '' + nosetests . + ''; + + meta = with stdenv.lib; { + description = "Yet another nose colorer"; + homepage = https://github.com/0compute/yanc; + license = licenses.gpl3; + maintainers = with maintainers; [ jluttine ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 771fd095a5b..e3c8ddcab17 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4849,6 +4849,8 @@ in { yamllint = callPackage ../development/python-modules/yamllint { }; + yanc = callPackage ../development/python-modules/yanc { }; + yarl = callPackage ../development/python-modules/yarl { }; suseapi = callPackage ../development/python-modules/suseapi { }; From 735abd8c4c054c98c90a634c2bc22f2734a4be2f Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sat, 27 Oct 2018 16:17:30 +0300 Subject: [PATCH 54/87] pythonPackages.pyres: init at 1.5 --- .../python-modules/pyres/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/pyres/default.nix diff --git a/pkgs/development/python-modules/pyres/default.nix b/pkgs/development/python-modules/pyres/default.nix new file mode 100644 index 00000000000..111e05066d6 --- /dev/null +++ b/pkgs/development/python-modules/pyres/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, simplejson, redis, setproctitle, nose, pkgs }: + +buildPythonPackage rec { + pname = "pyres"; + version = "1.5"; + + # ps is used in Worker.worker_pids method + propagatedBuildInputs = [ simplejson setproctitle redis pkgs.ps ]; + checkInputs = [ nose pkgs.redis ]; + + # PyPI tarball doesn't contain tests so let's use GitHub + src = fetchFromGitHub { + owner = "binarydud"; + repo = pname; + rev = version; + sha256 = "1rkpv7gbjxl9h9g7kncmsrgmi77l7pgfq8d7dbnsr3ia2jmjqb8y"; + }; + + checkPhase = '' + redis-server & + nosetests . + ''; + + meta = with stdenv.lib; { + description = "Python resque clone"; + homepage = https://github.com/binarydud/pyres; + license = licenses.mit; + maintainers = with maintainers; [ jluttine ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e3c8ddcab17..3a270d971d3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -585,6 +585,8 @@ in { pyparser = callPackage ../development/python-modules/pyparser { }; + pyres = callPackage ../development/python-modules/pyres { }; + pyqt4 = callPackage ../development/python-modules/pyqt/4.x.nix { pythonPackages = self; }; From 866be59b208ea213b52b64773934cfbd0bb83460 Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sat, 27 Oct 2018 16:36:18 +0300 Subject: [PATCH 55/87] pythonPackages.pyssim: init at 0.4 --- .../python-modules/pyssim/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/python-modules/pyssim/default.nix diff --git a/pkgs/development/python-modules/pyssim/default.nix b/pkgs/development/python-modules/pyssim/default.nix new file mode 100644 index 00000000000..38dddda9b2e --- /dev/null +++ b/pkgs/development/python-modules/pyssim/default.nix @@ -0,0 +1,32 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, numpy, scipy, pillow }: + +buildPythonPackage rec { + pname = "pyssim"; + version = "0.4"; + + propagatedBuildInputs = [ numpy scipy pillow ]; + + # PyPI tarball doesn't contain test images so let's use GitHub + src = fetchFromGitHub { + owner = "jterrace"; + repo = pname; + rev = "v${version}"; + sha256 = "0rnj3xdhma1fc0fg0jjsdy74ar0hgr3w8kygbnijqjdms7m3asqm"; + }; + + # Tests are copied from .travis.yml + checkPhase = '' + $out/bin/pyssim test-images/test1-1.png test-images/test1-1.png | grep 1 + $out/bin/pyssim test-images/test1-1.png test-images/test1-2.png | grep 0.998 + $out/bin/pyssim test-images/test1-1.png "test-images/*" | grep -E " 1| 0.998| 0.672| 0.648" | wc -l | grep 4 + $out/bin/pyssim --cw --width 128 --height 128 test-images/test1-1.png test-images/test1-1.png | grep 1 + $out/bin/pyssim --cw --width 128 --height 128 test-images/test3-orig.jpg test-images/test3-rot.jpg | grep 0.938 + ''; + + meta = with stdenv.lib; { + description = "Module for computing Structured Similarity Image Metric (SSIM) in Python"; + homepage = https://github.com/jterrace/pyssim; + license = licenses.mit; + maintainers = with maintainers; [ jluttine ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3a270d971d3..4a2d2c4c429 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -611,6 +611,8 @@ in { slurm = pkgs.slurm; }; + pyssim = callPackage ../development/python-modules/pyssim { }; + pystache = callPackage ../development/python-modules/pystache { }; pytesseract = callPackage ../development/python-modules/pytesseract { }; From c6bd5294aa8d72a0cb76a414283e741150a169a3 Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sat, 27 Oct 2018 19:04:03 +0300 Subject: [PATCH 56/87] pythonPackages.preggy: init at 1.4.2 --- .../python-modules/preggy/default.nix | 25 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/development/python-modules/preggy/default.nix diff --git a/pkgs/development/python-modules/preggy/default.nix b/pkgs/development/python-modules/preggy/default.nix new file mode 100644 index 00000000000..b88366de88f --- /dev/null +++ b/pkgs/development/python-modules/preggy/default.nix @@ -0,0 +1,25 @@ +{ stdenv, buildPythonPackage, fetchPypi, six, unidecode, nose, yanc }: + +buildPythonPackage rec { + pname = "preggy"; + version = "1.4.2"; + + propagatedBuildInputs = [ six unidecode ]; + checkInputs = [ nose yanc ]; + + src = fetchPypi { + inherit pname version; + sha256 = "0g4ifjh01dkmdzs4621ahk8hpkngid1xxhl51jvzy4h4li4590hw"; + }; + + checkPhase = '' + nosetests . + ''; + + meta = with stdenv.lib; { + description = "Assertion library for Python"; + homepage = http://heynemann.github.io/preggy/; + license = licenses.mit; + maintainers = with maintainers; [ jluttine ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4a2d2c4c429..7def4851e7a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4847,6 +4847,8 @@ in { packaging = callPackage ../development/python-modules/packaging { }; + preggy = callPackage ../development/python-modules/preggy { }; + pytoml = callPackage ../development/python-modules/pytoml { }; pypandoc = callPackage ../development/python-modules/pypandoc { }; From fd6e6dcfa1ede2a79559e309b4d01581a31fe691 Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sat, 27 Oct 2018 16:17:05 +0300 Subject: [PATCH 57/87] pythonPackages.remotecv: init at 2.2.2 --- .../python-modules/remotecv/default.nix | 38 +++++++++++++++++++ .../remotecv/install_requires.patch | 16 ++++++++ pkgs/top-level/python-packages.nix | 2 + 3 files changed, 56 insertions(+) create mode 100644 pkgs/development/python-modules/remotecv/default.nix create mode 100644 pkgs/development/python-modules/remotecv/install_requires.patch diff --git a/pkgs/development/python-modules/remotecv/default.nix b/pkgs/development/python-modules/remotecv/default.nix new file mode 100644 index 00000000000..2102cf06425 --- /dev/null +++ b/pkgs/development/python-modules/remotecv/default.nix @@ -0,0 +1,38 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, pillow, argparse, pyres, nose +, preggy, numpy, yanc, nose-focus, mock, opencv }: + +buildPythonPackage rec { + pname = "remotecv"; + version = "2.2.2"; + + propagatedBuildInputs = [ pillow argparse pyres ]; + + checkInputs = [ nose preggy numpy yanc nose-focus mock opencv ]; + + # PyPI tarball doesn't contain tests so let's use GitHub + src = fetchFromGitHub { + owner = "thumbor"; + repo = pname; + rev = version; + sha256 = "0slalp1x626ajy2cbdfifhxf0ffzckqdz6siqsqr6s03hrl877hy"; + }; + + # Remove unnecessary argparse dependency and some seemingly unnecessary + # version upper bounds because nixpkgs contains (or could contain) newer + # versions. + # See: https://github.com/thumbor/remotecv/issues/15 + patches = [ + ./install_requires.patch + ]; + + checkPhase = '' + nosetests --with-yanc -s tests/ + ''; + + meta = with stdenv.lib; { + description = "OpenCV worker for facial and feature recognition"; + homepage = https://github.com/thumbor/remotecv/wiki; + license = licenses.mit; + maintainers = with maintainers; [ jluttine ]; + }; +} diff --git a/pkgs/development/python-modules/remotecv/install_requires.patch b/pkgs/development/python-modules/remotecv/install_requires.patch new file mode 100644 index 00000000000..37203128486 --- /dev/null +++ b/pkgs/development/python-modules/remotecv/install_requires.patch @@ -0,0 +1,16 @@ +diff --git a/setup.py b/setup.py +index 70f765c..8003cda 100644 +--- a/setup.py ++++ b/setup.py +@@ -53,9 +53,8 @@ remotecv is an OpenCV worker for facial and feature recognition + }, + + install_requires=[ +- "argparse>=1.2.1,<1.3.0", +- "pyres>=1.5,<1.6", +- "Pillow>=4.3.0,<5.2.0", ++ "pyres>=1.5", ++ "Pillow>=4.3.0", + ], + + entry_points={ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7def4851e7a..b55c18734b0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -658,6 +658,8 @@ in { relatorio = callPackage ../development/python-modules/relatorio { }; + remotecv = callPackage ../development/python-modules/remotecv { }; + pyzufall = callPackage ../development/python-modules/pyzufall { }; rhpl = disabledIf isPy3k (callPackage ../development/python-modules/rhpl {}); From cfaf696a7b5679c67682d8b8eddf73fd848e7187 Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sun, 28 Oct 2018 09:42:15 +0200 Subject: [PATCH 58/87] pythonPackages.cairosvg1: init at 1.0.22 --- .../python-modules/cairosvg/1_x.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/cairosvg/1_x.nix diff --git a/pkgs/development/python-modules/cairosvg/1_x.nix b/pkgs/development/python-modules/cairosvg/1_x.nix new file mode 100644 index 00000000000..b6d40a5fdb7 --- /dev/null +++ b/pkgs/development/python-modules/cairosvg/1_x.nix @@ -0,0 +1,37 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, cairocffi, nose, fontconfig +, cssselect2, defusedxml, pillow, tinycss2 }: + +# CairoSVG 2.x dropped support for Python 2 so offer CairoSVG 1.x as an +# alternative +buildPythonPackage rec { + pname = "CairoSVG"; + version = "1.0.22"; + + # PyPI doesn't include tests so use GitHub + src = fetchFromGitHub { + owner = "Kozea"; + repo = pname; + rev = version; + sha256 = "15z0cag5s79ghhrlgs5xc9ayvzzdr3v8151vf6k819f1drsfjfxl"; + }; + + propagatedBuildInputs = [ cairocffi ]; + + checkInputs = [ nose fontconfig cssselect2 defusedxml pillow tinycss2 ]; + + # Almost all tests just fail. Not sure how to fix them. + doCheck = false; + + # checkInputs = [ nose fontconfig cssselect2 defusedxml pillow tinycss2 ]; + + # checkPhase = '' + # FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf nosetests . + # ''; + + meta = with stdenv.lib; { + homepage = https://cairosvg.org; + license = licenses.lgpl3; + description = "SVG converter based on Cairo"; + maintainers = with maintainers; [ jluttine ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b55c18734b0..d1153e449b3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1140,6 +1140,8 @@ in { cairocffi = callPackage ../development/python-modules/cairocffi {}; + cairosvg1 = callPackage ../development/python-modules/cairosvg/1_x.nix {}; + cairosvg = callPackage ../development/python-modules/cairosvg {}; carrot = callPackage ../development/python-modules/carrot {}; From 336f11c3b16a037aedd8b7201b794d7edc18a3ab Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Sat, 27 Oct 2018 16:17:52 +0300 Subject: [PATCH 59/87] pythonPackages.thumbor: run tests --- .../python-modules/thumbor/default.nix | 56 +++++++++++++++---- 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/thumbor/default.nix b/pkgs/development/python-modules/thumbor/default.nix index ec33a5020d4..4ab443afbff 100644 --- a/pkgs/development/python-modules/thumbor/default.nix +++ b/pkgs/development/python-modules/thumbor/default.nix @@ -1,6 +1,8 @@ -{ buildPythonPackage, tornado, pycrypto, pycurl, pytz -, pillow, derpconf, python_magic, pexif, libthumbor, opencv, webcolors -, piexif, futures, statsd, thumborPexif, fetchPypi, isPy3k, lib +{ buildPythonPackage, python, tornado, pycrypto, pycurl, pytz +, pillow, derpconf, python_magic, libthumbor, webcolors +, piexif, futures, statsd, thumborPexif, fetchFromGitHub, isPy3k, lib +, mock, raven, nose, yanc, remotecv, pyssim, cairosvg1, preggy, opencv3 +, pkgs, coreutils }: buildPythonPackage rec { @@ -9,16 +11,38 @@ buildPythonPackage rec { disabled = isPy3k; # see https://github.com/thumbor/thumbor/issues/1004 - src = fetchPypi { - inherit pname version; - sha256 = "1icfnzwzi5lvnh576n7v3r819jaw15ph9ja2w3fwg5z9qs40xvl8"; + # Tests aren't included in PyPI tarball so use GitHub instead + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = version; + sha256 = "1ys5ymwbvgh2ir85g9nyrzzf8vgi16j6pzzi53b0rgjx0kwlmnxg"; }; postPatch = '' substituteInPlace "setup.py" \ --replace '"argparse",' "" ${lib.optionalString isPy3k ''--replace '"futures",' ""''} + substituteInPlace "tests/test_utils.py" \ + --replace "/bin/ls" "${coreutils}/bin/ls" + substituteInPlace "tests/detectors/test_face_detector.py" \ + --replace "./thumbor" "$out/lib/${python.libPrefix}/site-packages/thumbor" + substituteInPlace "tests/detectors/test_glasses_detector.py" \ + --replace "./thumbor" "$out/lib/${python.libPrefix}/site-packages/thumbor" ''; + checkInputs = [ + nose + pyssim + preggy + mock + yanc + remotecv + cairosvg1 + raven + pkgs.redis + pkgs.glibcLocales + ]; + propagatedBuildInputs = [ tornado pycrypto @@ -27,18 +51,26 @@ buildPythonPackage rec { pillow derpconf python_magic - pexif libthumbor - opencv + opencv3 webcolors piexif statsd + pkgs.exiftool + pkgs.libjpeg + pkgs.ffmpeg + pkgs.gifsicle ] ++ lib.optionals (!isPy3k) [ futures thumborPexif ]; - # disabled due to too many impure tests and issues with native modules in - # the pure testing environment. See https://github.com/NixOS/nixpkgs/pull/37147 - # for further reference. - doCheck = false; + # Remove the source tree before running nosetests because otherwise nosetests + # uses that instead of the installed package. Is there some other way to + # achieve this? + checkPhase = '' + redis-server --port 6668 --requirepass hey_you & + rm -r thumbor + export LC_ALL="en_US.UTF-8" + nosetests -v --with-yanc -s tests/ + ''; meta = with lib; { description = "A smart imaging service"; From 51f6d7f24465e7d894b349cb2b9c9139cfb6dd55 Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Mon, 29 Oct 2018 10:41:53 +0200 Subject: [PATCH 60/87] pythonPackages.piexif: 1.0.13 -> 1.1.2 --- .../development/python-modules/piexif/default.nix | 15 ++++----------- .../python-modules/thumbor/default.nix | 2 ++ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/piexif/default.nix b/pkgs/development/python-modules/piexif/default.nix index b5460e8b608..0de96a3f585 100644 --- a/pkgs/development/python-modules/piexif/default.nix +++ b/pkgs/development/python-modules/piexif/default.nix @@ -2,22 +2,15 @@ buildPythonPackage rec { pname = "piexif"; - version = "1.0.13"; + version = "1.1.2"; - # pillow needed for unit tests - buildInputs = [ pillow ]; - - postPatch = '' - # incompatibility with pillow => 4.2.0 - # has been resolved in https://github.com/hMatoba/Piexif/commit/c3a8272f5e6418f223b25f6486d8ddda201bbdf1 - # remove this in the next version - sed -i -e 's/RGBA/RGB/' tests/s_test.py - ''; + # Pillow needed for unit tests + checkInputs = [ pillow ]; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "1d3dde03bd6298393645bc11d585b67a6ea98fd7e9e1aded6d5d6ec3e4cfbdda"; + sha256 = "0dj6wiw4mk65zn7p0qpghra39mf88m3ph2xn7ff9jvasgczrgkb0"; }; meta = with stdenv.lib; { diff --git a/pkgs/development/python-modules/thumbor/default.nix b/pkgs/development/python-modules/thumbor/default.nix index 4ab443afbff..27e90514b72 100644 --- a/pkgs/development/python-modules/thumbor/default.nix +++ b/pkgs/development/python-modules/thumbor/default.nix @@ -22,6 +22,8 @@ buildPythonPackage rec { postPatch = '' substituteInPlace "setup.py" \ --replace '"argparse",' "" ${lib.optionalString isPy3k ''--replace '"futures",' ""''} + substituteInPlace "setup.py" \ + --replace "piexif>=1.0.13,<1.1.0" "piexif>=1.0.13" substituteInPlace "tests/test_utils.py" \ --replace "/bin/ls" "${coreutils}/bin/ls" substituteInPlace "tests/detectors/test_face_detector.py" \ From e2a6e8b8ffe78d908a65c15a559f9d172b891c80 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 28 Nov 2018 16:25:56 +0100 Subject: [PATCH 61/87] pythonPackages.pyres: ensure that redis 2.10.6 is used Upstream's requirements.txt wrongly suggests that redis==3.x is support (missing upper-bound constraint), but the tests break due to API incompatibilities. --- .../python-modules/pyres/default.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyres/default.nix b/pkgs/development/python-modules/pyres/default.nix index 111e05066d6..2ea6043c427 100644 --- a/pkgs/development/python-modules/pyres/default.nix +++ b/pkgs/development/python-modules/pyres/default.nix @@ -1,11 +1,26 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, simplejson, redis, setproctitle, nose, pkgs }: +{ stdenv, fetchPypi, buildPythonPackage, fetchFromGitHub, simplejson, redis, setproctitle, nose, pkgs }: + +let + + # the requirements of `pyres` support Redis 3.x (due to a missing upper-bound), + # but it doesn't support Redis 3.x. + redis' = redis.overridePythonAttrs (old: rec { + pname = "redis"; + version = "2.10.6"; + src = fetchPypi { + inherit pname version; + sha256 = "03vcgklykny0g0wpvqmy8p6azi2s078317wgb2xjv5m2rs9sjb52"; + }; + }); + +in buildPythonPackage rec { pname = "pyres"; version = "1.5"; # ps is used in Worker.worker_pids method - propagatedBuildInputs = [ simplejson setproctitle redis pkgs.ps ]; + propagatedBuildInputs = [ simplejson setproctitle redis' pkgs.ps ]; checkInputs = [ nose pkgs.redis ]; # PyPI tarball doesn't contain tests so let's use GitHub From f222ebdd605256cc4ec76542dd4fe40b6f72df03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 29 Nov 2018 11:13:13 +0000 Subject: [PATCH 62/87] fusionio-vsl: remove Broken on all kernel version. No update in nixpkgs since 2015 --- pkgs/os-specific/linux/fusionio/srcs.nix | 22 --------- pkgs/os-specific/linux/fusionio/util.nix | 45 ------------------- .../linux/fusionio/vsl-fix-file-inode.patch | 13 ------ pkgs/os-specific/linux/fusionio/vsl.nix | 39 ---------------- pkgs/top-level/all-packages.nix | 4 -- 5 files changed, 123 deletions(-) delete mode 100644 pkgs/os-specific/linux/fusionio/srcs.nix delete mode 100644 pkgs/os-specific/linux/fusionio/util.nix delete mode 100644 pkgs/os-specific/linux/fusionio/vsl-fix-file-inode.patch delete mode 100644 pkgs/os-specific/linux/fusionio/vsl.nix diff --git a/pkgs/os-specific/linux/fusionio/srcs.nix b/pkgs/os-specific/linux/fusionio/srcs.nix deleted file mode 100644 index fb632a6e9fb..00000000000 --- a/pkgs/os-specific/linux/fusionio/srcs.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ fetchurl }: -rec { - version = "3.2.10"; - - libvsl = fetchurl { - name = "fusionio-libvsl-${version}.deb"; - url = "https://drive.google.com/uc?export=download&id=0B7U0_ZBLoB2Wc01uNk1nVURMVFk"; - sha256 = "1i8ii9dlyskj2dvad7nfvlm1wz2s4gy5llbl29hfa13w6nhcl5wk"; - }; - - util = fetchurl { - name = "fusionio-util-${version}.deb"; - url = "https://drive.google.com/uc?export=download&id=0B7U0_ZBLoB2WbDVuQkwzWjZONGs"; - sha256 = "0aw64kk5cwchjhqh5n1lpqrrh5gn4qdalnmasd25z7sijy2flxgq"; - }; - - vsl = fetchurl { - name = "fusionio-iomemory-vsl-${version}.tar.gz"; - url = "https://drive.google.com/uc?export=download&id=0B7U0_ZBLoB2WbXFMbExEMUFCcWM"; - sha256 = "1zm20aa1jmmqcqkb4p9r4jsgbg371zr1abdz32rw02i9687fsgcc"; - }; -} diff --git a/pkgs/os-specific/linux/fusionio/util.nix b/pkgs/os-specific/linux/fusionio/util.nix deleted file mode 100644 index 6327a95f39d..00000000000 --- a/pkgs/os-specific/linux/fusionio/util.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ stdenv, fetchurl, dpkg, glibc, gcc, libuuid }: - -let - srcs = import ./srcs.nix { inherit fetchurl; }; -in -stdenv.mkDerivation { - name = "fusionio-util-${srcs.version}"; - - nativeBuildInputs = [ dpkg ]; - - buildCommand = '' - dpkg-deb -R ${srcs.libvsl} $TMPDIR - dpkg-deb -R ${srcs.util} $TMPDIR - - rm $TMPDIR/usr/bin/fio-{bugreport,sanitize} - - mkdir -p $out - cp -r $TMPDIR/{etc,usr/{bin,lib,share}} $out - for BIN in $(find $out/bin -type f); do - echo Patching $BIN - patchelf --set-interpreter "${glibc.out}/lib/ld-linux-x86-64.so.2" --set-rpath "${stdenv.lib.makeLibraryPath [ glibc gcc.cc libuuid ] }:$out/lib" $BIN - - # Test our binary to see if it was correctly patched - set +e - $BIN --help >/dev/null 2>&1 - ST="$?" - set -e - if [ "$ST" -ge "10" ]; then - echo "Failed testing $BIN" - exit 1; - fi - done - ''; - - dontStrip = true; - - meta = with stdenv.lib; { - homepage = http://fusionio.com; - description = "Fusionio command line utilities"; - license = licenses.unfree; - platforms = [ "x86_64-linux" ]; - broken = stdenv.hostPlatform.system != "x86_64-linux"; - maintainers = with maintainers; [ wkennington ]; - }; -} diff --git a/pkgs/os-specific/linux/fusionio/vsl-fix-file-inode.patch b/pkgs/os-specific/linux/fusionio/vsl-fix-file-inode.patch deleted file mode 100644 index 25887ceee0f..00000000000 --- a/pkgs/os-specific/linux/fusionio/vsl-fix-file-inode.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/kfile.c b/kfile.c -index 5014e77..a65d921 100644 ---- a/kfile.c -+++ b/kfile.c -@@ -51,7 +51,7 @@ fusion_inode * noinline kfio_fs_inode(fusion_file *fp) - #if KFIOC_STRUCT_FILE_HAS_PATH - return (fusion_inode *) ((struct file *)fp)->f_path.dentry->d_inode; - #else -- return (fusion_inode *) ((struct file *)fp)->f_dentry->d_inode; -+ return (fusion_inode *) file_inode((struct file *)fp); - #endif - } - diff --git a/pkgs/os-specific/linux/fusionio/vsl.nix b/pkgs/os-specific/linux/fusionio/vsl.nix deleted file mode 100644 index 6ebe2e0cdaf..00000000000 --- a/pkgs/os-specific/linux/fusionio/vsl.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ stdenv, fetchurl, kernel }: - -let - srcs = import ./srcs.nix { inherit fetchurl; }; -in -stdenv.mkDerivation rec { - name = "fusionio-iomemory-vsl-${srcs.version}"; - - src = srcs.vsl; - - hardeningDisable = [ "pic" ]; - - prePatch = '' - cd root/usr/src/iomemory-vsl-* - ''; - - patches = stdenv.lib.optional (stdenv.lib.versionAtLeast kernel.version "3.19") ./vsl-fix-file-inode.patch; - - preBuild = '' - sed -i Makefile kfio_config.sh \ - -e "s,\(KERNELDIR=\"\|KERNEL_SRC =\)[^\"]*,\1${kernel.dev}/lib/modules/${kernel.modDirVersion}/build,g" - export DKMS_KERNEL_VERSION=${kernel.modDirVersion} - export TARGET="x86_64_cc48" - ''; - - installPhase = '' - export INSTALL_ROOT=$out - make modules_install - ''; - - meta = with stdenv.lib; { - homepage = http://fusionio.com; - description = "Kernel driver for accessing fusion-io cards"; - license = licenses.unfree; - platforms = [ "x86_64-linux" ]; - broken = stdenv.hostPlatform.system != "x86_64-linux"; - maintainers = with maintainers; [ wkennington ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b188f985e46..d31d2b6125c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14201,8 +14201,6 @@ with pkgs; fuse3 = fusePackages.fuse_3; fuse-common = hiPrio fusePackages.fuse_3.common; - fusionio-util = callPackage ../os-specific/linux/fusionio/util.nix { }; - fxload = callPackage ../os-specific/linux/fxload { }; gfxtablet = callPackage ../os-specific/linux/gfxtablet {}; @@ -14485,8 +14483,6 @@ with pkgs; v4l2loopback = callPackage ../os-specific/linux/v4l2loopback { }; - fusionio-vsl = callPackage ../os-specific/linux/fusionio/vsl.nix { }; - lttng-modules = callPackage ../os-specific/linux/lttng-modules { }; broadcom_sta = callPackage ../os-specific/linux/broadcom-sta { }; From 432a2e0354475ee43b77cb3669b1e45a657ba015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 29 Nov 2018 14:53:25 +0000 Subject: [PATCH 63/87] inferno: remove Also there have been updates, this package was not updated since 2015 in the repository I therefore conclude that nobody actually uses this. Official webpage was also not updated since then. --- pkgs/applications/inferno/default.nix | 58 --------------------------- pkgs/applications/inferno/inferno | 31 -------------- pkgs/top-level/all-packages.nix | 2 - 3 files changed, 91 deletions(-) delete mode 100644 pkgs/applications/inferno/default.nix delete mode 100755 pkgs/applications/inferno/inferno diff --git a/pkgs/applications/inferno/default.nix b/pkgs/applications/inferno/default.nix deleted file mode 100644 index de9be76b6e4..00000000000 --- a/pkgs/applications/inferno/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ fetchhg, stdenv, xorg, makeWrapper }: - -stdenv.mkDerivation rec { - # Inferno is a rolling release from a mercurial repository. For the verison number - # of the package I'm using the mercurial commit number. - rev = "785"; - name = "inferno-${rev}"; - host = "Linux"; - objtype = "386"; - - src = fetchhg { - url = "https://bitbucket.org/inferno-os/inferno-os"; - sha256 = "1b428ma9fi5skvfrxp91dr43a62kax89wmx7950ahc1cxyx90k7x"; - }; - - buildInputs = [ makeWrapper ] ++ (with xorg; [ libX11 libXpm libXext xextproto ]); - - infernoWrapper = ./inferno; - - configurePhase = '' - sed -e 's@^ROOT=.*$@ROOT='"$out"'/share/inferno@g' \ - -e 's@^OBJTYPE=.*$@OBJTYPE=${objtype}@g' \ - -e 's@^SYSHOST=.*$@SYSHOST=${host}@g' \ - -i mkconfig - # Get rid of an annoying warning - sed -e 's/_BSD_SOURCE/_DEFAULT_SOURCE/g' \ - -i ${host}/${objtype}/include/lib9.h - ''; - - buildPhase = '' - mkdir -p $out/share/inferno - cp -r . $out/share/inferno - ./makemk.sh - export PATH=$PATH:$out/share/inferno/Linux/386/bin - mk nuke - mk - ''; - - installPhase = '' - # Installs executables in $out/share/inferno/${host}/${objtype}/bin - mk install - mkdir -p $out/bin - # Install start-up script - makeWrapper $infernoWrapper $out/bin/inferno \ - --suffix PATH ':' "$out/share/inferno/Linux/386/bin" \ - --set INFERNO_ROOT "$out/share/inferno" - ''; - - hardeningDisable = [ "fortify" ]; - - meta = { - description = "A compact distributed operating system for building cross-platform distributed systems"; - homepage = http://inferno-os.org/; - license = stdenv.lib.licenses.gpl2; - maintainers = with stdenv.lib.maintainers; [ doublec kovirobi ]; - platforms = with stdenv.lib.platforms; linux; - }; -} diff --git a/pkgs/applications/inferno/inferno b/pkgs/applications/inferno/inferno deleted file mode 100755 index 6eb6da8861a..00000000000 --- a/pkgs/applications/inferno/inferno +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env bash - - -export INFERNO_HOME="$HOME/.local/share/inferno" -if [ -n "$XDG_DATA_HOME" ] - then export INFERNO_HOME="$XDG_DATA_HOME/inferno" -fi - -if [ ! -d $INFERNO_HOME ]; then - mkdir -p $INFERNO_HOME -fi - -if [ ! -d $INFERNO_HOME/tmp ]; then - mkdir -p $INFERNO_HOME/tmp -fi - -for d in $INFERNO_HOME/{acme,appl,dis,lib,man,module,usr/inferno}; do - if [ ! -d $d ]; then - mkdir -p $d - cp --no-preserve=all -r $INFERNO_ROOT/${d#$INFERNO_HOME/}/* $d/ - chmod -R +w $d - fi -done - -if [ ! -d $INFERNO_HOME/usr/$USER ]; then - mkdir -p $INFERNO_HOME/usr/$USER - cp -r $INFERNO_ROOT/usr/inferno/* $INFERNO_HOME/usr/$USER/ - chmod -R +w $INFERNO_HOME/usr/$USER -fi - -exec emu "$@" /dis/sh.dis -c "bind -b -c '#U*$INFERNO_HOME/' /; /dis/sh.dis" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d31d2b6125c..6e290571fc5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17503,8 +17503,6 @@ with pkgs; # Impressive, formerly known as "KeyJNote". impressive = callPackage ../applications/office/impressive { }; - inferno = pkgsi686Linux.callPackage ../applications/inferno { }; - inkscape = callPackage ../applications/graphics/inkscape { lcms = lcms2; poppler = poppler_0_61; From 6854b50c06709042b5e4eab1e3552e83e5ced301 Mon Sep 17 00:00:00 2001 From: Stig Date: Thu, 29 Nov 2018 16:10:37 +0100 Subject: [PATCH 64/87] perlPackages.Imager: init at 1.006 * perlPackages.Imager: init at 1.006 (#50620) --- pkgs/top-level/perl-packages.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index e8c407d23fa..4bcc7f4d32c 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -7462,6 +7462,21 @@ let }; }; + Imager = buildPerlPackage rec { + name = "Imager-1.006"; + src = fetchurl { + url = "mirror://cpan/authors/id/T/TO/TONYC/${name}.tar.gz"; + sha256 = "c1e434a4de6250e3b229aa74aa653e56c38f981864f71a975366c50559c9d52b"; + }; + buildInputs = [ ExtUtilsPkgConfig pkgs.freetype pkgs.fontconfig pkgs.libjpeg pkgs.libpng ]; + makeMakerFlags = "--incpath ${pkgs.libjpeg.dev}/include --libpath ${pkgs.libjpeg.out}/lib --incpath ${pkgs.libpng.dev}/include --libpath ${pkgs.libpng.out}/lib"; + meta = { + homepage = http://imager.perl.org/; + description = "Perl extension for Generating 24 bit Images"; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; + ImageInfo = buildPerlPackage rec { name = "Image-Info-1.41"; src = fetchurl { From 7c6189d5494b406f2af05e75a5e2a6bb6d7dae96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 29 Nov 2018 16:16:47 +0000 Subject: [PATCH 65/87] libosip_3: remove Old package from 2015, that has no users in nixpkgs --- pkgs/development/libraries/osip/3.nix | 17 ----------------- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 19 deletions(-) delete mode 100644 pkgs/development/libraries/osip/3.nix diff --git a/pkgs/development/libraries/osip/3.nix b/pkgs/development/libraries/osip/3.nix deleted file mode 100644 index b485fa3e947..00000000000 --- a/pkgs/development/libraries/osip/3.nix +++ /dev/null @@ -1,17 +0,0 @@ -{stdenv, fetchurl}: -stdenv.mkDerivation rec { - version = "3.6.0"; - src = fetchurl { - url = "mirror://gnu/osip/libosip2-${version}.tar.gz"; - sha256 = "1kcndqvsyxgbhkksgydvvjw15znfq6jiznvw058d21h5fq68p8f9"; - }; - name = "libosip2-${version}"; - - meta = { - license = stdenv.lib.licenses.lgpl21Plus; - homepage = http://www.gnu.org/software/osip/; - description = "The GNU oSIP library, an implementation of the Session Initiation Protocol (SIP)"; - maintainers = with stdenv.lib.maintainers; [ raskin ]; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d31d2b6125c..9b4ff0242da 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11097,8 +11097,6 @@ with pkgs; libosip = callPackage ../development/libraries/osip {}; - libosip_3 = callPackage ../development/libraries/osip/3.nix {}; - libosmium = callPackage ../development/libraries/libosmium { }; libosmocore = callPackage ../applications/misc/libosmocore { }; From ca11db894f2a8c91a950d9ec326c3977770b766c Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 5 Sep 2018 14:12:02 +0200 Subject: [PATCH 66/87] python2.pkgs.gst-python: fix build --- .../development/python-modules/gst-python/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/python-modules/gst-python/default.nix b/pkgs/development/python-modules/gst-python/default.nix index 8cbc08dbbfd..96da9bcf4f6 100644 --- a/pkgs/development/python-modules/gst-python/default.nix +++ b/pkgs/development/python-modules/gst-python/default.nix @@ -28,6 +28,17 @@ in buildPythonPackage rec { url = https://bugzilla.gnome.org/attachment.cgi?id=371989; sha256 = "1k46nvw175c1wvkqnx783i9d4w9vn431spcl48jb3y224jj3va08"; }) + # Fixes `from gi.repository import Gst` when gst-python's site-package is in + # PYTHONPATH + (fetchurl { + url = https://gitlab.freedesktop.org/gstreamer/gst-python/commit/d64bbc1e0c3c948c148f505cc5f856ce56732880.diff; + sha256 = "1n9pxmcl1x491mp47avpcw2a6n71lm0haz6mfas168prkgsk8q3r"; + }) + # Fixes python2 build from the above changes + (fetchurl { + url = https://gitlab.freedesktop.org/gstreamer/gst-python/commit/f79ac2d1434d7ba9717f3e943cfdc76e121eb5dd.diff; + sha256 = "17a164b0v36g0kwiqdlkjx6g0pjhcs6ilizck7iky8bgjnmiypm1"; + }) ]; # TODO: First python_dep in meson.build needs to be removed From 8f90b3324019890974fdb4d205bc1f6e73bf2a5f Mon Sep 17 00:00:00 2001 From: Charles Duffy Date: Thu, 29 Nov 2018 17:18:23 +0000 Subject: [PATCH 67/87] buildMaven: Support metadata-only dependencies The circumstances which can make this necessary are discussed in NixOS/mvn2nix-maven-plugin#17 --- pkgs/build-support/build-maven.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/build-support/build-maven.nix b/pkgs/build-support/build-maven.nix index b9da06c43c8..f47e3ebc61c 100644 --- a/pkgs/build-support/build-maven.nix +++ b/pkgs/build-support/build-maven.nix @@ -15,16 +15,15 @@ infoFile: let script = writeText "build-maven-repository.sh" '' ${lib.concatStrings (map (dep: let - inherit (dep) - url sha1 groupId artifactId - version metadata repository-id; + inherit (dep) sha1 groupId artifactId version metadata repository-id; versionDir = dep.unresolved-version or version; authenticated = dep.authenticated or false; + url = dep.url or ""; - fetch = (if authenticated then requireFile else fetchurl) { + fetch = if (url != "") then ((if authenticated then requireFile else fetchurl) { inherit url sha1; - }; + }) else ""; fetchMetadata = (if authenticated then requireFile else fetchurl) { inherit (metadata) url sha1; @@ -32,10 +31,15 @@ infoFile: let in '' dir=$out/$(echo ${groupId} | sed 's|\.|/|g')/${artifactId}/${versionDir} mkdir -p $dir - ln -sv ${fetch} $dir/${fetch.name} + + ${lib.optionalString (fetch != "") '' + ln -sv ${fetch} $dir/${fetch.name} + ''} ${lib.optionalString (dep ? metadata) '' ln -svf ${fetchMetadata} $dir/maven-metadata-${repository-id}.xml - ln -sv ${fetch} $dir/$(echo ${fetch.name} | sed 's|${version}|${dep.unresolved-version}|') + ${lib.optionalString (fetch != "") '' + ln -sv ${fetch} $dir/$(echo ${fetch.name} | sed 's|${version}|${dep.unresolved-version}|') + ''} ''} '') info.dependencies)} ''; From cfb184f2cb81e32639564597a0bf820a6595900e Mon Sep 17 00:00:00 2001 From: eburimu Date: Wed, 28 Nov 2018 00:13:19 +0300 Subject: [PATCH 68/87] fix reiserfsprogs cross compilation --- pkgs/tools/filesystems/reiserfsprogs/default.nix | 4 +++- .../reiserfsprogs/reiserfsprogs-ar-fix.patch | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/filesystems/reiserfsprogs/reiserfsprogs-ar-fix.patch diff --git a/pkgs/tools/filesystems/reiserfsprogs/default.nix b/pkgs/tools/filesystems/reiserfsprogs/default.nix index e23dd5f0bd1..345974bed58 100644 --- a/pkgs/tools/filesystems/reiserfsprogs/default.nix +++ b/pkgs/tools/filesystems/reiserfsprogs/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libuuid }: +{ stdenv, fetchurl, libuuid, autoreconfHook }: let version = "3.6.24"; in stdenv.mkDerivation rec { @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "0q07df9wxxih8714a3mdp61h5n347l7j2a0l351acs3xapzgwi3y"; }; + patches = [ ./reiserfsprogs-ar-fix.patch ]; + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ libuuid ]; NIX_CFLAGS_COMPILE = "-std=gnu90"; diff --git a/pkgs/tools/filesystems/reiserfsprogs/reiserfsprogs-ar-fix.patch b/pkgs/tools/filesystems/reiserfsprogs/reiserfsprogs-ar-fix.patch new file mode 100644 index 00000000000..356782a3d98 --- /dev/null +++ b/pkgs/tools/filesystems/reiserfsprogs/reiserfsprogs-ar-fix.patch @@ -0,0 +1,10 @@ +--- reiserfsprogs-3.6.24/configure.ac.orig 2018-11-29 17:16:52.313624894 +0300 ++++ reiserfsprogs-3.6.24/configure.ac 2018-11-29 17:16:54.480669132 +0300 +@@ -21,6 +21,7 @@ + AC_PROG_LN_S + AC_PROG_MAKE_SET + AC_PROG_RANLIB ++AM_PROG_AR + + dnl Checks for libraries. + From 79e15430b0a64c23d6a6247df974256d04de60c5 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 29 Nov 2018 20:36:44 +0100 Subject: [PATCH 69/87] androidStudioPackages.{dev,canary}: 3.4.0.4 -> 3.4.0.5 --- pkgs/applications/editors/android-studio/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix index b849f1fa62d..de7e3977ad8 100644 --- a/pkgs/applications/editors/android-studio/default.nix +++ b/pkgs/applications/editors/android-studio/default.nix @@ -18,9 +18,9 @@ let sha256Hash = "0apc566l4gwkwvfgj50d4qxm2gw26rxdlyr8kj3kfcra9a33c2b7"; }; latestVersion = { # canary & dev - version = "3.4.0.4"; # "Android Studio 3.4 Canary 5" - build = "183.5141831"; - sha256Hash = "0xfk5vyjk3pdb44jp43vb5394486z2qgzrdhjzbf1ncbhvaf0aji"; + version = "3.4.0.5"; # "Android Studio 3.4 Canary 6" + build = "183.5146016"; + sha256Hash = "1z2asimpsw15iild7c4aqicph6v327qx3ffjgvl2n8vr5rspsns1"; }; in rec { # Old alias From c90a45a3832ac4ea7f265016710f19522df1b109 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Thu, 29 Nov 2018 12:49:40 -0600 Subject: [PATCH 70/87] cockroachdb: 2.0.0 -> 2.1.1, aarch64 support This also splits the .bin output to have a separate .man attribute: previously it contained both. This also adds provisional support for aarch64-linux, which seems to build easily. (Full testing will ideally come via NixOS tests later) Signed-off-by: Austin Seipp --- pkgs/servers/sql/cockroachdb/default.nix | 44 +++++++++++++++++------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/pkgs/servers/sql/cockroachdb/default.nix b/pkgs/servers/sql/cockroachdb/default.nix index aba997d75f1..6f4b10759e3 100644 --- a/pkgs/servers/sql/cockroachdb/default.nix +++ b/pkgs/servers/sql/cockroachdb/default.nix @@ -1,18 +1,28 @@ -{ stdenv, buildGoPackage, fetchurl, cmake, xz, which, autoconf, ncurses6, libedit }: +{ stdenv, buildGoPackage, fetchurl +, cmake, xz, which, autoconf +, ncurses6, libedit, libunwind +}: +let + darwinDeps = [ libunwind libedit ]; + linuxDeps = [ ncurses6 ]; + + buildInputs = if stdenv.isDarwin then darwinDeps else linuxDeps; + nativeBuildInputs = [ cmake xz which autoconf ]; + +in buildGoPackage rec { name = "cockroach-${version}"; - version = "2.0.0"; + version = "2.1.1"; goPackagePath = "github.com/cockroachdb/cockroach"; src = fetchurl { url = "https://binaries.cockroachdb.com/cockroach-v${version}.src.tgz"; - sha256 = "0x8hf5qwvgb2w6dcnvy20v77nf19f0l1pb40jf31rm72xhk3bwvy"; + sha256 = "1z34zlwznh4lgbc1ryn577w7mmycyjbmz28k1hhhb6ricmk1x847"; }; - buildInputs = [ (if stdenv.isDarwin then libedit else ncurses6) ]; - nativeBuildInputs = [ cmake xz which autoconf ]; + inherit nativeBuildInputs buildInputs; buildPhase = '' runHook preBuild @@ -21,24 +31,34 @@ buildGoPackage rec { make buildoss cd src/${goPackagePath} for asset in man autocomplete; do - ./cockroach gen $asset + ./cockroachoss gen $asset done runHook postBuild ''; installPhase = '' runHook preInstall - install -D cockroach $bin/bin/cockroach + + install -D cockroachoss $bin/bin/cockroach install -D cockroach.bash $bin/share/bash-completion/completions/cockroach.bash - cp -r man $bin/share/man + + mkdir -p $man/share/man + cp -r man $man/share/man + runHook postInstall ''; + # Unfortunately we have to keep an empty reference to $out, because it seems + # buildGoPackages only nukes references to the go compiler under $bin, effectively + # making all binary output under $bin mandatory. Ideally, we would just use + # $out and $man and remove $bin since there's no point in an empty path. :( + outputs = [ "bin" "man" "out" ]; + meta = with stdenv.lib; { - homepage = https://www.cockroachlabs.com; + homepage = https://www.cockroachlabs.com; description = "A scalable, survivable, strongly-consistent SQL database"; - license = licenses.asl20; - platforms = [ "x86_64-linux" "x86_64-darwin" ]; - maintainers = [ maintainers.rushmorem ]; + license = licenses.asl20; + platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; + maintainers = with maintainers; [ rushmorem thoughtpolice ]; }; } From 70f5d64cb359a8e4351a32f24d68b8a8e0227b76 Mon Sep 17 00:00:00 2001 From: Renaud Date: Thu, 29 Nov 2018 23:48:08 +0100 Subject: [PATCH 71/87] brave: version is just 0.56.15 --- pkgs/applications/networking/browsers/brave/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/brave/default.nix b/pkgs/applications/networking/browsers/brave/default.nix index ed524b331dd..f167980f0bf 100644 --- a/pkgs/applications/networking/browsers/brave/default.nix +++ b/pkgs/applications/networking/browsers/brave/default.nix @@ -74,7 +74,6 @@ let rpath = lib.makeLibraryPath [ in stdenv.mkDerivation rec { pname = "brave"; - version = "0.56.12"; version = "0.56.15"; src = fetchurl { From b5504e26b0558382115e4b241cdcad3349ae22b0 Mon Sep 17 00:00:00 2001 From: Vaibhav Sagar Date: Thu, 29 Nov 2018 16:45:57 -0500 Subject: [PATCH 72/87] pkgs/stdenv/generic/make-derivation.nix: s/targetPlatform/hostPlatform/ --- pkgs/stdenv/generic/make-derivation.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 6c0c94487de..67c7c5eae53 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -93,7 +93,7 @@ rec { ++ depsTargetTarget ++ depsTargetTargetPropagated) == 0; runtimeSensativeIfFixedOutput = fixedOutputDrv -> !noNonNativeDeps; supportedHardeningFlags = [ "fortify" "stackprotector" "pie" "pic" "strictoverflow" "format" "relro" "bindnow" ]; - defaultHardeningFlags = if stdenv.targetPlatform.isMusl + defaultHardeningFlags = if stdenv.hostPlatform.isMusl then supportedHardeningFlags else lib.remove "pie" supportedHardeningFlags; enabledHardeningOptions = From 3f90f52b07518f1b068a254424aae479df63eae5 Mon Sep 17 00:00:00 2001 From: Free Potion <42352817+freepotion@users.noreply.github.com> Date: Fri, 30 Nov 2018 02:01:05 +0300 Subject: [PATCH 73/87] boohu: 0.11 -> 0.11.1 (#51248) --- pkgs/games/boohu/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/games/boohu/default.nix b/pkgs/games/boohu/default.nix index ccfdf8d905c..2504e6935ab 100644 --- a/pkgs/games/boohu/default.nix +++ b/pkgs/games/boohu/default.nix @@ -3,13 +3,13 @@ buildGoPackage rec { name = "boohu-${version}"; - version = "0.11.0"; + version = "0.11.1"; goPackagePath = "git.tuxfamily.org/boohu/boohu.git"; src = fetchurl { url = "https://download.tuxfamily.org/boohu/downloads/boohu-${version}.tar.gz"; - sha256 = "1qc3mz1mj6byyslmx1afprg1l7x8rcy7i004sy32g590jaahwqdr"; + sha256 = "0m0ajxiyx8qwxj2zq33s5qpjr65cr33f7dpirg6b4w4y9gyhhv1g"; }; buildFlags = "--tags ansi"; From 80756cdb79d68ddf16425767918c79548daa61f8 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 30 Nov 2018 01:37:31 +0100 Subject: [PATCH 74/87] wlroots: 0.1 -> 0.2 --- pkgs/development/libraries/wlroots/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/wlroots/default.nix b/pkgs/development/libraries/wlroots/default.nix index 4aff6063183..9791f04fd87 100644 --- a/pkgs/development/libraries/wlroots/default.nix +++ b/pkgs/development/libraries/wlroots/default.nix @@ -7,7 +7,7 @@ let pname = "wlroots"; - version = "0.1"; + version = "0.2"; meson480 = meson.overrideAttrs (oldAttrs: rec { name = pname + "-" + version; pname = "meson"; @@ -28,13 +28,13 @@ in stdenv.mkDerivation rec { owner = "swaywm"; repo = "wlroots"; rev = version; - sha256 = "0xfipgg2qh2xcf3a1pzx8pyh1aqpb9rijdyi0as4s6fhgy4w269c"; + sha256 = "0gfxawjlb736xl90zfv3n6zzf5n1cacgzflqi1zq1wn7wd3j6ppv"; }; - patches = [ (fetchpatch { # TODO: Only required for version 0.1 - url = https://github.com/swaywm/wlroots/commit/be6210cf8216c08a91e085dac0ec11d0e34fb217.patch; - sha256 = "0njv7mr4ark603w79cxcsln29galh87vpzsx2dzkrl1x5x4i6cj5"; - }) ]; + postPatch = '' + substituteInPlace meson.build \ + --replace "version: '0.1.0'" "version: '${version}.0'" + ''; # $out for the library, $bin for rootston, and $examples for the example # programs (in examples) AND rootston From 9ac03eb8118d4fe76cdced800eec20e81cbde13a Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 30 Nov 2018 01:50:41 +0100 Subject: [PATCH 75/87] sway-beta: 1.0-beta.1 -> 1.0-beta.2 --- pkgs/applications/window-managers/sway/beta.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/window-managers/sway/beta.nix b/pkgs/applications/window-managers/sway/beta.nix index 5aebb7ed8dd..fd3e2275b44 100644 --- a/pkgs/applications/window-managers/sway/beta.nix +++ b/pkgs/applications/window-managers/sway/beta.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { name = "${pname}-${version}"; pname = "sway"; - version = "1.0-beta.1"; + version = "1.0-beta.2"; src = fetchFromGitHub { owner = "swaywm"; repo = "sway"; rev = version; - sha256 = "0h9kgrg9mh2acks63z72bw3lwff32pf2nb4i7i5xhd9i6l4gfnqa"; + sha256 = "0f9rniwizbc3vzxdy6rc47749p6gczfbgfdy4r458134rbl551hw"; }; nativeBuildInputs = [ From ce6d558c4deebf373eae8723cfb7c181be2be9be Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 13 Nov 2018 23:03:31 -0600 Subject: [PATCH 76/87] systems/examples.nix: move riscv function to let binding Makes it easier to use mapAttrs with lib.systems.examples. Now every entry in it are legitimate systems. --- lib/systems/examples.nix | 13 ++++++++----- pkgs/top-level/release-lib.nix | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index a40c3892424..d713989fe1f 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -2,7 +2,14 @@ # `crossSystem`. They are put here for user convenience, but also used by cross # tests and linux cross stdenv building, so handle with care! { lib }: -let platforms = import ./platforms.nix { inherit lib; }; in +let + platforms = import ./platforms.nix { inherit lib; }; + + riscv = bits: { + config = "riscv${bits}-unknown-linux-gnu"; + platform = platforms.riscv-multiplatform bits; + }; +in rec { # @@ -92,10 +99,6 @@ rec { musl64 = { config = "x86_64-unknown-linux-musl"; }; musl32 = { config = "i686-unknown-linux-musl"; }; - riscv = bits: { - config = "riscv${bits}-unknown-linux-gnu"; - platform = platforms.riscv-multiplatform bits; - }; riscv64 = riscv "64"; riscv32 = riscv "32"; diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index 957de2dcc30..7e7cac95b9c 100644 --- a/pkgs/top-level/release-lib.nix +++ b/pkgs/top-level/release-lib.nix @@ -54,7 +54,7 @@ rec { # More poor man's memoisation pkgsForCross = let examplesByConfig = lib.flip lib.mapAttrs' - (builtins.removeAttrs lib.systems.examples [ "riscv" ]) + lib.systems.examples (_: crossSystem: nameValuePair crossSystem.config { inherit crossSystem; pkgsFor = mkPkgsFor crossSystem; From 9c8fd412248ad907eee7547b19bf3f7583d2c411 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 13 Nov 2018 16:54:08 -0600 Subject: [PATCH 77/87] treewide: add emulator to platform MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit You can use stdenv.hostPlatform.emulator to get an executable that runs cross-built binaries. This could be any emulator. For instance, we use QEMU to emulate Linux targets and Wine to emulate Windows targets. To work with qemu, we need to support custom targets. I’ve reworked the cross tests in pkgs/test/cross to use this functionality. Also, I’ve used talloc to cross-execute with the emulator. There appears to be a cross-execute for all waf builds. In the future, it would be nice to set this for all waf builds. Adds stdenv.hostPlatform.qemuArch attrbute to get the qemuArch for each platform. --- lib/systems/default.nix | 40 ++++++++++++ .../virtualization/qemu/default.nix | 24 +++---- pkgs/development/libraries/talloc/default.nix | 14 ++-- pkgs/test/cross/default.nix | 64 +++++++++++-------- pkgs/top-level/all-packages.nix | 2 +- 5 files changed, 99 insertions(+), 45 deletions(-) diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 0b3475fefb9..25df5e17406 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -66,6 +66,46 @@ rec { # uname -r release = null; }; + + qemuArch = + if final.isArm then "arm" + else if final.isx86_64 then "x86_64" + else if final.isx86 then "i386" + else { + "powerpc" = "ppc"; + "powerpc64" = "ppc64"; + "powerpc64le" = "ppc64"; + "mips64" = "mips"; + "mipsel64" = "mipsel"; + }.${final.parsed.cpu.name} or final.parsed.cpu.name; + + emulator = pkgs: let + qemu-user = pkgs.qemu.override { + smartcardSupport = false; + spiceSupport = false; + openGLSupport = false; + virglSupport = false; + vncSupport = false; + gtkSupport = false; + sdlSupport = false; + pulseSupport = false; + smbdSupport = false; + seccompSupport = false; + hostCpuTargets = ["${final.qemuArch}-linux-user"]; + }; + wine-name = "wine${toString final.parsed.cpu.bits}"; + wine = (pkgs.winePackagesFor wine-name).minimal; + in + if final.parsed.kernel.name == pkgs.stdenv.hostPlatform.parsed.kernel.name && + (final.parsed.cpu.name == pkgs.stdenv.hostPlatform.parsed.cpu.name || + (final.platform.isi686 && pkgs.stdenv.hostPlatform.isx86_64)) + then pkgs.runtimeShell + else if final.isWindows + then "${wine}/bin/${wine-name}" + else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux + then "${qemu-user}/bin/qemu-${final.qemuArch}" + else throw "Don't know how to run ${final.config} executables."; + } // mapAttrs (n: v: v final.parsed) inspect.predicates // args; in assert final.useAndroidPrebuilt -> final.isAndroid; diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index d9495bd984e..ea330d59555 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -18,6 +18,10 @@ , virglSupport ? openGLSupport, virglrenderer , smbdSupport ? false, samba , hostCpuOnly ? false +, hostCpuTargets ? (if hostCpuOnly + then (stdenv.lib.optional stdenv.isx86_64 "i386-softmmu" + ++ ["${stdenv.hostPlatform.qemuArch}-softmmu"]) + else null) , nixosTestRunner ? false }: @@ -27,11 +31,6 @@ let + optionalString pulseSupport "pa," + optionalString sdlSupport "sdl,"; - hostCpuTargets = if stdenv.isx86_64 then "i386-softmmu,x86_64-softmmu" - else if stdenv.isi686 then "i386-softmmu" - else if stdenv.isAarch32 then "arm-softmmu" - else if stdenv.isAarch64 then "aarch64-softmmu" - else throw "Don't know how to build a 'hostCpuOnly = true' QEMU"; in stdenv.mkDerivation rec { @@ -113,7 +112,7 @@ stdenv.mkDerivation rec { ++ optional smartcardSupport "--enable-smartcard" ++ optional spiceSupport "--enable-spice" ++ optional usbredirSupport "--enable-usb-redir" - ++ optional hostCpuOnly "--target-list=${hostCpuTargets}" + ++ optional (hostCpuTargets != null) "--target-list=${stdenv.lib.concatStringsSep "," hostCpuTargets}" ++ optional stdenv.isDarwin "--enable-cocoa" ++ optional stdenv.isLinux "--enable-linux-aio" ++ optional gtkSupport "--enable-gtk" @@ -135,12 +134,13 @@ stdenv.mkDerivation rec { ''; # Add a ‘qemu-kvm’ wrapper for compatibility/convenience. - postInstall = - if stdenv.isx86_64 then ''makeWrapper $out/bin/qemu-system-x86_64 $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"'' - else if stdenv.isi686 then ''makeWrapper $out/bin/qemu-system-i386 $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"'' - else if stdenv.isAarch32 then ''makeWrapper $out/bin/qemu-system-arm $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"'' - else if stdenv.isAarch64 then ''makeWrapper $out/bin/qemu-system-aarch64 $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"'' - else ""; + postInstall = '' + if [ -x $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} ]; then + makeWrapper $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} \ + $out/bin/qemu-kvm \ + --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)" + fi + ''; passthru = { qemu-system-i386 = "bin/qemu-system-i386"; diff --git a/pkgs/development/libraries/talloc/default.nix b/pkgs/development/libraries/talloc/default.nix index 7c758d29835..74558760935 100644 --- a/pkgs/development/libraries/talloc/default.nix +++ b/pkgs/development/libraries/talloc/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, python, pkgconfig, readline, libxslt , docbook_xsl, docbook_xml_dtd_42, fixDarwinDylibNames +, buildPackages }: stdenv.mkDerivation rec { @@ -10,10 +11,9 @@ stdenv.mkDerivation rec { sha256 = "1kk76dyav41ip7ddbbf04yfydb4jvywzi2ps0z2vla56aqkn11di"; }; - nativeBuildInputs = [ pkgconfig fixDarwinDylibNames ]; - buildInputs = [ - python readline libxslt docbook_xsl docbook_xml_dtd_42 - ]; + nativeBuildInputs = [ pkgconfig fixDarwinDylibNames python + docbook_xsl docbook_xml_dtd_42 ]; + buildInputs = [ readline libxslt ]; prePatch = '' patchShebangs buildtools/bin/waf @@ -23,10 +23,14 @@ stdenv.mkDerivation rec { "--enable-talloc-compat1" "--bundled-libraries=NONE" "--builtin-libraries=replace" + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "--cross-compile" + "--cross-execute=${stdenv.hostPlatform.emulator buildPackages}" ]; + configurePlatforms = []; postInstall = '' - ar q $out/lib/libtalloc.a bin/default/talloc_[0-9]*.o + ${stdenv.cc.targetPrefix}ar q $out/lib/libtalloc.a bin/default/talloc_[0-9]*.o ''; meta = with stdenv.lib; { diff --git a/pkgs/test/cross/default.nix b/pkgs/test/cross/default.nix index 6f41447ca76..622799106cd 100644 --- a/pkgs/test/cross/default.nix +++ b/pkgs/test/cross/default.nix @@ -1,12 +1,11 @@ -{ pkgs, pkgsCross, lib }: +{ pkgs, lib }: let - emulators = { - mingw32 = "WINEDEBUG=-all ${pkgs.winePackages.minimal}/bin/wine"; - mingwW64 = "WINEDEBUG=-all ${pkgs.wineWowPackages.minimal}/bin/wine"; - # TODO: add some qemu-based emulaltors here - }; + testedSystems = lib.filterAttrs (name: value: let + platform = lib.systems.elaborate value; + in platform.isLinux || platform.isWindows + ) lib.systems.examples; getExecutable = pkgs: pkgFun: exec: "${pkgFun pkgs}${exec}${pkgs.hostPlatform.extensions.executable}"; @@ -17,6 +16,10 @@ let in pkgs.runCommand "test-${pkgName}-${crossPkgs.hostPlatform.config}" { nativeBuildInputs = [ pkgs.dos2unix ]; } '' + # Just in case we are using wine, get rid of that annoying extra + # stuff. + export WINEDEBUG=-all + HOME=$(pwd) mkdir -p $out @@ -44,29 +47,29 @@ let fi ''; + mapMultiPlatformTest = test: lib.mapAttrs (name: system: test rec { + crossPkgs = import pkgs.path { + localSystem = { inherit (pkgs.hostPlatform) config; }; + crossSystem = system; + }; + + emulator = crossPkgs.hostPlatform.emulator pkgs; + + # Apply some transformation on windows to get dlls in the right + # place. Unfortunately mingw doesn’t seem to be able to do linking + # properly. + platformFun = pkg: if crossPkgs.hostPlatform.isWindows then + pkgs.buildEnv { + name = "${pkg.name}-winlinks"; + paths = [pkg] ++ pkg.buildInputs; + } else pkg; + }) testedSystems; + in -lib.mapAttrs (name: emulator: let - crossPkgs = pkgsCross.${name}; +lib.mapAttrs (_: mapMultiPlatformTest) { - # Apply some transformation on windows to get dlls in the right - # place. Unfortunately mingw doesn’t seem to be able to do linking - # properly. - platformFun = pkg: if crossPkgs.hostPlatform.isWindows then - pkgs.buildEnv { - name = "${pkg.name}-winlinks"; - paths = [pkg] ++ pkg.buildInputs; - } else pkg; -in { - - hello = compareTest { - inherit emulator crossPkgs; - hostPkgs = pkgs; - exec = "/bin/hello"; - pkgFun = pkgs: pkgs.hello; - }; - - file = compareTest { + file = {platformFun, crossPkgs, emulator}: compareTest { inherit emulator crossPkgs; hostPkgs = pkgs; exec = "/bin/file"; @@ -77,4 +80,11 @@ in { pkgFun = pkgs: platformFun pkgs.file; }; -}) emulators + hello = {platformFun, crossPkgs, emulator}: compareTest { + inherit emulator crossPkgs; + hostPkgs = pkgs; + exec = "/bin/hello"; + pkgFun = pkgs: pkgs.hello; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cea917e174b..a9db0b49901 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12465,7 +12465,7 @@ with pkgs; taglib-sharp = callPackage ../development/libraries/taglib-sharp { }; talloc = callPackage ../development/libraries/talloc { - python = python2; + python = buildPackages.python2; }; tclap = callPackage ../development/libraries/tclap {}; From 3f806a0ae7f00fc0bb629a8d2d45ffe306db95d7 Mon Sep 17 00:00:00 2001 From: Uri Baghin Date: Fri, 30 Nov 2018 05:12:24 +1100 Subject: [PATCH 78/87] perceptualdiff: init at 2.1 --- .../tools/graphics/perceptualdiff/default.nix | 25 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/tools/graphics/perceptualdiff/default.nix diff --git a/pkgs/tools/graphics/perceptualdiff/default.nix b/pkgs/tools/graphics/perceptualdiff/default.nix new file mode 100644 index 00000000000..d394a816a49 --- /dev/null +++ b/pkgs/tools/graphics/perceptualdiff/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchFromGitHub, cmake, freeimage }: + +stdenv.mkDerivation rec { + pname = "perceptualdiff"; + name = "${pname}-${version}"; + version = "2.1"; + + src = fetchFromGitHub { + owner = "myint"; + repo = pname; + rev = "v${version}"; + sha256 = "176n518xv0pczf1yyz9r5a8zw5r6sh5ym596kmvw30qznp8n4a8j"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ freeimage ]; + + meta = with stdenv.lib; { + description = "A program that compares two images using a perceptually based image metric"; + homepage = "https://github.com/myint/perceptualdiff"; + license = licenses.gpl2; + maintainers = with maintainers; [ uri-canva ]; + platforms = platforms.x86; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5a1b72ff1b3..29c4e7cabe6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4662,6 +4662,8 @@ with pkgs; pepper = callPackage ../tools/admin/salt/pepper { }; + perceptualdiff = callPackage ../tools/graphics/perceptualdiff { }; + percona-xtrabackup = callPackage ../tools/backup/percona-xtrabackup { boost = boost159; }; From cf1fb28991f2bf2b47b650d1a233049d3aeca1eb Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Fri, 30 Nov 2018 03:17:56 -0500 Subject: [PATCH 79/87] python3Packages.datrie: fix build (#51250) --- pkgs/development/python-modules/datrie/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/datrie/default.nix b/pkgs/development/python-modules/datrie/default.nix index f9ac491dc81..eb654c65077 100644 --- a/pkgs/development/python-modules/datrie/default.nix +++ b/pkgs/development/python-modules/datrie/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, fetchPypi -, pytest, pytestrunner, hypothesis}: +, cython, pytest, pytestrunner, hypothesis }: buildPythonPackage rec { pname = "datrie"; @@ -10,8 +10,15 @@ buildPythonPackage rec { sha256 = "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"; }; + nativeBuildInputs = [ cython ]; buildInputs = [ pytest pytestrunner hypothesis ]; + # recompile pxd and pyx for python37 + # https://github.com/pytries/datrie/issues/52 + preBuild = '' + ./update_c.sh + ''; + meta = with stdenv.lib; { description = "Super-fast, efficiently stored Trie for Python"; homepage = "https://github.com/kmike/datrie"; From 3b8d6ef2936f43a55a04080ac5354772f238879a Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 30 Nov 2018 13:35:25 +0100 Subject: [PATCH 80/87] roundcube: 1.3.7 -> 1.3.8 This is a service release to update the stable version 1.3 of Roundcube Webmail. It contains fixes to several bugs backported from the master branch including a security fix for a reported XSS vulnerability plus updates to ensure compatibility with PHP 7.3 and recent versions of Courier-IMAP, Dovecot and MySQL 8. See the complete changelog at https://github.com/roundcube/roundcubemail/releases/tag/1.3.8 --- pkgs/servers/roundcube/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/roundcube/default.nix b/pkgs/servers/roundcube/default.nix index 40afd7043e4..c0648f5183d 100644 --- a/pkgs/servers/roundcube/default.nix +++ b/pkgs/servers/roundcube/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchzip }: let - version = "1.3.7"; + version = "1.3.8"; in fetchzip rec { name= "roundcube-${version}"; - url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/roundcubemail-${version}-complete.tar.gz"; - sha256 = "0xwqy0adynx7066a0cvz9vyg85waax1i4p70kcdkz7q5jnw4jzhf"; - + url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/roundcubemail-${version}-complete.tar.gz"; + sha256 = "1lhwr13bglm8rqgamnb480b07wpqhw9bskjj2xxb0x8kdjly29ks"; + extraPostFetch = '' ln -sf /etc/roundcube/config.inc.php $out/config/config.inc.php rm -rf $out/installer From 99d623850f56975f026a56b96be0f79db1ba00f7 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 30 Nov 2018 14:23:33 +0100 Subject: [PATCH 81/87] wlroots: Fix the build on master I was testing the build on nixos-unstable but 64d50a00991983e90d6a22f39d03b028602e34d6 added another patch. Since this patch is already in 0.48.0 it can't be applied again (overriding Meson isn't optimal but we can't build wlroots with 0.46.1). I've also dropped the "-Dxcb-xkb=enabled" flag since it was removed (replaced with Xinput). Thanks @kenogo for noticing this :) --- pkgs/development/libraries/wlroots/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/wlroots/default.nix b/pkgs/development/libraries/wlroots/default.nix index 9791f04fd87..efe7214ab6a 100644 --- a/pkgs/development/libraries/wlroots/default.nix +++ b/pkgs/development/libraries/wlroots/default.nix @@ -17,8 +17,11 @@ let inherit pname version; sha256 = "0qawsm6px1vca3babnqwn0hmkzsxy4w0gi345apd2qk3v0cv7ipc"; }; - patches = builtins.filter # Remove gir-fallback-path.patch - (str: !(stdenv.lib.hasSuffix "gir-fallback-path.patch" str)) + # Remove gir-fallback-path.patch and + # a87496addd9160300837aa50193f4798c6f1d251.patch (already in 0.48.0): + patches = builtins.filter + (str: !(stdenv.lib.hasSuffix "gir-fallback-path.patch" str + || stdenv.lib.hasSuffix "a87496addd9160300837aa50193f4798c6f1d251.patch" str)) oldAttrs.patches; }); in stdenv.mkDerivation rec { @@ -50,7 +53,7 @@ in stdenv.mkDerivation rec { mesonFlags = [ "-Dlibcap=enabled" "-Dlogind=enabled" "-Dxwayland=enabled" "-Dx11-backend=enabled" - "-Dxcb-icccm=enabled" "-Dxcb-xkb=enabled" "-Dxcb-errors=enabled" + "-Dxcb-icccm=enabled" "-Dxcb-errors=enabled" ]; postInstall = '' From 66efb76c75c829d0ca0ee322a68c35eaabbff59d Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 27 Nov 2018 15:30:55 +0000 Subject: [PATCH 82/87] ocamlPackages.buildDunePackage: fix meta.platforms --- pkgs/build-support/ocaml/dune.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/ocaml/dune.nix b/pkgs/build-support/ocaml/dune.nix index 7386b07f575..4d6ed76aca0 100644 --- a/pkgs/build-support/ocaml/dune.nix +++ b/pkgs/build-support/ocaml/dune.nix @@ -25,12 +25,12 @@ stdenv.mkDerivation ({ runHook postInstall ''; - meta.platform = ocaml.meta.platform; - } // args // { name = "ocaml${ocaml.version}-${pname}-${version}"; buildInputs = [ ocaml dune findlib ] ++ buildInputs; + meta = (args.meta or {}) // { platforms = args.meta.platforms or ocaml.meta.platforms; }; + }) From 74e283403c9f10504c1d2ab8c4970289c81a482b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 30 Nov 2018 17:37:50 +0100 Subject: [PATCH 83/87] nixos/borgbackup: allow paths to be empty or relative (#51275) This former necessary in order to exclusively use `--pattern` or `--patterns-from`. Fixes #51267. --- nixos/modules/services/backup/borgbackup.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/backup/borgbackup.nix b/nixos/modules/services/backup/borgbackup.nix index 415a70ea5ad..bf41aee8fe0 100644 --- a/nixos/modules/services/backup/borgbackup.nix +++ b/nixos/modules/services/backup/borgbackup.nix @@ -191,7 +191,7 @@ in { options = { paths = mkOption { - type = with types; either path (nonEmptyListOf path); + type = with types; either path (listOf str); description = "Path(s) to back up."; example = "/home/user"; apply = x: if isList x then x else [ x ]; From 28e2277305f8c6eeee3f6f773927b956eb903a15 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 28 Nov 2018 12:26:21 -0600 Subject: [PATCH 84/87] make-derivation: remove selfConsistent check version is set in lots of places but might not need to be in a name. Alternative to #50364. --- pkgs/stdenv/generic/make-derivation.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index ec51b5415c1..5f6f608aa7a 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -81,13 +81,6 @@ rec { , ... } @ attrs: let - # Check that the name is consistent with pname and version: - selfConsistent = (with attrs; attrs ? "name" -> - (lib.assertMsg (attrs ? "version" -> lib.strings.hasInfix version name) - "version ${version} does not appear in name ${name}" && - lib.assertMsg (attrs ? "pname" -> lib.strings.hasInfix pname name) - "pname ${pname} does not appear in name ${name}")); - computedName = if name != "" then name else "${attrs.pname}-${attrs.version}"; # TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when @@ -188,7 +181,7 @@ rec { // { # A hack to make `nix-env -qa` and `nix search` ignore broken packages. # TODO(@oxij): remove this assert when something like NixOS/nix#1771 gets merged into nix. - name = assert selfConsistent && validity.handled && (separateDebugInfo -> stdenv.hostPlatform.isLinux); computedName + lib.optionalString + name = assert validity.handled && (separateDebugInfo -> stdenv.hostPlatform.isLinux); computedName + lib.optionalString # Fixed-output derivations like source tarballs shouldn't get a host # suffix. But we have some weird ones with run-time deps that are # just used for their side-affects. Those might as well since the From a47479ec7ee8c787543bb1d18cf8d724a01a4328 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Thu, 29 Nov 2018 19:45:31 -0500 Subject: [PATCH 85/87] reptyr: enable on 32-bit ARM Linux and x86 FreeBSD --- pkgs/os-specific/linux/reptyr/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/reptyr/default.nix b/pkgs/os-specific/linux/reptyr/default.nix index d8880542e51..03aceb2b7a8 100644 --- a/pkgs/os-specific/linux/reptyr/default.nix +++ b/pkgs/os-specific/linux/reptyr/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv, lib, fetchFromGitHub }: stdenv.mkDerivation rec { version = "0.6.2"; @@ -20,9 +20,14 @@ stdenv.mkDerivation rec { makeFlags = ["PREFIX=$(out)"]; meta = { - platforms = [ "i686-linux" "x86_64-linux" ]; - maintainers = with stdenv.lib.maintainers; [raskin]; - license = stdenv.lib.licenses.mit; - description = ''A Linux tool to change controlling pty of a process''; + platforms = [ + "i686-linux" + "x86_64-linux" + "i686-freebsd" + "x86_64-freebsd" + ] ++ lib.platforms.arm; + maintainers = with lib.maintainers; [raskin]; + license = lib.licenses.mit; + description = "Reparent a running program to a new terminal"; }; } From 99a720d2bb5fce2a2310f588aaab56eb9b87b8e2 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Fri, 30 Nov 2018 11:44:05 -0500 Subject: [PATCH 86/87] reptyr: add homepage --- pkgs/os-specific/linux/reptyr/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/reptyr/default.nix b/pkgs/os-specific/linux/reptyr/default.nix index 03aceb2b7a8..37f1362e14e 100644 --- a/pkgs/os-specific/linux/reptyr/default.nix +++ b/pkgs/os-specific/linux/reptyr/default.nix @@ -29,5 +29,6 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [raskin]; license = lib.licenses.mit; description = "Reparent a running program to a new terminal"; + homepage = https://github.com/nelhage/reptyr; }; } From a8f1e430f2c456f7eec38d8648db4e427458c4b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Fri, 30 Nov 2018 15:42:11 -0200 Subject: [PATCH 87/87] nordic: fix sha256 hash --- pkgs/misc/themes/nordic/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/misc/themes/nordic/default.nix b/pkgs/misc/themes/nordic/default.nix index c375e21e3ae..ac24e35c66f 100644 --- a/pkgs/misc/themes/nordic/default.nix +++ b/pkgs/misc/themes/nordic/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { }) (fetchurl { url = "https://github.com/EliverLara/Nordic/releases/download/v${version}/Nordic-standard-buttons.tar.xz"; - sha256 = "0xnj1am1q26xppp8y07iik648hhgn3gmzqvkdhg3il4qnkndjvld"; + sha256 = "1h0690cijaipidb5if2bxhvvkrx5src3akyxvfywxg4bf8x7jxs5"; }) ];