From 01831dd339c6f76aec740d68280c15b273fb95c2 Mon Sep 17 00:00:00 2001 From: aleksana Date: Fri, 5 Jul 2024 13:10:17 +0800 Subject: [PATCH] soundconverter: format with nixfmt-rfc-style --- .../audio/soundconverter/default.nix | 64 ++++++++++++------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/pkgs/applications/audio/soundconverter/default.nix b/pkgs/applications/audio/soundconverter/default.nix index 27238e36d088..e495ef18391f 100644 --- a/pkgs/applications/audio/soundconverter/default.nix +++ b/pkgs/applications/audio/soundconverter/default.nix @@ -1,9 +1,19 @@ -{ lib, fetchurl -# Optional due to unfree license. -, faacSupport ? false -, glib, python3Packages, gtk3, wrapGAppsHook3 -, gsettings-desktop-schemas, intltool, xvfb-run -, gobject-introspection, gst_all_1, fdk-aac-encoder }: +{ + lib, + fetchurl, + # Optional due to unfree license. + faacSupport ? false, + glib, + python3Packages, + gtk3, + wrapGAppsHook3, + gsettings-desktop-schemas, + intltool, + xvfb-run, + gobject-introspection, + gst_all_1, + fdk-aac-encoder, +}: python3Packages.buildPythonApplication rec { pname = "soundconverter"; @@ -37,9 +47,7 @@ python3Packages.buildPythonApplication rec { python3Packages.pygobject3 ]; - nativeCheckInputs = [ - xvfb-run - ]; + nativeCheckInputs = [ xvfb-run ]; postPatch = '' substituteInPlace bin/soundconverter --replace \ @@ -47,19 +55,31 @@ python3Packages.buildPythonApplication rec { "DATA_PATH = '$out/share/soundconverter'" ''; - preCheck = let - self = { outPath = "$out"; name = "${pname}-${version}"; }; - xdgPaths = lib.concatMapStringsSep ":" glib.getSchemaDataDirPath; - in '' - export HOME=$TMPDIR - export XDG_DATA_DIRS=$XDG_DATA_DIRS:${xdgPaths [gtk3 gsettings-desktop-schemas self]} - # FIXME: Fails due to weird Gio.file_parse_name() behavior. - sed -i '49 a\ @unittest.skip("Gio.file_parse_name issues")' tests/testcases/names.py - '' + lib.optionalString (!faacSupport) '' - substituteInPlace tests/testcases/integration.py --replace \ - "for encoder in ['fdkaacenc', 'faac', 'avenc_aac']:" \ - "for encoder in ['fdkaacenc', 'avenc_aac']:" - ''; + preCheck = + let + self = { + outPath = "$out"; + name = "${pname}-${version}"; + }; + xdgPaths = lib.concatMapStringsSep ":" glib.getSchemaDataDirPath; + in + '' + export HOME=$TMPDIR + export XDG_DATA_DIRS=$XDG_DATA_DIRS:${ + xdgPaths [ + gtk3 + gsettings-desktop-schemas + self + ] + } + # FIXME: Fails due to weird Gio.file_parse_name() behavior. + sed -i '49 a\ @unittest.skip("Gio.file_parse_name issues")' tests/testcases/names.py + '' + + lib.optionalString (!faacSupport) '' + substituteInPlace tests/testcases/integration.py --replace \ + "for encoder in ['fdkaacenc', 'faac', 'avenc_aac']:" \ + "for encoder in ['fdkaacenc', 'avenc_aac']:" + ''; checkPhase = '' runHook preCheck