From 28e538c9e31caa0a124578b1d37eb4c304e58332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 5 Mar 2021 16:49:05 +0100 Subject: [PATCH 01/11] lorri: cleanup, format --- pkgs/tools/misc/lorri/default.nix | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/pkgs/tools/misc/lorri/default.nix b/pkgs/tools/misc/lorri/default.nix index 401636ab687..a7055437939 100644 --- a/pkgs/tools/misc/lorri/default.nix +++ b/pkgs/tools/misc/lorri/default.nix @@ -1,13 +1,11 @@ -{ lib, stdenv +{ lib +, stdenv , pkgs +, rustPackages , fetchFromGitHub , rustPlatform - # Updater script -, runtimeShell , writers - # Tests , nixosTests - # Apple dependencies , CoreServices , Security }: @@ -23,13 +21,6 @@ in (rustPlatform.buildRustPackage rec { pname = "lorri"; inherit version; - meta = with lib; { - description = "Your project's nix-env"; - homepage = "https://github.com/nix-community/lorri"; - license = licenses.asl20; - maintainers = with maintainers; [ grahamc Profpatsch ]; - }; - src = fetchFromGitHub { owner = "nix-community"; repo = pname; @@ -43,11 +34,10 @@ in (rustPlatform.buildRustPackage rec { doCheck = false; BUILD_REV_COUNT = src.revCount or 1; - RUN_TIME_CLOSURE = pkgs.callPackage ./runtime.nix {}; + RUN_TIME_CLOSURE = pkgs.callPackage ./runtime.nix { }; - nativeBuildInputs = with pkgs; [ rustPackages.rustfmt ]; - buildInputs = - lib.optionals stdenv.isDarwin [ CoreServices Security ]; + nativeBuildInputs = [ rustPackages.rustfmt ]; + buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Security ]; # copy the docs to the $man and $doc outputs postInstall = '' @@ -70,4 +60,11 @@ in (rustPlatform.buildRustPackage rec { nixos = nixosTests.lorri; }; }; + + meta = with lib; { + description = "Your project's nix-env"; + homepage = "https://github.com/target/lorri"; + license = licenses.asl20; + maintainers = with maintainers; [ grahamc Profpatsch ]; + }; }) From 80a09a477fabc28daaea815ec878d966a11030dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 6 Mar 2021 05:02:13 +0100 Subject: [PATCH 02/11] pythonPackages.googleapis_common_protos: remove unused input --- .../python-modules/googleapis-common-protos/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/python-modules/googleapis-common-protos/default.nix b/pkgs/development/python-modules/googleapis-common-protos/default.nix index 898971629ae..267e0e5f08a 100644 --- a/pkgs/development/python-modules/googleapis-common-protos/default.nix +++ b/pkgs/development/python-modules/googleapis-common-protos/default.nix @@ -3,7 +3,6 @@ , fetchPypi , grpc , protobuf -, pytestCheckHook }: buildPythonPackage rec { From 2505c4ebc2984077ece9ca00c3d96cedb0f476cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 6 Mar 2021 05:14:34 +0100 Subject: [PATCH 03/11] ark: format --- pkgs/applications/kde/ark/default.nix | 39 +++++++++++++-------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/pkgs/applications/kde/ark/default.nix b/pkgs/applications/kde/ark/default.nix index 69a56254d65..ef27380a330 100644 --- a/pkgs/applications/kde/ark/default.nix +++ b/pkgs/applications/kde/ark/default.nix @@ -1,18 +1,12 @@ -{ - mkDerivation, lib, config, - - extra-cmake-modules, kdoctools, - - breeze-icons, karchive, kconfig, kcrash, kdbusaddons, ki18n, - kiconthemes, kitemmodels, khtml, kio, kparts, kpty, kservice, kwidgetsaddons, - - libarchive, libzip, - - # Archive tools - p7zip, lrzip, - - # Unfree tools - unfreeEnableUnrar ? false, unrar, +{ mkDerivation, lib, config +, extra-cmake-modules, kdoctools +, breeze-icons, karchive, kconfig, kcrash, kdbusaddons, ki18n +, kiconthemes, kitemmodels, khtml, kio, kparts, kpty, kservice, kwidgetsaddons +, libarchive, libzip +# Archive tools +, p7zip, lrzip +# Unfree tools +, unfreeEnableUnrar ? false, unrar }: let @@ -21,20 +15,23 @@ in mkDerivation { pname = "ark"; - meta = { - description = "Graphical file compression/decompression utility"; - license = with lib.licenses; - [ gpl2 lgpl3 ] ++ lib.optional unfreeEnableUnrar unfree; - maintainers = [ lib.maintainers.ttuegel ]; - }; outputs = [ "out" "dev" ]; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ libarchive libzip ] ++ extraTools; + propagatedBuildInputs = [ breeze-icons karchive kconfig kcrash kdbusaddons khtml ki18n kiconthemes kio kitemmodels kparts kpty kservice kwidgetsaddons ]; qtWrapperArgs = [ "--prefix" "PATH" ":" (lib.makeBinPath extraTools) ]; + + meta = with lib; { + description = "Graphical file compression/decompression utility"; + license = with licenses; [ gpl2 lgpl3 ] ++ optional unfreeEnableUnrar unfree; + maintainers = [ maintainers.ttuegel ]; + }; } From 5be41d6d7d12be583763b5c2716274e2d3e7fff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 6 Mar 2021 05:14:44 +0100 Subject: [PATCH 04/11] kde-frameworks.kguiaddons: format, mark broken below qt 5.14 --- .../libraries/kde-frameworks/kguiaddons.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/kde-frameworks/kguiaddons.nix b/pkgs/development/libraries/kde-frameworks/kguiaddons.nix index a9b3c416624..6c7365fd27e 100644 --- a/pkgs/development/libraries/kde-frameworks/kguiaddons.nix +++ b/pkgs/development/libraries/kde-frameworks/kguiaddons.nix @@ -1,17 +1,19 @@ -{ - mkDerivation, lib, - extra-cmake-modules, - qtbase, qtx11extras, wayland, +{ mkDerivation, lib +, extra-cmake-modules +, qtbase, qtx11extras, wayland }: mkDerivation { name = "kguiaddons"; - meta = { - maintainers = [ lib.maintainers.ttuegel ]; - broken = builtins.compareVersions qtbase.version "5.7.0" < 0; - }; + nativeBuildInputs = [ extra-cmake-modules ]; buildInputs = [ qtx11extras wayland ]; propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; + + meta = with lib; { + maintainers = [ maintainers.ttuegel ]; + broken = versionOlder qtbase.version "5.14.0"; + }; } From a54f2438e47ed4627d9a66724b31e0f66458deac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 6 Mar 2021 05:26:11 +0100 Subject: [PATCH 05/11] pythonPackages.shap: mark broken --- pkgs/development/python-modules/shap/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/shap/default.nix b/pkgs/development/python-modules/shap/default.nix index cfbd6f92b04..abc68709caa 100644 --- a/pkgs/development/python-modules/shap/default.nix +++ b/pkgs/development/python-modules/shap/default.nix @@ -66,5 +66,7 @@ buildPythonPackage rec { license = licenses.mit; maintainers = with maintainers; [ evax ]; platforms = platforms.unix; + # ModuleNotFoundError: No module named 'sklearn.ensemble.iforest' + broken = true; }; } From 901206a04e70c99b03a4d96f602a4f39c2780288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 6 Mar 2021 18:39:45 +0100 Subject: [PATCH 06/11] pythonPackages.crate: disable failing test on darwin --- pkgs/development/python-modules/crate/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/crate/default.nix b/pkgs/development/python-modules/crate/default.nix index a37160a01ac..9be85ff4b3c 100644 --- a/pkgs/development/python-modules/crate/default.nix +++ b/pkgs/development/python-modules/crate/default.nix @@ -6,6 +6,7 @@ , isPy3k , sqlalchemy , pytestCheckHook +, stdenv }: buildPythonPackage rec { @@ -28,6 +29,8 @@ buildPythonPackage rec { pytestCheckHook ]; + disabledTestPaths = lib.optionals stdenv.isDarwin [ "src/crate/client/test_http.py" ]; + meta = with lib; { homepage = "https://github.com/crate/crate-python"; description = "A Python client library for CrateDB"; From 3353bf7a165d5c520d31f2b62f165b605910e512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 6 Mar 2021 19:17:51 +0100 Subject: [PATCH 07/11] beets: remove ``? null``; remove ``with lib`` --- pkgs/tools/audio/beets/default.nix | 81 ++++++++++++------------------ 1 file changed, 31 insertions(+), 50 deletions(-) diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index 7fea4bd28d4..2be0b1bc76f 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -1,24 +1,23 @@ { stdenv, lib, fetchFromGitHub, writeScript, glibcLocales, diffPlugins, substituteAll , pythonPackages, imagemagick, gobject-introspection, gst_all_1 -, runtimeShell -, unstableGitUpdater +, runtimeShell, unstableGitUpdater # external plugins package set , beetsExternalPlugins -, enableAbsubmit ? lib.elem stdenv.hostPlatform.system essentia-extractor.meta.platforms, essentia-extractor ? null +, enableAbsubmit ? lib.elem stdenv.hostPlatform.system essentia-extractor.meta.platforms, essentia-extractor , enableAcousticbrainz ? true , enableAcoustid ? true -, enableBadfiles ? true, flac ? null, mp3val ? null +, enableBadfiles ? true, flac, mp3val , enableBeatport ? true , enableBpsync ? true -, enableConvert ? true, ffmpeg ? null +, enableConvert ? true, ffmpeg , enableDeezer ? true , enableDiscogs ? true , enableEmbyupdate ? true , enableFetchart ? true , enableGmusic ? true -, enableKeyfinder ? true, keyfinder-cli ? null +, enableKeyfinder ? true, keyfinder-cli , enableKodiupdate ? true , enableLastfm ? true , enableLoadext ? true @@ -33,32 +32,14 @@ # External plugins , enableAlternatives ? false -, enableCheck ? false, liboggz ? null +, enableCheck ? false, liboggz , enableCopyArtifacts ? false , enableExtraFiles ? false , bashInteractive, bash-completion }: -assert enableAbsubmit -> essentia-extractor != null; -assert enableAcoustid -> pythonPackages.pyacoustid != null; -assert enableBadfiles -> flac != null && mp3val != null; -assert enableBeatport -> pythonPackages.requests_oauthlib != null; assert enableBpsync -> enableBeatport; -assert enableCheck -> flac != null && mp3val != null && liboggz != null; -assert enableConvert -> ffmpeg != null; -assert enableDiscogs -> pythonPackages.discogs_client != null; -assert enableFetchart -> pythonPackages.responses != null; -assert enableGmusic -> pythonPackages.gmusicapi != null; -assert enableKeyfinder -> keyfinder-cli != null; -assert enableLastfm -> pythonPackages.pylast != null; -assert enableMpd -> pythonPackages.mpd2 != null; -assert enableReplaygain -> ffmpeg != null; -assert enableSonosUpdate -> pythonPackages.soco != null; -assert enableThumbnails -> pythonPackages.pyxdg != null; -assert enableWeb -> pythonPackages.flask != null; - -with lib; let optionalPlugins = { @@ -99,20 +80,20 @@ let "types" "unimported" "zero" ]; - enabledOptionalPlugins = attrNames (filterAttrs (_: id) optionalPlugins); + enabledOptionalPlugins = lib.attrNames (lib.filterAttrs (_: lib.id) optionalPlugins); - allPlugins = pluginsWithoutDeps ++ attrNames optionalPlugins; + allPlugins = pluginsWithoutDeps ++ lib.attrNames optionalPlugins; allEnabledPlugins = pluginsWithoutDeps ++ enabledOptionalPlugins; testShell = "${bashInteractive}/bin/bash --norc"; completion = "${bash-completion}/share/bash-completion/bash_completion"; # This is a stripped down beets for testing of the external plugins. - externalTestArgs.beets = (beets.override { + externalTestArgs.beets = (lib.beets.override { enableAlternatives = false; enableCopyArtifacts = false; enableExtraFiles = false; - }).overrideAttrs (const { + }).overrideAttrs (lib.const { doInstallCheck = false; }); @@ -147,10 +128,10 @@ in pythonPackages.buildPythonApplication rec { pythonPackages.confuse pythonPackages.mediafile gobject-introspection - ] ++ optional enableAbsubmit essentia-extractor - ++ optional enableAcoustid pythonPackages.pyacoustid - ++ optional enableBeatport pythonPackages.requests_oauthlib - ++ optional (enableFetchart + ] ++ lib.optional enableAbsubmit essentia-extractor + ++ lib.optional enableAcoustid pythonPackages.pyacoustid + ++ lib.optional enableBeatport pythonPackages.requests_oauthlib + ++ lib.optional (enableFetchart || enableDeezer || enableEmbyupdate || enableKodiupdate @@ -160,19 +141,19 @@ in pythonPackages.buildPythonApplication rec { || enableSubsonicupdate || enableAcousticbrainz) pythonPackages.requests - ++ optional enableCheck beetsExternalPlugins.check - ++ optional enableConvert ffmpeg - ++ optional enableDiscogs pythonPackages.discogs_client - ++ optional enableGmusic pythonPackages.gmusicapi - ++ optional enableKeyfinder keyfinder-cli - ++ optional enableLastfm pythonPackages.pylast - ++ optional enableMpd pythonPackages.mpd2 - ++ optional enableSonosUpdate pythonPackages.soco - ++ optional enableThumbnails pythonPackages.pyxdg - ++ optional enableWeb pythonPackages.flask - ++ optional enableAlternatives beetsExternalPlugins.alternatives - ++ optional enableCopyArtifacts beetsExternalPlugins.copyartifacts - ++ optional enableExtraFiles beetsExternalPlugins.extrafiles + ++ lib.optional enableCheck beetsExternalPlugins.check + ++ lib.optional enableConvert ffmpeg + ++ lib.optional enableDiscogs pythonPackages.discogs_client + ++ lib.optional enableGmusic pythonPackages.gmusicapi + ++ lib.optional enableKeyfinder keyfinder-cli + ++ lib.optional enableLastfm pythonPackages.pylast + ++ lib.optional enableMpd pythonPackages.mpd2 + ++ lib.optional enableSonosUpdate pythonPackages.soco + ++ lib.optional enableThumbnails pythonPackages.pyxdg + ++ lib.optional enableWeb pythonPackages.flask + ++ lib.optional enableAlternatives beetsExternalPlugins.alternatives + ++ lib.optional enableCopyArtifacts beetsExternalPlugins.copyartifacts + ++ lib.optional enableExtraFiles beetsExternalPlugins.extrafiles ; buildInputs = [ @@ -209,12 +190,12 @@ in pythonPackages.buildPythonApplication rec { # bs1770gain, and set the absolute path there, to avoid impurities. ++ lib.optional enableReplaygain (substituteAll { src = ./replaygain-default-ffmpeg.patch; - ffmpeg = getBin ffmpeg; + ffmpeg = lib.getBin ffmpeg; }) # Put absolute Nix paths in place ++ lib.optional enableConvert (substituteAll { src = ./convert-plugin-ffmpeg-path.patch; - ffmpeg = getBin ffmpeg; + ffmpeg = lib.getBin ffmpeg; }) ++ lib.optional enableBadfiles (substituteAll { src = ./badfiles-plugin-nix-paths.patch; @@ -269,7 +250,7 @@ in pythonPackages.buildPythonApplication rec { EDITOR="${writeScript "beetconfig.sh" '' #!${runtimeShell} cat > "$1" < Date: Sat, 6 Mar 2021 19:21:19 +0100 Subject: [PATCH 08/11] deltachat-electron: format --- .../instant-messengers/deltachat-electron/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/deltachat-electron/default.nix b/pkgs/applications/networking/instant-messengers/deltachat-electron/default.nix index 4be867bb4b5..c579220cdde 100644 --- a/pkgs/applications/networking/instant-messengers/deltachat-electron/default.nix +++ b/pkgs/applications/networking/instant-messengers/deltachat-electron/default.nix @@ -6,8 +6,7 @@ let name = "${pname}-${version}"; src = fetchurl { - url = - "https://download.delta.chat/desktop/v${version}/DeltaChat-${version}.AppImage"; + url = "https://download.delta.chat/desktop/v${version}/DeltaChat-${version}.AppImage"; sha256 = "sha256-iw2tU8qqXWbtEdLGlW8HNBHx8F2CgnCGCBUWpM407us="; }; From bee35c7b7c5599e065f7e10b55ca053a81643ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 6 Mar 2021 19:22:16 +0100 Subject: [PATCH 09/11] tree-sitter: cleanup --- pkgs/development/tools/parsing/tree-sitter/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix index 44d2a8d3c15..48f48ed748f 100644 --- a/pkgs/development/tools/parsing/tree-sitter/default.nix +++ b/pkgs/development/tools/parsing/tree-sitter/default.nix @@ -108,7 +108,7 @@ in rustPlatform.buildRustPackage { }; }; - meta = { + meta = with lib; { homepage = "https://github.com/tree-sitter/tree-sitter"; description = "A parser generator tool and an incremental parsing library"; longDescription = '' @@ -122,10 +122,9 @@ in rustPlatform.buildRustPackage { * Robust enough to provide useful results even in the presence of syntax errors * Dependency-free so that the runtime library (which is written in pure C) can be embedded in any application ''; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ Profpatsch ]; + license = licenses.mit; + maintainers = with maintainers; [ Profpatsch ]; # Aarch has test failures with how tree-sitter compiles the generated C files broken = stdenv.isAarch64; }; - } From 451ffcb2ac97c3d110cc88f0a301f4ba0d5b4b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 6 Mar 2021 19:52:53 +0100 Subject: [PATCH 10/11] pythonPackages.alot: cleanup inputs, fix inputs --- pkgs/development/python-modules/alot/default.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/alot/default.nix b/pkgs/development/python-modules/alot/default.nix index 1f4617ce9c0..1117557a8a0 100644 --- a/pkgs/development/python-modules/alot/default.nix +++ b/pkgs/development/python-modules/alot/default.nix @@ -1,9 +1,7 @@ -{ lib, buildPythonPackage, python, fetchFromGitHub, fetchpatch, isPy3k +{ lib, buildPythonPackage, python, fetchFromGitHub, isPy3k , notmuch, urwid, urwidtrees, twisted, python_magic, configobj, mock, file, gpgme -, service-identity -, gnupg ? null, sphinx, awk ? null, procps ? null, future ? null -, withManpage ? false }: - +, service-identity, gnupg, sphinx, gawk, procps, future , withManpage ? false +}: buildPythonPackage rec { pname = "alot"; @@ -41,7 +39,7 @@ buildPythonPackage rec { doCheck = false; postBuild = lib.optionalString withManpage "make -C docs man"; - checkInputs = [ awk future mock gnupg procps ]; + checkInputs = [ gawk future mock gnupg procps ]; postInstall = let completionPython = python.withPackages (ps: [ ps.configobj ]); From 473906dc8b895ef6576b054971bf78b923ff2009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 6 Mar 2021 20:10:17 +0100 Subject: [PATCH 11/11] hashdeep: simplify platforms --- pkgs/tools/security/hashdeep/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/hashdeep/default.nix b/pkgs/tools/security/hashdeep/default.nix index 702a40ab8b8..0e24e0ec3a3 100644 --- a/pkgs/tools/security/hashdeep/default.nix +++ b/pkgs/tools/security/hashdeep/default.nix @@ -17,10 +17,11 @@ stdenv.mkDerivation rec { description = "A set of cross-platform tools to compute hashes"; homepage = "https://github.com/jessek/hashdeep"; license = licenses.gpl2; + maintainers = [ maintainers.karantan ]; + platforms = platforms.all; # Build fails on Darwin: # > ./xml.h:103:82: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] # > void xmlout(const std::string &tag,const int64_t value){ xmlprintf(tag,"","%"PRId64,value); } - platforms = with platforms; linux ++ freebsd ++ openbsd; - maintainers = [ maintainers.karantan ]; + broken = stdenv.isDarwin; }; }