From 760e23136acfc192fd9a51b6b3c63fbc0a0c999d Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sun, 10 Nov 2019 00:52:53 +0100 Subject: [PATCH] treewide: *inputs are lists --- pkgs/applications/audio/clementine/default.nix | 2 +- pkgs/applications/audio/cmus/default.nix | 2 +- .../editors/emacs-modes/libgenerated.nix | 2 +- pkgs/applications/editors/yi/wrapper.nix | 2 +- pkgs/applications/misc/gollum/default.nix | 14 +++++++------- .../instant-messengers/mikutter/default.nix | 16 ++++++++-------- .../deepin/deepin-icon-theme/default.nix | 2 +- pkgs/development/compilers/elm/makeDotElm.nix | 3 --- pkgs/development/compilers/ghc/8.8.1.nix | 2 +- pkgs/development/interpreters/php/default.nix | 14 +++++++------- pkgs/development/libraries/java/swt/default.nix | 4 ++-- .../mobile/androidenv/build-tools.nix | 2 +- .../mobile/androidenv/platform-tools.nix | 2 +- .../python-modules/buildbot/default.nix | 5 ++--- pkgs/development/python-modules/treq/default.nix | 4 ++-- pkgs/os-specific/linux/brillo/default.nix | 2 +- pkgs/servers/http/apache-httpd/2.4.nix | 5 +---- pkgs/tools/admin/fastlane/default.nix | 14 +++++++------- 18 files changed, 45 insertions(+), 52 deletions(-) diff --git a/pkgs/applications/audio/clementine/default.nix b/pkgs/applications/audio/clementine/default.nix index 0a374c26142a..3fdf98da325c 100644 --- a/pkgs/applications/audio/clementine/default.nix +++ b/pkgs/applications/audio/clementine/default.nix @@ -77,7 +77,7 @@ let inherit src patches nativeBuildInputs postPatch; # gst_plugins needed for setup-hooks - buildInputs = buildInputs ++ [ makeWrapper gst_plugins ]; + buildInputs = buildInputs ++ [ makeWrapper ] ++ gst_plugins; cmakeFlags = [ "-DUSE_SYSTEM_PROJECTM=ON" ]; diff --git a/pkgs/applications/audio/cmus/default.nix b/pkgs/applications/audio/cmus/default.nix index b88951c0fc5b..023e35bd7870 100644 --- a/pkgs/applications/audio/cmus/default.nix +++ b/pkgs/applications/audio/cmus/default.nix @@ -122,7 +122,7 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses ] ++ stdenv.lib.optional stdenv.cc.isClang clangGCC ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv CoreAudio ] - ++ concatMap (a: a.deps) opts; + ++ flatten (concatMap (a: a.deps) opts); makeFlags = [ "LD=$(CC)" ]; diff --git a/pkgs/applications/editors/emacs-modes/libgenerated.nix b/pkgs/applications/editors/emacs-modes/libgenerated.nix index 0529fce2b16d..57bccc608183 100644 --- a/pkgs/applications/editors/emacs-modes/libgenerated.nix +++ b/pkgs/applications/editors/emacs-modes/libgenerated.nix @@ -77,7 +77,7 @@ in { url = "https://raw.githubusercontent.com/melpa/melpa/${commit}/recipes/${ename}"; inherit sha256; }; - packageRequires = lib.optional (! isNull deps) + packageRequires = lib.optionals (! isNull deps) (map (dep: pkgargs.${dep} or self.${dep} or null) deps); meta = (sourceArgs.meta or {}) // { diff --git a/pkgs/applications/editors/yi/wrapper.nix b/pkgs/applications/editors/yi/wrapper.nix index 0f3cd7d136a7..243690bc2632 100644 --- a/pkgs/applications/editors/yi/wrapper.nix +++ b/pkgs/applications/editors/yi/wrapper.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation { ''; # For hacking purposes - env = yiEnv; + passthru.env = yiEnv; meta = with stdenv.lib; { description = "Allows Yi to find libraries and the compiler easily"; diff --git a/pkgs/applications/misc/gollum/default.nix b/pkgs/applications/misc/gollum/default.nix index e9a177ee1937..251e84f04c36 100644 --- a/pkgs/applications/misc/gollum/default.nix +++ b/pkgs/applications/misc/gollum/default.nix @@ -8,15 +8,15 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; - env = bundlerEnv { - name = "${pname}-${version}-gems"; - inherit pname ruby; - gemdir = ./.; - }; - phases = [ "installPhase" ]; - installPhase = '' + installPhase = let + env = bundlerEnv { + name = "${pname}-${version}-gems"; + inherit pname ruby; + gemdir = ./.; + }; + in '' mkdir -p $out/bin makeWrapper ${env}/bin/gollum $out/bin/gollum \ --prefix PATH ":" ${stdenv.lib.makeBinPath [ git ]} diff --git a/pkgs/applications/networking/instant-messengers/mikutter/default.nix b/pkgs/applications/networking/instant-messengers/mikutter/default.nix index 5778a2dea3b0..7d2037d16a77 100644 --- a/pkgs/applications/networking/instant-messengers/mikutter/default.nix +++ b/pkgs/applications/networking/instant-messengers/mikutter/default.nix @@ -27,13 +27,6 @@ stdenv.mkDerivation rec { sha256 = "0nx14vlp7p69m2vw0s6kbiyymsfq0r2jd4nm0v5c4xb9avkpgc8g"; }; - env = bundlerEnv { - name = "mikutter-${version}-gems"; - gemdir = ./.; - - inherit ruby; - }; - buildInputs = [ alsaUtils libnotify which gtk2 ruby atk gobject-introspection ]; nativeBuildInputs = [ wrapGAppsHook ]; @@ -44,7 +37,14 @@ stdenv.mkDerivation rec { rm -rf vendor ''; - installPhase = '' + installPhase = let + env = bundlerEnv { + name = "mikutter-${version}-gems"; + gemdir = ./.; + + inherit ruby; + }; + in '' install -v -D -m644 README $out/share/doc/mikutter/README install -v -D -m644 LICENSE $out/share/doc/mikutter/LICENSE rm -v README LICENSE diff --git a/pkgs/desktops/deepin/deepin-icon-theme/default.nix b/pkgs/desktops/deepin/deepin-icon-theme/default.nix index f8258a1d8cdc..b6b9feb410b5 100644 --- a/pkgs/desktops/deepin/deepin-icon-theme/default.nix +++ b/pkgs/desktops/deepin/deepin-icon-theme/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { ''; buildTargets = "all hicolor-links"; - installTargets = "install-icons install-cursors"; + installTargets = [ "install-icons" "install-cursors" ]; installFlags = [ "PREFIX=${placeholder "out"}" ]; postInstall = '' diff --git a/pkgs/development/compilers/elm/makeDotElm.nix b/pkgs/development/compilers/elm/makeDotElm.nix index 3ceaae450f01..0831d382c4b2 100644 --- a/pkgs/development/compilers/elm/makeDotElm.nix +++ b/pkgs/development/compilers/elm/makeDotElm.nix @@ -11,13 +11,10 @@ ver: deps: inherit (info) sha256; }; - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' mkdir -p $out cp -r * $out ''; - }; in '' mkdir -p .elm/${ver}/packages/${name} diff --git a/pkgs/development/compilers/ghc/8.8.1.nix b/pkgs/development/compilers/ghc/8.8.1.nix index 6872cea4e2a2..9e95ba0de2bb 100644 --- a/pkgs/development/compilers/ghc/8.8.1.nix +++ b/pkgs/development/compilers/ghc/8.8.1.nix @@ -73,7 +73,7 @@ let ''; # Splicer will pull out correct variations - libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ] + libDeps = platform: stdenv.lib.optional enableTerminfo ncurses ++ [libffi] ++ stdenv.lib.optional (!enableIntegerSimple) gmp ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index 26798d676e04..0fa605a4cac7 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -95,8 +95,8 @@ let ++ optional postgresqlSupport postgresql ++ optional pdo_odbcSupport unixODBC ++ optional pdo_pgsqlSupport postgresql - ++ optional pdo_mysqlSupport mysqlBuildInputs - ++ optional mysqliSupport mysqlBuildInputs + ++ optionals pdo_mysqlSupport mysqlBuildInputs + ++ optionals mysqliSupport mysqlBuildInputs ++ optional gmpSupport gmp ++ optional gettextSupport gettext ++ optional intlSupport icu @@ -109,14 +109,14 @@ let ++ optional libzipSupport libzip ++ optional valgrindSupport valgrind; - CXXFLAGS = optional stdenv.cc.isClang "-std=c++11"; + CXXFLAGS = optionalString stdenv.cc.isClang "-std=c++11"; configureFlags = [ "--with-config-file-scan-dir=/etc/php.d" ] - ++ optional (versionOlder version "7.3") "--with-pcre-regex=${pcre.dev} PCRE_LIBDIR=${pcre}" - ++ optional (versions.majorMinor version == "7.3") "--with-pcre-regex=${pcre2.dev} PCRE_LIBDIR=${pcre2}" - ++ optional (versionAtLeast version "7.4") "--with-external-pcre=${pcre2.dev} PCRE_LIBDIR=${pcre2}" + ++ optionals (versionOlder version "7.3") [ "--with-pcre-regex=${pcre.dev}" "PCRE_LIBDIR=${pcre}" ] + ++ optionals (versions.majorMinor version == "7.3") [ "--with-pcre-regex=${pcre2.dev}" "PCRE_LIBDIR=${pcre2}" ] + ++ optionals (versionAtLeast version "7.4") [ "--with-external-pcre=${pcre2.dev}" "PCRE_LIBDIR=${pcre2}" ] ++ optional stdenv.isDarwin "--with-iconv=${libiconv}" ++ optional withSystemd "--with-fpm-systemd" ++ optionals imapSupport [ @@ -129,7 +129,7 @@ let "LDAP_INCDIR=${openldap.dev}/include" "LDAP_LIBDIR=${openldap.out}/lib" ] - ++ optional (ldapSupport && stdenv.isLinux) "--with-ldap-sasl=${cyrus_sasl.dev}" + ++ optional (ldapSupport && stdenv.isLinux) "--with-ldap-sasl=${cyrus_sasl.dev}" ++ optional apxs2Support "--with-apxs2=${apacheHttpd.dev}/bin/apxs" ++ optional embedSupport "--enable-embed" ++ optional mhashSupport "--with-mhash" diff --git a/pkgs/development/libraries/java/swt/default.nix b/pkgs/development/libraries/java/swt/default.nix index 6eb5a1f53553..b0fdca112186 100644 --- a/pkgs/development/libraries/java/swt/default.nix +++ b/pkgs/development/libraries/java/swt/default.nix @@ -38,8 +38,8 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ unzip pkgconfig ]; buildInputs = [ jdk gtk2 libXt libXtst libXi libGLU libGL webkitgtk libsoup ]; - NIX_LFLAGS = (map (x: "-L${lib.getLib x}/lib") [ xorg.libX11 pango gdk-pixbuf glib ]) ++ - [ "-lX11" "-lpango-1.0" "-lgdk_pixbuf-2.0" "-lglib-2.0" ]; + NIX_LFLAGS = toString (map (x: "-L${lib.getLib x}/lib") [ xorg.libX11 pango gdk-pixbuf glib ]) + + " -lX11 -lpango-1.0 -lgdk_pixbuf-2.0 -lglib-2.0"; buildPhase = '' unzip src.zip -d src diff --git a/pkgs/development/mobile/androidenv/build-tools.nix b/pkgs/development/mobile/androidenv/build-tools.nix index 976ef1416275..9e273468cd3f 100644 --- a/pkgs/development/mobile/androidenv/build-tools.nix +++ b/pkgs/development/mobile/androidenv/build-tools.nix @@ -3,7 +3,7 @@ deployAndroidPackage { inherit package os; buildInputs = [ autoPatchelfHook makeWrapper ] ++ - lib.optional (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgs_i686.glibc pkgs_i686.zlib pkgs_i686.ncurses5 ]; + lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgs_i686.glibc pkgs_i686.zlib pkgs_i686.ncurses5 ]; patchInstructions = '' ${lib.optionalString (os == "linux") '' addAutoPatchelfSearchPath $packageBaseDir/lib diff --git a/pkgs/development/mobile/androidenv/platform-tools.nix b/pkgs/development/mobile/androidenv/platform-tools.nix index 5b4cad1f264f..c39d966959a3 100644 --- a/pkgs/development/mobile/androidenv/platform-tools.nix +++ b/pkgs/development/mobile/androidenv/platform-tools.nix @@ -3,7 +3,7 @@ deployAndroidPackage { inherit package os; buildInputs = [ autoPatchelfHook ] - ++ lib.optional (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 ]; + ++ lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 ]; patchInstructions = lib.optionalString (os == "linux") '' addAutoPatchelfSearchPath $packageBaseDir/lib64 autoPatchelf --no-recurse $packageBaseDir/lib64 diff --git a/pkgs/development/python-modules/buildbot/default.nix b/pkgs/development/python-modules/buildbot/default.nix index 7385a3295518..e627667f3ec2 100644 --- a/pkgs/development/python-modules/buildbot/default.nix +++ b/pkgs/development/python-modules/buildbot/default.nix @@ -44,10 +44,9 @@ let autobahn pyjwt pyyaml - + ] # tls - twisted.extras.tls - ]; + ++ twisted.extras.tls; checkInputs = [ treq diff --git a/pkgs/development/python-modules/treq/default.nix b/pkgs/development/python-modules/treq/default.nix index f49c7a0d2430..1d488eed4e1b 100644 --- a/pkgs/development/python-modules/treq/default.nix +++ b/pkgs/development/python-modules/treq/default.nix @@ -17,9 +17,9 @@ buildPythonPackage rec { incremental service-identity twisted + ] # twisted [tls] requirements (we should find a way to list "extras") - twisted.extras.tls - ]; + ++ twisted.extras.tls; checkInputs = [ pep8 diff --git a/pkgs/os-specific/linux/brillo/default.nix b/pkgs/os-specific/linux/brillo/default.nix index 6d51907ea166..1262260664cd 100644 --- a/pkgs/os-specific/linux/brillo/default.nix +++ b/pkgs/os-specific/linux/brillo/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" "AADIR=$(out)/etc/apparmor.d" ]; - installTargets = "install-dist"; + installTargets = [ "install-dist" ]; meta = with stdenv.lib; { description = "Backlight and Keyboard LED control tool"; diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix index 638617141457..d5da6df8d689 100644 --- a/pkgs/servers/http/apache-httpd/2.4.nix +++ b/pkgs/servers/http/apache-httpd/2.4.nix @@ -44,10 +44,6 @@ stdenv.mkDerivation rec { # Required for ‘pthread_cancel’. NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; - preConfigure = '' - configureFlags="$configureFlags --includedir=$dev/include" - ''; - configureFlags = [ "--with-apr=${apr.dev}" "--with-apr-util=${aprutil.dev}" @@ -60,6 +56,7 @@ stdenv.mkDerivation rec { "--enable-cern-meta" "--enable-imagemap" "--enable-cgi" + "--includedir=${placeholder "dev"}/include" (stdenv.lib.enableFeature proxySupport "proxy") (stdenv.lib.enableFeature sslSupport "ssl") (stdenv.lib.withFeatureAs libxml2Support "libxml2" "${libxml2.dev}/include/libxml2") diff --git a/pkgs/tools/admin/fastlane/default.nix b/pkgs/tools/admin/fastlane/default.nix index afb044ad583a..1cdc969ea2e6 100644 --- a/pkgs/tools/admin/fastlane/default.nix +++ b/pkgs/tools/admin/fastlane/default.nix @@ -6,15 +6,15 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; - env = bundlerEnv { - name = "${pname}-${version}-gems"; - inherit pname ruby; - gemdir = ./.; - }; - phases = [ "installPhase" ]; - installPhase = '' + installPhase = let + env = bundlerEnv { + name = "${pname}-${version}-gems"; + inherit pname ruby; + gemdir = ./.; + }; + in '' mkdir -p $out/bin makeWrapper ${env}/bin/fastlane $out/bin/fastlane \ --set FASTLANE_SKIP_UPDATE_CHECK 1