From abe3475df8fd133045cd01fb14e0d7013cecf66e Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 10 Dec 2019 18:23:57 -0500 Subject: [PATCH] treewide: remove bash snippets in flags Co-Authored-By: Jan Tojnar --- pkgs/applications/audio/lollypop/default.nix | 6 ++--- .../rapid-photo-downloader/default.nix | 18 +++++++------ .../misc/multibootusb/default.nix | 24 +++++++++-------- pkgs/applications/misc/plover/default.nix | 7 ++--- .../networking/browsers/webmacs/default.nix | 26 ++++++++++--------- .../instant-messengers/blink/default.nix | 12 +++++---- .../python-modules/spyder/default.nix | 7 ++--- pkgs/games/anki/default.nix | 11 +++++--- pkgs/games/mnemosyne/default.nix | 11 ++++---- 9 files changed, 68 insertions(+), 54 deletions(-) diff --git a/pkgs/applications/audio/lollypop/default.nix b/pkgs/applications/audio/lollypop/default.nix index b555598591d5..2d2062696d77 100644 --- a/pkgs/applications/audio/lollypop/default.nix +++ b/pkgs/applications/audio/lollypop/default.nix @@ -79,9 +79,9 @@ python3.pkgs.buildPythonApplication rec { # argument dontWrapGApps = true; - makeWrapperArgs = [ - "\${gappsWrapperArgs[@]}" - ]; + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; meta = with lib; { changelog = "https://gitlab.gnome.org/World/lollypop/tags/${version}"; diff --git a/pkgs/applications/graphics/rapid-photo-downloader/default.nix b/pkgs/applications/graphics/rapid-photo-downloader/default.nix index 4279af4cb78b..2e12e18a5a53 100644 --- a/pkgs/applications/graphics/rapid-photo-downloader/default.nix +++ b/pkgs/applications/graphics/rapid-photo-downloader/default.nix @@ -67,14 +67,16 @@ mkDerivationWith python3Packages.buildPythonApplication rec { tenacity ]; - makeWrapperArgs = [ - "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" - "--set PYTHONPATH \"$PYTHONPATH\"" - "--prefix PATH : ${stdenv.lib.makeBinPath [ exiftool vmtouch ]}" - "--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libmediainfo ]}" - "--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : \"$GST_PLUGIN_SYSTEM_PATH_1_0\"" - "\${qtWrapperArgs[@]}" - ]; + preFixup = '' + makeWrapperArgs+=( + --set GI_TYPELIB_PATH "$GI_TYPELIB_PATH" + --set PYTHONPATH "$PYTHONPATH" + --prefix PATH : "${stdenv.lib.makeBinPath [ exiftool vmtouch ]}" + --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ libmediainfo ]}" + --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" + "''${qtWrapperArgs[@]}" + ) + ''; meta = with stdenv.lib; { description = "Photo and video importer for cameras, phones, and memory cards"; diff --git a/pkgs/applications/misc/multibootusb/default.nix b/pkgs/applications/misc/multibootusb/default.nix index 142014832943..ab8802a1b691 100644 --- a/pkgs/applications/misc/multibootusb/default.nix +++ b/pkgs/applications/misc/multibootusb/default.nix @@ -52,17 +52,6 @@ python36Packages.buildPythonApplication rec { python36Packages.six ]; - makeWrapperArgs = [ - # Firstly, add all necessary QT variables - "\${qtWrapperArgs[@]}" - - # Then, add the installed scripts/ directory to the python path - "--prefix" "PYTHONPATH" ":" "$out/lib/${python36Packages.python.libPrefix}/site-packages" - - # Finally, move to directory that contains data - "--run" "\"cd $out/share/${pname}\"" - ]; - postInstall = '' # This script doesn't work and it doesn't add much anyway rm $out/bin/multibootusb-pkexec @@ -72,6 +61,19 @@ python36Packages.buildPythonApplication rec { cp -r data "$out/share/${pname}/data" ''; + preFixup = '' + makeWrapperArgs+=( + # Firstly, add all necessary QT variables + "''${qtWrapperArgs[@]}" + + # Then, add the installed scripts/ directory to the python path + --prefix "PYTHONPATH" ":" "$out/lib/${python36Packages.python.libPrefix}/site-packages" + + # Finally, move to directory that contains data + --run "cd $out/share/${pname}" + ) + ''; + meta = with stdenv.lib; { description = "Multiboot USB creator for Linux live disks"; homepage = http://multibootusb.org/; diff --git a/pkgs/applications/misc/plover/default.nix b/pkgs/applications/misc/plover/default.nix index 77e93eaba7e9..8ecc4f974b45 100644 --- a/pkgs/applications/misc/plover/default.nix +++ b/pkgs/applications/misc/plover/default.nix @@ -47,8 +47,9 @@ propagatedBuildInputs = [ Babel pyqt5 xlib pyserial appdirs wcwidth setuptools ]; dontWrapQtApps = true; - makeWrapperArgs = [ - "\${qtWrapperArgs[@]}" - ]; + + preFixup = '' + makeWrapperArgs+=("''${qtWrapperArgs[@]}") + ''; }; } diff --git a/pkgs/applications/networking/browsers/webmacs/default.nix b/pkgs/applications/networking/browsers/webmacs/default.nix index 0f36177278b9..b86ba3c39f06 100644 --- a/pkgs/applications/networking/browsers/webmacs/default.nix +++ b/pkgs/applications/networking/browsers/webmacs/default.nix @@ -27,18 +27,6 @@ mkDerivationWith python3Packages.buildPythonApplication rec { pygments ]; - dontWrapQtApps = true; - - makeWrapperArgs = [ "\${qtWrapperArgs[@]}" ]; - - # See https://github.com/parkouss/webmacs/blob/1a04fb7bd3f33d39cb4d71621b48c2458712ed39/setup.py#L32 - # Don't know why they're using CC for g++. - preConfigure = '' - export CC=$CXX - ''; - - doCheck = false; # test dependencies not packaged up yet - checkInputs = [ python3Packages.pytest #python3Packages.pytest-xvfb @@ -53,6 +41,20 @@ mkDerivationWith python3Packages.buildPythonApplication rec { # python3Packages.flake8 ]; + # See https://github.com/parkouss/webmacs/blob/1a04fb7bd3f33d39cb4d71621b48c2458712ed39/setup.py#L32 + # Don't know why they're using CC for g++. + preConfigure = '' + export CC=$CXX + ''; + + doCheck = false; # test dependencies not packaged up yet + + dontWrapQtApps = true; + + preFixup = '' + makeWrapperArgs+=("''${qtWrapperArgs[@]}") + ''; + meta = with lib; { description = "Keyboard-based web browser with Emacs/conkeror heritage"; longDescription = '' diff --git a/pkgs/applications/networking/instant-messengers/blink/default.nix b/pkgs/applications/networking/instant-messengers/blink/default.nix index 62d0d738b504..b6e13fe403db 100644 --- a/pkgs/applications/networking/instant-messengers/blink/default.nix +++ b/pkgs/applications/networking/instant-messengers/blink/default.nix @@ -44,11 +44,6 @@ mkDerivationWith pythonPackages.buildPythonApplication rec { dontWrapQtApps = true; - makeWrapperArgs = [ - "\${qtWrapperArgs[@]}" - "--prefix LD_LIBRARY_PATH: ${gnutls.out}/lib" - ]; - postInstall = '' mkdir -p "$out/share/applications" mkdir -p "$out/share/pixmaps" @@ -56,6 +51,13 @@ mkDerivationWith pythonPackages.buildPythonApplication rec { cp "$out"/share/blink/icons/blink.* "$out/share/pixmaps" ''; + preFixup = '' + makeWrapperArgs+=( + --prefix "LD_LIBRARY_PATH" ":" "${gnutls.out}/lib" + "''${qtWrapperArgs[@]}" + ) + ''; + meta = with stdenv.lib; { homepage = http://icanblink.com/; description = "A state of the art, easy to use SIP client for Voice, Video and IM"; diff --git a/pkgs/development/python-modules/spyder/default.nix b/pkgs/development/python-modules/spyder/default.nix index c2dfcab556f0..b707d4a0abc1 100644 --- a/pkgs/development/python-modules/spyder/default.nix +++ b/pkgs/development/python-modules/spyder/default.nix @@ -50,9 +50,10 @@ buildPythonPackage rec { ''; dontWrapQtApps = true; - makeWrapperArgs = [ - "\${qtWrapperArgs[@]}" - ]; + + preFixup = '' + makeWrapperArgs+=("''${qtWrapperArgs[@]}") + ''; meta = with stdenv.lib; { description = "Scientific python development environment"; diff --git a/pkgs/games/anki/default.nix b/pkgs/games/anki/default.nix index c3caf9105d05..c1ba8851f5c4 100644 --- a/pkgs/games/anki/default.nix +++ b/pkgs/games/anki/default.nix @@ -163,10 +163,13 @@ buildPythonApplication rec { ''; dontWrapQtApps = true; - makeWrapperArgs = [ - ''--prefix PATH ':' "${lame}/bin:${mplayer}/bin"'' - "\${qtWrapperArgs[@]}" - ]; + + preFixup = '' + makeWrapperArgs+=( + "''${qtWrapperArgs[@]}" + --prefix PATH ':' "${lame}/bin:${mplayer}/bin" + ) + ''; # now wrapPythonPrograms from postFixup will add both python and qt env variables diff --git a/pkgs/games/mnemosyne/default.nix b/pkgs/games/mnemosyne/default.nix index 675ce1a402fa..779d9a98522c 100644 --- a/pkgs/games/mnemosyne/default.nix +++ b/pkgs/games/mnemosyne/default.nix @@ -33,17 +33,18 @@ python.pkgs.buildPythonApplication rec { # No tests/ directrory in tarball doCheck = false; - dontWrapQtApps = true; - makeWrapperArgs = [ - "\${qtWrapperArgs[@]}" - ]; - postInstall = '' mkdir -p $out/share mv $out/${python.sitePackages}/$out/share/locale $out/share rm -r $out/${python.sitePackages}/nix ''; + dontWrapQtApps = true; + + preFixup = '' + makeWrapperArgs+=("''${qtWrapperArgs[@]}") + ''; + meta = { homepage = https://mnemosyne-proj.org/; description = "Spaced-repetition software";