diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 1e65bcc26795..6e494fce69b2 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -158,38 +158,47 @@ rec { if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET" else if final.isiOS then "IPHONEOS_DEPLOYMENT_TARGET" else null; + } // ( + let + selectEmulator = 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 && + pkgs.stdenv.hostPlatform.canExecute final + then "${pkgs.runtimeShell} -c '\"$@\"' --" + 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 if final.isWasi + then "${pkgs.wasmtime}/bin/wasmtime" + else if final.isMmix + then "${pkgs.mmixware}/bin/mmix" + else null; + in { + emulatorAvailable = pkgs: (selectEmulator pkgs) != null; - 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 && - pkgs.stdenv.hostPlatform.canExecute final - then "${pkgs.runtimeShell} -c '\"$@\"' --" - 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 if final.isWasi - then "${pkgs.wasmtime}/bin/wasmtime" - else if final.isMmix - then "${pkgs.mmixware}/bin/mmix" - else throw "Don't know how to run ${final.config} executables."; + emulator = pkgs: + if (final.emulatorAvailable pkgs) + then selectEmulator pkgs + else throw "Don't know how to run ${final.config} executables."; - } // mapAttrs (n: v: v final.parsed) inspect.predicates + }) // mapAttrs (n: v: v final.parsed) inspect.predicates // mapAttrs (n: v: v final.gcc.arch or "default") architectures.predicates // args; in assert final.useAndroidPrebuilt -> final.isAndroid; diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index 9ed7903e2826..5b473ef8c49c 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -5255,14 +5255,14 @@ final: prev: nvim-colorizer-lua = buildVimPluginFrom2Nix { pname = "nvim-colorizer.lua"; - version = "2020-06-11"; + version = "2022-09-10"; src = fetchFromGitHub { - owner = "norcalli"; + owner = "nvchad"; repo = "nvim-colorizer.lua"; - rev = "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6"; - sha256 = "0gvqdfkqf6k9q46r0vcc3nqa6w45gsvp8j4kya1bvi24vhifg2p9"; + rev = "2664070cd04f2b9f803a10dd328a562be8ab15ca"; + sha256 = "16myjv2hrqr2kk14mqidyrhdnz1i3p00yf0w97f4kxrdd158p1nz"; }; - meta.homepage = "https://github.com/norcalli/nvim-colorizer.lua/"; + meta.homepage = "https://github.com/nvchad/nvim-colorizer.lua/"; }; nvim-comment = buildVimPluginFrom2Nix { diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index 4708e3c2c9bd..92910fdff010 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -442,7 +442,7 @@ https://github.com/ojroques/nvim-bufdel/,, https://github.com/roxma/nvim-cm-racer/,, https://github.com/hrsh7th/nvim-cmp/,, https://github.com/weilbith/nvim-code-action-menu/,, -https://github.com/norcalli/nvim-colorizer.lua/,, +https://github.com/nvchad/nvim-colorizer.lua/,, https://github.com/terrortylor/nvim-comment/,, https://github.com/hrsh7th/nvim-compe/,, https://github.com/roxma/nvim-completion-manager/,, diff --git a/pkgs/applications/misc/tippecanoe/default.nix b/pkgs/applications/misc/tippecanoe/default.nix index e92636bad20f..d6fc4910e857 100644 --- a/pkgs/applications/misc/tippecanoe/default.nix +++ b/pkgs/applications/misc/tippecanoe/default.nix @@ -1,14 +1,14 @@ -{ lib, stdenv, fetchFromGitHub, sqlite, zlib, perl }: +{ lib, stdenv, fetchFromGitHub, sqlite, zlib, perl, testers }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "tippecanoe"; - version = "1.36.0"; + version = "2.6.0"; src = fetchFromGitHub { - owner = "mapbox"; - repo = pname; - rev = version; - sha256 = "0lbmhly4ivnqc6qk1k3sdqvsg6x3nfd8gnjx846bhqj4wag3f88m"; + owner = "felt"; + repo = "tippecanoe"; + rev = finalAttrs.version; + hash = "sha256-58/FS5nxzK5JSc0D1KXooSjrKMdOnpF7dvwAK9rUZZk="; }; buildInputs = [ sqlite zlib ]; @@ -19,12 +19,16 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; doCheck = true; + passthru.tests.version = testers.testVersion { + package = finalAttrs.finalPackage; + version = "v${finalAttrs.version}"; + }; + meta = with lib; { - broken = stdenv.isDarwin || stdenv.isAarch64; description = "Build vector tilesets from large collections of GeoJSON features"; - homepage = "https://github.com/mapbox/tippecanoe"; + homepage = "https://github.com/felt/tippecanoe"; license = licenses.bsd2; maintainers = with maintainers; [ sikmir ]; - platforms = with platforms; linux ++ darwin; + platforms = platforms.unix; }; -} +}) diff --git a/pkgs/applications/science/logic/potassco/clingo.nix b/pkgs/applications/science/logic/potassco/clingo.nix index 41c5eb5733e5..d46efe18c984 100644 --- a/pkgs/applications/science/logic/potassco/clingo.nix +++ b/pkgs/applications/science/logic/potassco/clingo.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "clingo"; - version = "5.5.2"; + version = "5.6.0"; src = fetchFromGitHub { owner = "potassco"; repo = "clingo"; rev = "v${version}"; - sha256 = "sha256-fBf7MRFkd5SfHDQ5OvWx4lP/N716SrF9uY4JF7SiWRk="; + sha256 = "sha256-3qyQ7CnpELs6IsDxrW+IbV/TmlfYxP9VIVVjc7sM9fg="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/python-modules/mypy/default.nix b/pkgs/development/python-modules/mypy/default.nix index 7d2df7e316ba..a517427d8033 100644 --- a/pkgs/development/python-modules/mypy/default.nix +++ b/pkgs/development/python-modules/mypy/default.nix @@ -1,50 +1,58 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch +, attrs , buildPythonPackage +, filelock +, lxml , mypy-extensions +, psutil +, py +, pytest-forked +, pytest-xdist +, pytestCheckHook , python , pythonOlder +, six , typed-ast , typing-extensions , tomli , types-typed-ast +, virtualenv }: buildPythonPackage rec { pname = "mypy"; - version = "0.961"; - disabled = pythonOlder "3.6"; + version = "0.971"; + format = "pyproject"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "python"; repo = "mypy"; - rev = "v${version}"; - hash = "sha256-K6p73+/SeWniMSD/mP09qwqFOBr/Pqohl+PaTDVpvZI="; + rev = "refs/tags/v${version}"; + hash = "sha256-J1lUnJco9rLYgFpJkfujGfVq1CfC4pdvvDzoan3jGkU="; }; - patches = [ - # FIXME: Remove patch after upstream has decided the proper solution. - # https://github.com/python/mypy/pull/11143 - (fetchpatch { - url = "https://github.com/python/mypy/commit/2004ae023b9d3628d9f09886cbbc20868aee8554.patch"; - hash = "sha256-y+tXvgyiECO5+66YLvaje8Bz5iPvfWNIBJcsnZ2nOdI="; - }) - ]; - - buildInputs = [ + nativeBuildInputs = [ types-typed-ast ]; propagatedBuildInputs = [ mypy-extensions - tomli - typed-ast typing-extensions + ] ++ lib.optionals (pythonOlder "3.11") [ + tomli + ] ++ lib.optionals (pythonOlder "3.8") [ + typed-ast ]; - # Tests not included in pip package. + passthru.optional-dependencies = { + dmypy = [ psutil ]; + reports = [ lxml ]; + }; + + # TODO: enable tests doCheck = false; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/mypy/extensions.nix b/pkgs/development/python-modules/mypy/extensions.nix index 37257efe5edc..ba0a079fee1d 100644 --- a/pkgs/development/python-modules/mypy/extensions.nix +++ b/pkgs/development/python-modules/mypy/extensions.nix @@ -2,7 +2,8 @@ , fetchFromGitHub , buildPythonPackage , typing -, unittestCheckHook +, pytestCheckHook +, pythonAtLeast , pythonOlder }: @@ -19,11 +20,23 @@ buildPythonPackage rec { propagatedBuildInputs = lib.optional (pythonOlder "3.5") typing; - checkInputs = [ unittestCheckHook ]; + # make the testsuite run with pytest, so we can disable individual tests + checkInputs = [ + pytestCheckHook + ]; - unittestFlagsArray = [ "tests" ]; + pytestFlagsArray = [ + "tests/testextensions.py" + ]; - pythonImportsCheck = [ "mypy_extensions" ]; + disabledTests = lib.optionals (pythonAtLeast "3.11") [ + # https://github.com/python/mypy_extensions/issues/24 + "test_typeddict_errors" + ]; + + pythonImportsCheck = [ + "mypy_extensions" + ]; meta = with lib; { description = "Experimental type system extensions for programs checked with the mypy typechecker"; diff --git a/pkgs/development/tools/konf/default.nix b/pkgs/development/tools/konf/default.nix new file mode 100644 index 000000000000..9747dbe69616 --- /dev/null +++ b/pkgs/development/tools/konf/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "konf"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "SimonTheLeg"; + repo = "konf-go"; + rev = "v${version}"; + hash = "sha256-UeuR7lsNG2Y0hdpQA5NXBUlSvYeixyKS73N95z5TZ7k="; + }; + + vendorHash = "sha256-sB3j19HrTtaRqNcooqNy8vBvuzxxyGDa7MOtiGoVgN8="; + + ldflags = [ "-s" "-w" ]; + + meta = with lib; { + description = "Lightweight and blazing fast kubeconfig manager which allows to use different kubeconfigs at the same time"; + homepage = "https://github.com/SimonTheLeg/konf-go"; + license = licenses.asl20; + maintainers = with maintainers; [ arikgrahl ]; + }; +} diff --git a/pkgs/development/tools/rust/cargo-valgrind/default.nix b/pkgs/development/tools/rust/cargo-valgrind/default.nix index ac54657c8af0..b21db0d6205f 100644 --- a/pkgs/development/tools/rust/cargo-valgrind/default.nix +++ b/pkgs/development/tools/rust/cargo-valgrind/default.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-valgrind"; - version = "2.0.3"; + version = "2.1.0"; src = fetchFromGitHub { owner = "jfrimmel"; repo = "cargo-valgrind"; - rev = version; - sha256 = "sha256-PEGDao010COqSJGha7GQvR7vNOV+C7faduijVNjB5DE="; + rev = "v${version}"; + sha256 = "sha256-FCz15kMSKckifYWSTMGqJbRpZ8X/AM5dSw46dg8ERcY="; }; - cargoSha256 = "sha256-00WUYrkKKJOEN9jXKQ3YraTq89U+3djdvLRuZSbeNHk="; + cargoSha256 = "sha256-csSUe2qUIN2xKOMHWyM56FZyCwKPdfAI0NrFiDOtRiE="; passthru = { updateScript = nix-update-script { @@ -31,8 +31,10 @@ rustPlatform.buildRustPackage rec { wrapProgram $out/bin/cargo-valgrind --prefix PATH : ${lib.makeBinPath [ valgrind ]} ''; - # Disable check phase as there are failures (2 tests fail) - doCheck = false; + checkFlags = [ + "--skip examples_are_runnable" + "--skip tests_are_runnable" + ]; meta = with lib; { description = ''Cargo subcommand "valgrind": runs valgrind and collects its output in a helpful manner''; diff --git a/pkgs/servers/http/apache-modules/mod_wsgi/default.nix b/pkgs/servers/http/apache-modules/mod_wsgi/default.nix index cc24797ceb82..7185b1c81270 100644 --- a/pkgs/servers/http/apache-modules/mod_wsgi/default.nix +++ b/pkgs/servers/http/apache-modules/mod_wsgi/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "mod_wsgi"; - version = "4.9.3"; + version = "4.9.4"; src = fetchFromGitHub { owner = "GrahamDumpleton"; repo = "mod_wsgi"; rev = version; - hash = "sha256-P/mx0JxlJGpel0zBFIe8r313VkwPEK2LP0kiUIwKZAM="; + hash = "sha256-6rRHdgdTb94kqIpWJOJOwoIsaXb/c4XY3q331GwQyf0="; }; buildInputs = [ apacheHttpd python ncurses ]; @@ -23,6 +23,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/GrahamDumpleton/mod_wsgi"; description = "Host Python applications in Apache through the WSGI interface"; license = lib.licenses.asl20; - platforms = lib.platforms.linux; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/tools/misc/grafterm/default.nix b/pkgs/tools/misc/grafterm/default.nix new file mode 100644 index 000000000000..f21a8ba76fc5 --- /dev/null +++ b/pkgs/tools/misc/grafterm/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "grafterm"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "slok"; + repo = pname; + rev = "v${version}"; + hash = "sha256-0pM36rAmwx/P1KAlmVaGoSj8eb9JucYycNC2R867dVo="; + }; + + vendorHash = "sha256-veg5B68AQhkSZg8YA/e4FbqJNG0YGwnUQFsAdscz0QI="; + + ldflags = [ "-s" "-w" "-X main.Version=${version}" ]; + + meta = with lib; { + description = "Command-line tool for rendering metrics dashboards inspired by Grafana"; + homepage = "https://github.com/slok/grafterm"; + license = licenses.asl20; + maintainers = with maintainers; [ arikgrahl ]; + }; +} diff --git a/pkgs/tools/misc/miniserve/default.nix b/pkgs/tools/misc/miniserve/default.nix index 127d8d9f1aec..2b410f9c3bb1 100644 --- a/pkgs/tools/misc/miniserve/default.nix +++ b/pkgs/tools/misc/miniserve/default.nix @@ -1,11 +1,8 @@ { lib -, stdenv , rustPlatform , fetchFromGitHub , installShellFiles -, pkg-config -, zlib -, libiconv +, stdenv , Security }: @@ -24,12 +21,9 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles - pkg-config - zlib ]; buildInputs = lib.optionals stdenv.isDarwin [ - libiconv Security ]; @@ -51,9 +45,9 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "CLI tool to serve files and directories over HTTP"; homepage = "https://github.com/svenstaro/miniserve"; + changelog = "https://github.com/svenstaro/miniserve/blob/v${version}/CHANGELOG.md"; license = with licenses; [ mit ]; - maintainers = with maintainers; [ ]; - platforms = platforms.unix; + maintainers = with maintainers; [ figsoda ]; # https://hydra.nixos.org/build/162650896/nixlog/1 broken = stdenv.isDarwin && stdenv.isAarch64; }; diff --git a/pkgs/tools/misc/promql-cli/default.nix b/pkgs/tools/misc/promql-cli/default.nix new file mode 100644 index 000000000000..8bb8222c5df0 --- /dev/null +++ b/pkgs/tools/misc/promql-cli/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "promql-cli"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "nalbury"; + repo = pname; + rev = "v${version}"; + hash = "sha256-uuoUvEBnLxopdt6u4vX6pYnuyOATwJFJo9ozQ9jhSyo="; + }; + + vendorHash = "sha256-OLkOyeLyBnNmijNYFrXIZ4nbOvV/65KIKjOFOVS9Yiw="; + + ldflags = [ "-s" "-w" ]; + + postInstall = '' + mv -v $out/bin/promql-cli $out/bin/promql + ''; + + meta = with lib; { + description = "Command-line tool to query a Prometheus server with PromQL and visualize the output"; + homepage = "https://github.com/nalbury/promql-cli"; + license = licenses.asl20; + maintainers = with maintainers; [ arikgrahl ]; + }; +} diff --git a/pkgs/tools/misc/qflipper/default.nix b/pkgs/tools/misc/qflipper/default.nix index b7348db104bc..d09aec664ade 100644 --- a/pkgs/tools/misc/qflipper/default.nix +++ b/pkgs/tools/misc/qflipper/default.nix @@ -28,13 +28,6 @@ let timestamp = "99999999999"; commit = "nix-${version}"; - udev_rules = '' - #Flipper Zero serial port - SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ATTRS{manufacturer}=="Flipper Devices Inc.", TAG+="uaccess" - #Flipper Zero DFU - SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", ATTRS{manufacturer}=="STMicroelectronics", TAG+="uaccess" - ''; - in mkDerivation { inherit pname version; @@ -92,9 +85,7 @@ mkDerivation { cp qFlipper-cli $out/bin mkdir -p $out/etc/udev/rules.d - tee $out/etc/udev/rules.d/42-flipperzero.rules << EOF - ${udev_rules} - EOF + cp installer-assets/udev/42-flipperzero.rules $out/etc/udev/rules.d/ ''; passthru.updateScript = nix-update-script { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8ee970f061f0..3b8de739bd09 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7158,6 +7158,8 @@ with pkgs; gptfdisk = callPackage ../tools/system/gptfdisk { }; + grafterm = callPackage ../tools/misc/grafterm { }; + grafx2 = callPackage ../applications/graphics/grafx2 {}; grails = callPackage ../development/web/grails { jdk = null; }; @@ -15148,6 +15150,8 @@ with pkgs; kona = callPackage ../development/interpreters/kona {}; + konf = callPackage ../development/tools/konf { }; + lolcode = callPackage ../development/interpreters/lolcode { }; love_0_10 = callPackage ../development/interpreters/love/0.10.nix { }; @@ -23565,6 +23569,8 @@ with pkgs; liquibase_redshift_extension = callPackage ../development/java-modules/liquibase_redshift_extension { }; + promql-cli = callPackage ../tools/misc/promql-cli { }; + prom2json = callPackage ../servers/monitoring/prometheus/prom2json.nix { }; prometheus = callPackage ../servers/monitoring/prometheus { }; prometheus-alertmanager = callPackage ../servers/monitoring/prometheus/alertmanager.nix { };