[doc]  Add NixOS and home-manager entry to wiki

Feature description
I have submitted a PR for NixOS support in #906.
I would like to add to the wiki about NixOS support.
module options will be replaced with appropriate ones when the PR is merged
Please review.
what's inside ?

Usage for NixOS

mason.nvim cannot build packages or run installed binaries
How to check for required dependencies.
What to do if you can't build with mason.nvim.

Usage for home-manager on non-NixOS
Module Options

Preview

raw markdown code
# NixOS and home-manager
This repository contains the nixosModule for home-manager provided by flakes.
You can use it right away if you are using home-manager on NixOS as well as non-NixOS.
Usage for NixOS.
Add the following to your flake.nix, configuration.nix and nvimdots.nix.
Relogin to shell after nixos-rebuild switch --flake <flake-url>.

flake.nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.nvimdots.url = "github:ayamir/nvimdots";
  inputs.home-manager = {
    url = "github:nix-community/home-manager";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  nixosConfigurations = {
      use-nvimdots = inputs.nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules =
          [ # ...
            inputs.home-manager.nixosModules.home-manager {
              home-manager.users."example-user" = {
                imports =
                  [
                    inputs.nvimdots.nixosModules.nvimdots
                    (import ./nvimdots.nix)
                  ];
              };
              home-manager.extraSpecialArgs = { inherit inputs; };
            }
            ./configuration.nix
          ];
        specialArgs = { inherit inputs; };
      };
    };
  };
}

configuration.nix
{
  # ...
  programs.nix-ld.enable = true;
  # ...
}

nvimdots.nix
setBuildEnv provides CPATH, CPLUG_INCLUDE_PATH, LD_LIBLARY_PATH, LIBRARY_PATH, NIX_LD_LIBRARY_PATH, PKG_CONFIG_PATH.
withBuildTools provides basic build tools such as gcc and pkg-config.
These are required for mason.nvim and nvim-treesitter to work properly.
Also, they are only provided to neovim and do not affect the entire session.
{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;
    withBuildTools = true;
  };
}

mason.nvim cannot build packages or run installed binaries.
This is because the dependencies are not included.
NixOS does not conform to the Filesystem Hierarchy Standard (FHS), so some ingenuity is required.
This nixosModules provides options to simplify dependency resolution.
You can still use programs.neovim.extraPackages, programs.neovim.extraPython3Packages, programs.neovim.extraLuaPackages provided by home-manager.

nvimdots.nix
{pkgs, ...}:
{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;
    withBuildTools = true;
    extraRPackages = rPkgs: []; # need packages for R include `nixpkgs.rPackages`.
    extraHaskellPackages = hsPkgs: []; # need packages for haskell include `nixpkgs.haskellPackages`.
    extraDependentPackages = with pkgs; [] # need packages `lib`, `include`, and `pkgconfig`.
  };
}

How to check for required dependencies.
For binaries, patchelf --print-needed <binary> will list the required packages.
You can also check the library link status with ldd <binary>.
You can check the dependencies required at build time from the build log from the UI of mason.nvim opened with :Mason.
If it is included in nixpkgs, you may be able to find the package you need by looking at the *.nix sources.
What to do if you can't build with mason.nvim.
If it is provided by nixpkgs, you should be able to use it by adding the following settings.
https://github.com/ayamir/nvimdots/blob/6de8afe0fc4a6e53a9d64a013327d5482b6dbe99/lua/modules/configs/completion/lsp.lua#L143-L148
Usage for home-manager on non-NixOS
Unlike on NixOS, build tools and dependencies should be provided by the package manager provided by the distribution.
Of course, you can let nix resolve dependencies as they do for NixOS, but that can be a problem if you run the build command from within neovim.
Add the following to your flake.nix and nvimdots.nix.
Relogin to shell after home-manager switch --flake <flake-url>.

flake.nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.nvimdots.url = "github:ayamir/nvimdots";
  inputs.home-manager = {
    url = "github:nix-community/home-manager";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  homeConfigurations = {
    use-nvimdots = inputs.home-manager.lib.homeManagerConfiguration {
      inherit (inputs) nixpkgs;
      modules = [
        inputs.nvimdots.nixosModules.nvimdots
        (import ./nvimdots.nix)
      ];
      extraSpecialArgs = { inherit inputs; };
    };
  };
}

nvimdots.nix
{
  programs.neovim.nvimdots = {
    enable = true;
    # Comment out if resolving dependencies on `nix`.
    # setBuildEnv = true;
    # withBuildTools = true;
  };
}

Module Options
Please see https://github.com/misumisumi/nvimdots/blob/36d0b3d920f6e4e5397646ddb522f8c8aa43af93/nixos/neovim/default.nix#L11C1-L135C5

NixOS and home-manager
This repository contains the nixosModule for home-manager provided by flakes.
You can use it right away if you are using home-manager on NixOS as well as non-NixOS.
Usage for NixOS.
Add the following to your flake.nix, configuration.nix and nvimdots.nix.
Relogin to shell after nixos-rebuild switch --flake <flake-url>.

flake.nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.nvimdots.url = "github:ayamir/nvimdots";
  inputs.home-manager = {
    url = "github:nix-community/home-manager";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  nixosConfigurations = {
      use-nvimdots = inputs.nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules =
          [ # ...
            inputs.home-manager.nixosModules.home-manager {
              home-manager.users."example-user" = {
                imports =
                  [
                    inputs.nvimdots.nixosModules.nvimdots
                    (import ./nvimdots.nix)
                  ];
              };
              home-manager.extraSpecialArgs = { inherit inputs; };
            }
            ./configuration.nix
          ];
        specialArgs = { inherit inputs; };
      };
    };
  };
}

configuration.nix
{
  # ...
  programs.nix-ld.enable = true;
  # ...
}

nvimdots.nix
setBuildEnv provides CPATH, CPLUG_INCLUDE_PATH, LD_LIBLARY_PATH, LIBRARY_PATH, NIX_LD_LIBRARY_PATH, PKG_CONFIG_PATH.
withBuildTools provides basic build tools such as gcc and pkg-config.
These are required for mason.nvim and nvim-treesitter to work properly.
Also, they are only provided to neovim and do not affect the entire session.
{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;
    withBuildTools = true;
  };
}

mason.nvim cannot build packages or run installed binaries.
This is because the dependencies are not included.
NixOS does not conform to the Filesystem Hierarchy Standard (FHS), so some ingenuity is required.
This nixosModules provides options to simplify dependency resolution.
You can still use programs.neovim.extraPackages, programs.neovim.extraPython3Packages, programs.neovim.extraLuaPackages provided by home-manager.

nvimdots.nix
{pkgs, ...}:
{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;
    withBuildTools = true;
    extraRPackages = rPkgs: []; # need packages for R include `nixpkgs.rPackages`.
    extraHaskellPackages = hsPkgs: []; # need packages for haskell include `nixpkgs.haskellPackages`.
    extraDependentPackages = with pkgs; [] # need packages `lib`, `include`, and `pkgconfig`.
  };
}

How to check for required dependencies.
For binaries, patchelf --print-needed <binary> will list the required packages.
You can also check the library link status with ldd <binary>.
You can check the dependencies required at build time from the build log from the UI of mason.nvim opened with :Mason.
If it is included in nixpkgs, you may be able to find the package you need by looking at the *.nix sources.
What to do if you can't build with mason.nvim.
If it is provided by nixpkgs, you should be able to use it by adding the following settings.
https://github.com/ayamir/nvimdots/blob/6de8afe0fc4a6e53a9d64a013327d5482b6dbe99/lua/modules/configs/completion/lsp.lua#L143-L148
Usage for home-manager on non-NixOS
Unlike on NixOS, build tools and dependencies should be provided by the package manager provided by the distribution.
Of course, you can let nix resolve dependencies as they do for NixOS, but that can be a problem if you run the build command from within neovim.
Add the following to your flake.nix and nvimdots.nix.
Relogin to shell after home-manager switch --flake <flake-url>.

flake.nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.nvimdots.url = "github:ayamir/nvimdots";
  inputs.home-manager = {
    url = "github:nix-community/home-manager";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  homeConfigurations = {
    use-nvimdots = inputs.home-manager.lib.homeManagerConfiguration {
      inherit (inputs) nixpkgs;
      modules = [
        inputs.nvimdots.nixosModules.nvimdots
        (import ./nvimdots.nix)
      ];
      extraSpecialArgs = { inherit inputs; };
    };
  };
}

nvimdots.nix
{
  programs.neovim.nvimdots = {
    enable = true;
    # Comment out if resolving dependencies on `nix`.
    # setBuildEnv = true;
    # withBuildTools = true;
  };
}

Module Options
Please see https://github.com/misumisumi/nvimdots/blob/36d0b3d920f6e4e5397646ddb522f8c8aa43af93/nixos/neovim/default.nix#L11C1-L135C5
Additional information
No response

LGTM 🎉 I made some minor modifications, formatted the code, and added a new entry under Common Q&A.
@misumisumi I will add this to the Wiki and its title to README.md if the content looks good to u.

Raw markdown code

# NixOS Support (via home-manager)

This repository contains the `nixosModule` for home-manager using [flakes](https://nixos.wiki/wiki/Flakes). You may use this config right away as long as you are using [home-manager](https://github.com/nix-community/home-manager) to manage your environment.

## Prerequisites

Add the following snippets to your `flake.nix`, `configuration.nix` and `nvimdots.nix`.
Re-login to your shell after executing `nixos-rebuild switch --flake <flake-url>`.

- `flake.nix`

```nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.nvimdots.url = "github:ayamir/nvimdots";
  inputs.home-manager = {
    url = "github:nix-community/home-manager";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  nixosConfigurations = {
    use-nvimdots = inputs.nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [ # Other contents...
        inputs.home-manager.nixosModules.home-manager
        {
          home-manager.users."example-user" = {
            imports =
              [ inputs.nvimdots.nixosModules.nvimdots (import ./nvimdots.nix) ];
          };
          home-manager.extraSpecialArgs = { inherit inputs; };
        }
        ./configuration.nix
      ];
      specialArgs = { inherit inputs; };
    };
  };
}
```

- `configuration.nix`

```nix
{
  # Other contents...
  programs.nix-ld.enable = true;
}
```

- `nvimdots.nix`
  - `setBuildEnv`: If set, automatically configures your `$CPATH`, `$CPLUG_INCLUDE_PATH`, `$LD_LIBLARY_PATH`, `$LIBRARY_PATH`, `$NIX_LD_LIBRARY_PATH`, and `$PKG_CONFIG_PATH`.
  - `withBuildTools`: If set, automatically installs some build utils such as `gcc` and `pkg-config`.
  - **Caveats:**
    - These are required tooling so that `mason.nvim` and `nvim-treesitter` can work as expected.
    - They bundle with `neovim` and won't affect other sessions.

```nix
{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;
    withBuildTools = true;
  };
}
```

## Common Q&A

### `mason.nvim` cannot build some of the packages or execute those installed binaries

This is because some dependencies are not distributed along with the system - NixOS does not conform to the [Filesystem Hierarchy Standard (FHS)](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard), so some ingenuity is required.

This `nixosModules` provides several options to simplify dependency resolution. Nevertheless, you may still use `programs.neovim.extraPackages`, `programs.neovim.extraPython3Packages`, `programs.neovim.extraLuaPackages` provided by home-manager.

- `nvimdots.nix`

```nix
{pkgs, ...}:
{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;
    withBuildTools = true;
    extraRPackages = rPkgs: []; # configure packages for `R` (nixpkgs.rPackages).
    extraHaskellPackages = hsPkgs: []; # cofigure packages for haskell (nixpkgs.haskellPackages).
    extraDependentPackages = with pkgs; [] # properly setup directory hierarchy (`lib`, `include`, and `pkgconfig`).
  }
}
```

### How to check for the list of required dependencies

- For binaries, `patchelf --print-needed <binary>` will list the required packages.
- You can also check the information used by `ldd` in this package and/or dynamiclib with `ldd <binary>`.
- You can check the list of dependencies required during build time using the build log (via `mason.nvim`'s UI).
- If this dependency is included in `nixpkgs`, you may be able to find the package you need by looking at the `*.nix` sources.
- If you want to be on the safe side, here is a list of dependencies for all packages that have already been registered in `mason-registry`:

```console
libamd     <==> https://github.com/zship/libamd
libc       <==> https://www.gnu.org/software/libc/
  [OR] libc++ <==> https://libcxx.llvm.org/
libevent   <==> https://libevent.org/
libiconv   <==> https://www.gnu.org/software/libiconv/
libmsgpack <==> http://msgpack.org/
libz       <==> https://www.zlib.net/
libzstd    <==> https://github.com/facebook/zstd
```

### What to do if you can't build a package via `mason.nvim`

If it is provided by `nixpkgs`, you should be able to use it by adding the following settings. This is the same as setting up other packages that require external installation:

```lua
-- Setup lsps that are not supported by `mason.nvim` but supported by `nvim-lspconfig` here.
if vim.fn.executable("dart") == 1 then
	local _opts = require("completion.servers.dartls")
	local final_opts = vim.tbl_deep_extend("keep", _opts, opts)
	nvim_lsp.dartls.setup(final_opts)
end
```

## Using `home-manager` on operating systems other than NixOS

Unlike NixOS, the package manager that ships with your distribution should have provided those necessary build tools and dependencies. Of course, you may instruct `nix` to resolve those dependencies as they do for NixOS as well, but that can be a problem if you run the build command from within `neovim`.

To fix this, add the following snippets to your `flake.nix`, `configuration.nix` and `nvimdots.nix`.
Re-login to your shell after executing `nixos-rebuild switch --flake <flake-url>`.

- `flake.nix`

```nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.nvimdots.url = "github:ayamir/nvimdots";
  inputs.home-manager = {
    url = "github:nix-community/home-manager";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  homeConfigurations = {
    use-nvimdots = inputs.home-manager.lib.homeManagerConfiguration {
      inherit (inputs) nixpkgs;
      modules =
        [ inputs.nvimdots.nixosModules.nvimdots (import ./nvimdots.nix) ];
      extraSpecialArgs = { inherit inputs; };
    };
  };
}
```

- `nvimdots.nix`

```nix
{
  programs.neovim.nvimdots = {
    enable = true;
    # Comment out the following two lines if you're resolving dependencies via `nix`.
    # setBuildEnv = true;
    # withBuildTools = true;
  };
}
```

## Customize your experience

Have a look at [default.nix (selection)](https://github.com/misumisumi/nvimdots/blob/36d0b3d920f6e4e5397646ddb522f8c8aa43af93/nixos/neovim/default.nix#L11C1-L135C5) for more information.

Diff

diff --git a/91xg_8j9169dydct2k4r7yw80000gn.md b/91xg_8j9169dydct2k4r7yw80000gn.md
index 8bd923b..f461911 100644
--- a/91xg_8j9169dydct2k4r7yw80000gn.md
+++ b/91xg_8j9169dydct2k4r7yw80000gn.md
@@ -1,311 +1,165 @@
-# NixOS and home-manager
+# NixOS Support (via home-manager)

-This repository contains the nixosModule for home-manager provided by [flakes](https://nixos.wiki/wiki/Flakes).
-You can use it right away if you are using [home-manager](https://github.com/nix-community/home-manager) on NixOS as well as non-NixOS.
+This repository contains the `nixosModule` for home-manager using [flakes](https://nixos.wiki/wiki/Flakes). You may use this config right away as long as you are using [home-manager](https://github.com/nix-community/home-manager) to manage your environment.

-## Usage for NixOS.
+## Prerequisites

-Add the following to your `flake.nix`, `configuration.nix` and `nvimdots.nix`.
-Relogin to shell after `nixos-rebuild switch --flake <flake-url>`.
+Add the following snippets to your `flake.nix`, `configuration.nix` and `nvimdots.nix`.
+Re-login to your shell after executing `nixos-rebuild switch --flake <flake-url>`.

 - `flake.nix`

-  ```nix
-  {
-    inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
-    inputs.nvimdots.url = "github:ayamir/nvimdots";
-    inputs.home-manager = {
-      url = "github:nix-community/home-manager";
-      inputs.nixpkgs.follows = "nixpkgs";
+```nix
+{
+  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+  inputs.nvimdots.url = "github:ayamir/nvimdots";
+  inputs.home-manager = {
+    url = "github:nix-community/home-manager";
+    inputs.nixpkgs.follows = "nixpkgs";
+  };
+  nixosConfigurations = {
+    use-nvimdots = inputs.nixpkgs.lib.nixosSystem {
+      system = "x86_64-linux";
+      modules = [ # Other contents...
+        inputs.home-manager.nixosModules.home-manager
+        {
+          home-manager.users."example-user" = {
+            imports =
+              [ inputs.nvimdots.nixosModules.nvimdots (import ./nvimdots.nix) ];
+          };
+          home-manager.extraSpecialArgs = { inherit inputs; };
+        }
+        ./configuration.nix
+      ];
+      specialArgs = { inherit inputs; };
     };
-    nixosConfigurations = {
-        use-nvimdots = inputs.nixpkgs.lib.nixosSystem {
-          system = "x86_64-linux";
-          modules =
-            [ # ...
-              inputs.home-manager.nixosModules.home-manager {
-                home-manager.users."example-user" = {
-                  imports =
-                    [
-                      inputs.nvimdots.nixosModules.nvimdots
-                      (import ./nvimdots.nix)
-                    ];
-                };
-                home-manager.extraSpecialArgs = { inherit inputs; };
-              }
-              ./configuration.nix
-            ];
-          specialArgs = { inherit inputs; };
-        };
-      };
-    };
-  }
-  ```
+  };
+}
+```

 - `configuration.nix`

-  ```nix
-  {
-    # ...
-    programs.nix-ld.enable = true;
-    # ...
-  }
-  ```
-
-- `nvimdots.nix`
-
-  `setBuildEnv` provides `CPATH`, `CPLUG_INCLUDE_PATH`, `LD_LIBLARY_PATH`, `LIBRARY_PATH`, `NIX_LD_LIBRARY_PATH`, `PKG_CONFIG_PATH`.
-  `withBuildTools` provides basic build tools such as `gcc` and `pkg-config`.
-  These are required for `mason.nvim` and `nvim-treesitter` to work properly.
-  Also, they are only provided to `neovim` and do not affect the entire session.
-
-  ```nix
-  {
-    programs.neovim.nvimdots = {
-      enable = true;
-      setBuildEnv = true;
-      withBuildTools = true;
-    };
-  }
-  ```
-
-### `mason.nvim` cannot build packages or run installed binaries.
-
-This is because the dependencies are not included.
-NixOS does not conform to the [Filesystem Hierarchy Standard (FHS)](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard), so some ingenuity is required.
-This nixosModules provides options to simplify dependency resolution.
-You can still use `programs.neovim.extraPackages`, `programs.neovim.extraPython3Packages`, `programs.neovim.extraLuaPackages` provided by home-manager.
-
-- `nvimdots.nix`
-
-  ```nix
-  {pkgs, ...}:
-  {
-    programs.neovim.nvimdots = {
-      enable = true;
-      setBuildEnv = true;
-      withBuildTools = true;
-      extraRPackages = rPkgs: []; # need packages for R include `nixpkgs.rPackages`.
-      extraHaskellPackages = hsPkgs: []; # need packages for haskell include `nixpkgs.haskellPackages`.
-      extraDependentPackages = with pkgs; [] # need packages `lib`, `include`, and `pkgconfig`.
-    };
-  }
-  ```
-
-### How to check for required dependencies.
-
-For binaries, `patchelf --print-needed <binary>` will list the required packages.
-You can also check the library link status with `ldd <binary>`.
-You can check the dependencies required at build time from the build log from the UI of `mason.nvim` opened with `:Mason`.
-If it is included in `nixpkgs`, you may be able to find the package you need by looking at the `*.nix` sources.
-
-### What to do if you can't build with `mason.nvim`.
-
-If it is provided by `nixpkgs`, you should be able to use it by adding the following settings.
-
-https://github.com/ayamir/nvimdots/blob/6de8afe0fc4a6e53a9d64a013327d5482b6dbe99/lua/modules/configs/completion/lsp.lua#L143-L148
-
-## Usage for `home-manager` on non-NixOS
-
-Unlike on NixOS, build tools and dependencies should be provided by the package manager provided by the distribution.
-Of course, you can let `nix` resolve dependencies as they do for NixOS, but that can be a problem if you run the build command from within `neovim`.
-Add the following to your `flake.nix` and `nvimdots.nix`.
-Relogin to shell after `home-manager switch --flake <flake-url>`.
-
-- `flake.nix`
-
-  ```nix
-  {
-    inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
-    inputs.nvimdots.url = "github:ayamir/nvimdots";
-    inputs.home-manager = {
-      url = "github:nix-community/home-manager";
-      inputs.nixpkgs.follows = "nixpkgs";
-    };
-    homeConfigurations = {
-      use-nvimdots = inputs.home-manager.lib.homeManagerConfiguration {
-        inherit (inputs) nixpkgs;
-        modules = [
-          inputs.nvimdots.nixosModules.nvimdots
-          (import ./nvimdots.nix)
-        ];
-        extraSpecialArgs = { inherit inputs; };
-      };
-    };
-  }
-  ```
+```nix
+{
+  # Other contents...
+  programs.nix-ld.enable = true;
+}
+```

 - `nvimdots.nix`
+  - `setBuildEnv`: If set, automatically configures your `$CPATH`, `$CPLUG_INCLUDE_PATH`, `$LD_LIBLARY_PATH`, `$LIBRARY_PATH`, `$NIX_LD_LIBRARY_PATH`, and `$PKG_CONFIG_PATH`.
+  - `withBuildTools`: If set, automatically installs some build utils such as `gcc` and `pkg-config`.
+  - **Caveats:**
+    - These are required tooling so that `mason.nvim` and `nvim-treesitter` can work as expected.
+    - They bundle with `neovim` and won't affect other sessions.

-  ```nix
-  {
-    programs.neovim.nvimdots = {
-      enable = true;
-      # Comment out if resolving dependencies on `nix`.
-      # setBuildEnv = true;
-      # withBuildTools = true;
-    };
-  }
-  ```
-
-## Module Options
-
-Please see https://github.com/misumisumi/nvimdots/blob/36d0b3d920f6e4e5397646ddb522f8c8aa43af93/nixos/neovim/default.nix#L11C1-L135C5
-
-</details>
-
----
+```nix
+{
+  programs.neovim.nvimdots = {
+    enable = true;
+    setBuildEnv = true;
+    withBuildTools = true;
+  };
+}
+```

-# NixOS and home-manager
+## Common Q&A

-This repository contains the nixosModule for home-manager provided by [flakes](https://nixos.wiki/wiki/Flakes).
-You can use it right away if you are using [home-manager](https://github.com/nix-community/home-manager) on NixOS as well as non-NixOS.
-
-## Usage for NixOS.
-
-Add the following to your `flake.nix`, `configuration.nix` and `nvimdots.nix`.
-Relogin to shell after `nixos-rebuild switch --flake <flake-url>`.
-
-- `flake.nix`
-
-  ```nix
-  {
-    inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
-    inputs.nvimdots.url = "github:ayamir/nvimdots";
-    inputs.home-manager = {
-      url = "github:nix-community/home-manager";
-      inputs.nixpkgs.follows = "nixpkgs";
-    };
-    nixosConfigurations = {
-        use-nvimdots = inputs.nixpkgs.lib.nixosSystem {
-          system = "x86_64-linux";
-          modules =
-            [ # ...
-              inputs.home-manager.nixosModules.home-manager {
-                home-manager.users."example-user" = {
-                  imports =
-                    [
-                      inputs.nvimdots.nixosModules.nvimdots
-                      (import ./nvimdots.nix)
-                    ];
-                };
-                home-manager.extraSpecialArgs = { inherit inputs; };
-              }
-              ./configuration.nix
-            ];
-          specialArgs = { inherit inputs; };
-        };
-      };
-    };
-  }
-  ```
+### `mason.nvim` cannot build some of the packages or execute those installed binaries

-- `configuration.nix`
+This is because some dependencies are not distributed along with the system - NixOS does not conform to the [Filesystem Hierarchy Standard (FHS)](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard), so some ingenuity is required.

-  ```nix
-  {
-    # ...
-    programs.nix-ld.enable = true;
-    # ...
-  }
-  ```
+This `nixosModules` provides several options to simplify dependency resolution. Nevertheless, you may still use `programs.neovim.extraPackages`, `programs.neovim.extraPython3Packages`, `programs.neovim.extraLuaPackages` provided by home-manager.

 - `nvimdots.nix`

-  `setBuildEnv` provides `CPATH`, `CPLUG_INCLUDE_PATH`, `LD_LIBLARY_PATH`, `LIBRARY_PATH`, `NIX_LD_LIBRARY_PATH`, `PKG_CONFIG_PATH`.
-  `withBuildTools` provides basic build tools such as `gcc` and `pkg-config`.
-  These are required for `mason.nvim` and `nvim-treesitter` to work properly.
-  Also, they are only provided to `neovim` and do not affect the entire session.
-
-  ```nix
-  {
-    programs.neovim.nvimdots = {
-      enable = true;
-      setBuildEnv = true;
-      withBuildTools = true;
-    };
+```nix
+{pkgs, ...}:
+{
+  programs.neovim.nvimdots = {
+    enable = true;
+    setBuildEnv = true;
+    withBuildTools = true;
+    extraRPackages = rPkgs: []; # configure packages for `R` (nixpkgs.rPackages).
+    extraHaskellPackages = hsPkgs: []; # cofigure packages for haskell (nixpkgs.haskellPackages).
+    extraDependentPackages = with pkgs; [] # properly setup directory hierarchy (`lib`, `include`, and `pkgconfig`).
   }
-  ```
-
-### `mason.nvim` cannot build packages or run installed binaries.
-
-This is because the dependencies are not included.
-NixOS does not conform to the [Filesystem Hierarchy Standard (FHS)](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard), so some ingenuity is required.
-This nixosModules provides options to simplify dependency resolution.
-You can still use `programs.neovim.extraPackages`, `programs.neovim.extraPython3Packages`, `programs.neovim.extraLuaPackages` provided by home-manager.
+}
+```

-- `nvimdots.nix`
+### How to check for the list of required dependencies

-  ```nix
-  {pkgs, ...}:
-  {
-    programs.neovim.nvimdots = {
-      enable = true;
-      setBuildEnv = true;
-      withBuildTools = true;
-      extraRPackages = rPkgs: []; # need packages for R include `nixpkgs.rPackages`.
-      extraHaskellPackages = hsPkgs: []; # need packages for haskell include `nixpkgs.haskellPackages`.
-      extraDependentPackages = with pkgs; [] # need packages `lib`, `include`, and `pkgconfig`.
-    };
-  }
-  ```
+- For binaries, `patchelf --print-needed <binary>` will list the required packages.
+- You can also check the information used by `ldd` in this package and/or dynamiclib with `ldd <binary>`.
+- You can check the list of dependencies required during build time using the build log (via `mason.nvim`'s UI).
+- If this dependency is included in `nixpkgs`, you may be able to find the package you need by looking at the `*.nix` sources.
+- If you want to be on the safe side, here is a list of dependencies for all packages that have already been registered in `mason-registry`:

-### How to check for required dependencies.
+```console
+libamd     <==> https://github.com/zship/libamd
+libc       <==> https://www.gnu.org/software/libc/
+  [OR] libc++ <==> https://libcxx.llvm.org/
+libevent   <==> https://libevent.org/
+libiconv   <==> https://www.gnu.org/software/libiconv/
+libmsgpack <==> http://msgpack.org/
+libz       <==> https://www.zlib.net/
+libzstd    <==> https://github.com/facebook/zstd
+```

-For binaries, `patchelf --print-needed <binary>` will list the required packages.
-You can also check the library link status with `ldd <binary>`.
-You can check the dependencies required at build time from the build log from the UI of `mason.nvim` opened with `:Mason`.
-If it is included in `nixpkgs`, you may be able to find the package you need by looking at the `*.nix` sources.
+### What to do if you can't build a package via `mason.nvim`

-### What to do if you can't build with `mason.nvim`.
+If it is provided by `nixpkgs`, you should be able to use it by adding the following settings. This is the same as setting up other packages that require external installation:

-If it is provided by `nixpkgs`, you should be able to use it by adding the following settings.
+```lua
+-- Setup lsps that are not supported by `mason.nvim` but supported by `nvim-lspconfig` here.
+if vim.fn.executable("dart") == 1 then
+	local _opts = require("completion.servers.dartls")
+	local final_opts = vim.tbl_deep_extend("keep", _opts, opts)
+	nvim_lsp.dartls.setup(final_opts)
+end
+```

-https://github.com/ayamir/nvimdots/blob/6de8afe0fc4a6e53a9d64a013327d5482b6dbe99/lua/modules/configs/completion/lsp.lua#L143-L148
+## Using `home-manager` on operating systems other than NixOS

-## Usage for `home-manager` on non-NixOS
+Unlike NixOS, the package manager that ships with your distribution should have provided those necessary build tools and dependencies. Of course, you may instruct `nix` to resolve those dependencies as they do for NixOS as well, but that can be a problem if you run the build command from within `neovim`.

-Unlike on NixOS, build tools and dependencies should be provided by the package manager provided by the distribution.
-Of course, you can let `nix` resolve dependencies as they do for NixOS, but that can be a problem if you run the build command from within `neovim`.
-Add the following to your `flake.nix` and `nvimdots.nix`.
-Relogin to shell after `home-manager switch --flake <flake-url>`.
+To fix this, add the following snippets to your `flake.nix`, `configuration.nix` and `nvimdots.nix`.
+Re-login to your shell after executing `nixos-rebuild switch --flake <flake-url>`.

 - `flake.nix`

-  ```nix
-  {
-    inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
-    inputs.nvimdots.url = "github:ayamir/nvimdots";
-    inputs.home-manager = {
-      url = "github:nix-community/home-manager";
-      inputs.nixpkgs.follows = "nixpkgs";
-    };
-    homeConfigurations = {
-      use-nvimdots = inputs.home-manager.lib.homeManagerConfiguration {
-        inherit (inputs) nixpkgs;
-        modules = [
-          inputs.nvimdots.nixosModules.nvimdots
-          (import ./nvimdots.nix)
-        ];
-        extraSpecialArgs = { inherit inputs; };
-      };
+```nix
+{
+  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+  inputs.nvimdots.url = "github:ayamir/nvimdots";
+  inputs.home-manager = {
+    url = "github:nix-community/home-manager";
+    inputs.nixpkgs.follows = "nixpkgs";
+  };
+  homeConfigurations = {
+    use-nvimdots = inputs.home-manager.lib.homeManagerConfiguration {
+      inherit (inputs) nixpkgs;
+      modules =
+        [ inputs.nvimdots.nixosModules.nvimdots (import ./nvimdots.nix) ];
+      extraSpecialArgs = { inherit inputs; };
     };
-  }
-  ```
+  };
+}
+```

 - `nvimdots.nix`

-  ```nix
-  {
-    programs.neovim.nvimdots = {
-      enable = true;
-      # Comment out if resolving dependencies on `nix`.
-      # setBuildEnv = true;
-      # withBuildTools = true;
-    };
-  }
-  ```
+```nix
+{
+  programs.neovim.nvimdots = {
+    enable = true;
+    # Comment out the following two lines if you're resolving dependencies via `nix`.
+    # setBuildEnv = true;
+    # withBuildTools = true;
+  };
+}
+```

-## Module Options
+## Customize your experience

-Please see https://github.com/misumisumi/nvimdots/blob/36d0b3d920f6e4e5397646ddb522f8c8aa43af93/nixos/neovim/default.nix#L11C1-L135C5
+Have a look at [default.nix (selection)](https://github.com/misumisumi/nvimdots/blob/36d0b3d920f6e4e5397646ddb522f8c8aa43af93/nixos/neovim/default.nix#L11C1-L135C5) for more information.

NixOS Support (via home-manager)
This repository contains the nixosModule for home-manager using flakes. You may use this config right away as long as you are using home-manager to manage your environment.
Prerequisites
Add the following snippets to your flake.nix, configuration.nix and nvimdots.nix.
Re-login to your shell after executing nixos-rebuild switch --flake <flake-url>.

flake.nix

{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.nvimdots.url = "github:ayamir/nvimdots";
  inputs.home-manager = {
    url = "github:nix-community/home-manager";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  nixosConfigurations = {
    use-nvimdots = inputs.nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [ # Other contents...
        inputs.home-manager.nixosModules.home-manager
        {
          home-manager.users."example-user" = {
            imports =
              [ inputs.nvimdots.nixosModules.nvimdots (import ./nvimdots.nix) ];
          };
          home-manager.extraSpecialArgs = { inherit inputs; };
        }
        ./configuration.nix
      ];
      specialArgs = { inherit inputs; };
    };
  };
}

configuration.nix

{
  # Other contents...
  programs.nix-ld.enable = true;
}

nvimdots.nix

setBuildEnv: If set, automatically configures your $CPATH, $CPLUG_INCLUDE_PATH, $LD_LIBLARY_PATH, $LIBRARY_PATH, $NIX_LD_LIBRARY_PATH, and $PKG_CONFIG_PATH.
withBuildTools: If set, automatically installs some build utils such as gcc and pkg-config.
Caveats:

These are required tooling so that mason.nvim and nvim-treesitter can work as expected.
They bundle with neovim and won't affect other sessions.

{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;
    withBuildTools = true;
  };
}

Common Q&A
mason.nvim cannot build some of the packages or execute those installed binaries
This is because some dependencies are not distributed along with the system - NixOS does not conform to the Filesystem Hierarchy Standard (FHS), so some ingenuity is required.
This nixosModules provides several options to simplify dependency resolution. Nevertheless, you may still use programs.neovim.extraPackages, programs.neovim.extraPython3Packages, programs.neovim.extraLuaPackages provided by home-manager.

nvimdots.nix

{pkgs, ...}:
{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;
    withBuildTools = true;
    extraRPackages = rPkgs: []; # configure packages for `R` (nixpkgs.rPackages).
    extraHaskellPackages = hsPkgs: []; # cofigure packages for haskell (nixpkgs.haskellPackages).
    extraDependentPackages = with pkgs; [] # properly setup directory hierarchy (`lib`, `include`, and `pkgconfig`).
  }
}

How to check for the list of required dependencies

For binaries, patchelf --print-needed <binary> will list the required packages.
You can also check the information used by ldd in this package and/or dynamiclib with ldd <binary>.
You can check the list of dependencies required during build time using the build log (via mason.nvim's UI).
If this dependency is included in nixpkgs, you may be able to find the package you need by looking at the *.nix sources.
If you want to be on the safe side, here is a list of dependencies for all packages that have already been registered in mason-registry:

libamd     <==> https://github.com/zship/libamd
libc       <==> https://www.gnu.org/software/libc/
  [OR] libc++ <==> https://libcxx.llvm.org/
libevent   <==> https://libevent.org/
libiconv   <==> https://www.gnu.org/software/libiconv/
libmsgpack <==> http://msgpack.org/
libz       <==> https://www.zlib.net/
libzstd    <==> https://github.com/facebook/zstd

What to do if you can't build a package via mason.nvim
If it is provided by nixpkgs, you should be able to use it by adding the following settings. This is the same as setting up other packages that require external installation:
-- Setup lsps that are not supported by `mason.nvim` but supported by `nvim-lspconfig` here.
if vim.fn.executable("dart") == 1 then
	local _opts = require("completion.servers.dartls")
	local final_opts = vim.tbl_deep_extend("keep", _opts, opts)
	nvim_lsp.dartls.setup(final_opts)
end

Using home-manager on operating systems other than NixOS
Unlike NixOS, the package manager that ships with your distribution should have provided those necessary build tools and dependencies. Of course, you may instruct nix to resolve those dependencies as they do for NixOS as well, but that can be a problem if you run the build command from within neovim.
To fix this, add the following snippets to your flake.nix, configuration.nix and nvimdots.nix.
Re-login to your shell after executing nixos-rebuild switch --flake <flake-url>.

flake.nix

{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.nvimdots.url = "github:ayamir/nvimdots";
  inputs.home-manager = {
    url = "github:nix-community/home-manager";
    inputs.nixpkgs.follows = "nixpkgs";
  };
  homeConfigurations = {
    use-nvimdots = inputs.home-manager.lib.homeManagerConfiguration {
      inherit (inputs) nixpkgs;
      modules =
        [ inputs.nvimdots.nixosModules.nvimdots (import ./nvimdots.nix) ];
      extraSpecialArgs = { inherit inputs; };
    };
  };
}

nvimdots.nix

{
  programs.neovim.nvimdots = {
    enable = true;
    # Comment out the following two lines if you're resolving dependencies via `nix`.
    # setBuildEnv = true;
    # withBuildTools = true;
  };
}

Customize your experience
Have a look at default.nix (selection) for more information.

use-nvimdots may give a wrong impression to new Nix users, change it to "username@hostname", as this is Home Manager configurations.

All the homeConfigurations are not inside outputs (they should be so as usual, IMO).

Maybe we don't need to provide such a rich configuration example as this may make user more confused, the Nix configurations are changeable and flexible, there are many ways to achieve the same result, but the core is the same. Just write 'You have to install Home Manager first, then add these to flake.nix'

inputs = {
  # ...
  nvimdots.url = "github:ayamir/nvimdots";
  # ...
};

and something others separately.

Argee the first point as @vollowx said, but others LGTM.

Sorry for the late reply.
@Jint-lzxy Thank you for the correction.
@vollowx  Explanation I may have been a little overprotective.
You forgot outputs.

Maybe we don't need to provide such a rich configuration example as this may make user more confused,..

Delete the section Using home-manager on operating systems other than NixOS, change flake.nix in NixOS Support (via home-manager) as you suggested and add a little explanation.
The Q&A should be fine as is.
I forgot to mention the dotnet module, so I will add it.

Raw markdown code (NixOS Support)

# NixOS Support (via home-manager)

This repository contains the `nixosModule` for [home-manager](https://github.com/nix-community/home-manager) using [flakes](https://nixos.wiki/wiki/Flakes).
Whether NixOS or Non-NixOS, you can use this configuration out of the box, as long as you use home-manager to manage your environment.

## Prerequisites

Add URL `home-manager` and `nvimdots` to `inputs` in your `flake.nix`.
Next, add the following snippets to your `configuration.nix` and `nvimdots.nix`.
Re-login to your shell after executing `nixos-rebuild switch --flake <flake-url>` or `home-manager switch --flake <flake-url>`.

- `flake.nix`

```nix
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nvimdots.url = "github:ayamir/nvimdots";
    home-manager = {
      url = "github:nix-community/home-manager";
      nixpkgs.follows = "nixpkgs";
    };
    ...
  };
  ...
}
```

- `configuration.nix`
  - This is only required on NixOS. [Q&A for this details](#mason.nvim-cannot-build-some-of-the-packages-or-execute-those-installed-binaries)

```nix
{
  # Other contents...
  programs.nix-ld.enable = true;
  ...
}
```

- `nvimdots.nix`
  - `setBuildEnv`: If set, automatically configures your `$CPATH`, `$CPLUG_INCLUDE_PATH`, `$LD_LIBLARY_PATH`, `$LIBRARY_PATH`, `$NIX_LD_LIBRARY_PATH`, and `$PKG_CONFIG_PATH`.
  - `withBuildTools`: If set, automatically installs some build utils such as `gcc` and `pkg-config`.
  - **Caveats:**
    - `setBuildEnv` and `withBuildTools` is only required on NixOS. [Q&A for this details](#mason.nvim-cannot-build-some-of-the-packages-or-execute-those-installed-binaries)
    - These are required tooling so that `mason.nvim` and `nvim-treesitter` can work as expected.
    - They bundle with `neovim` and won't affect other sessions.

```nix
{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;  # Only need for NixOS
    withBuildTools = true; # Only need for NixOS
  };
}
```

Raw markdown code (dotnet)

# `dotnet` installation and environment variables

This repository provides `programs.dotnet` to manage `dotnet` installation and environment variables inspired by `programs.java` in `home-manager`.
See [dotnet/default.nix](https://github.com/misumisumi/nvimdots/blob/nixos-support-using-mason/nixos/dotnet/default.nix) for options.

NixOS Support (via home-manager)
This repository contains the nixosModule for home-manager using flakes.
Whether NixOS or Non-NixOS, you can use this configuration out of the box, as long as you use home-manager to manage your environment.
Prerequisites
Add URL home-manager and nvimdots to inputs in your flake.nix.
Next, add the following snippets to your configuration.nix and nvimdots.nix.
Re-login to your shell after executing nixos-rebuild switch --flake <flake-url> or home-manager switch --flake <flake-url>.

flake.nix

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nvimdots.url = "github:ayamir/nvimdots";
    home-manager = {
      url = "github:nix-community/home-manager";
      nixpkgs.follows = "nixpkgs";
    };
    ...
  };
  ...
}

configuration.nix

This is only required on NixOS. Q&A for this details

{
  # Other contents...
  programs.nix-ld.enable = true;
  ...
}

nvimdots.nix

setBuildEnv: If set, automatically configures your $CPATH, $CPLUG_INCLUDE_PATH, $LD_LIBLARY_PATH, $LIBRARY_PATH, $NIX_LD_LIBRARY_PATH, and $PKG_CONFIG_PATH.
withBuildTools: If set, automatically installs some build utils such as gcc and pkg-config.
Caveats:

setBuildEnv and withBuildTools is only required on NixOS. Q&A for this details
These are required tooling so that mason.nvim and nvim-treesitter can work as expected.
They bundle with neovim and won't affect other sessions.

{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;  # Only need for NixOS
    withBuildTools = true; # Only need for NixOS
  };
}

dotnet installation and environment variables
This repository provides programs.dotnet to manage dotnet installation and environment variables inspired by programs.java in home-manager.
See dotnet/default.nix for options.

Thanks for all your effort, that's much better.
I still have a idea in my mind, maybe we can have a h3 section "If you are new to Nix", and we can give a more detailed example configuration, links of related stuffs' documents and some dotfiles using this, for the purpose of letting them know the structure. (Real dotfiles are better than pure document for new people to realize).

Real dotfiles are better than pure document for new people to realize

Totally agree. It is difficult to understand intuitively with only documentation.
IMO, flake.nix can contain a bare-bones home-manager configuration to get nvimdots working.
It might be a bit of a departure from the point of view of providing nvimdots, though.

Yes, I mean, some links to somebody who is using the flakes. Or a whole example.nix. As for myself (also as a new one to Nix), the first thing I do is to find a usable and nice structure to put and manager the configurations, which spent me weeks, and in this time my mind is in a mind-storm :joy_cat:
So we can look this as a ref, it's pretty clear.

Starting with this review, language support has been limited to Haskell.
So I added an explanation on how to add dependencies to the Q&A.

Raw markdown code

### `mason.nvim` cannot build some of the packages or execute those installed binaries

This is because some dependencies are not distributed along with the system - NixOS does not conform to the [Filesystem Hierarchy Standard (FHS)](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard), so some ingenuity is required.

This `nixosModules` provides several options to simplify dependency resolution. Nevertheless, you may still use `programs.neovim.extraPackages`, `programs.neovim.extraPython3Packages`, `programs.neovim.extraLuaPackages` provided by home-manager.

- `nvimdots.nix`

```nix
{pkgs, ...}:
{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;
    withBuildTools = true;
    withHaskell = true; # if use Haskell.
    extraHaskellPackages = hsPkgs: []; # cofigure packages for haskell (nixpkgs.haskellPackages).
    extraDependentPackages = with pkgs; [] # properly setup directory hierarchy (`lib`, `include`, and `pkgconfig`).
  }
}
```

### How do you add dependencies?

You include the necessary packages for building, including `include`, `lib`, and `pkgconfig` requirements, in the `programs.neovim.extraDependentPackages`.
Such as the runtime dependencies, you add package to `home.packages` or `programs.neovim.extraPackages`.
`home.packages` is user scope and `programs.neovim.extraPackages` is neovim scope.
Some languages may use wrapper.

```nix
{ pkgs, ... }:
{
  # Install to user env.
  home.packages = with pkgs; [
    go
  ];
  programs.neovim = {
    # Packages are only accessed from neovim
    nvimdots = {
      extraDependentPackages = with pkgs; [ icu ];
      # Haskell packages can be easily installed with `nvimdots` options.
      extraHaskellPackages = hs: with hs; [ ghcup ];
    };
    extraPackages = with pkgs; [
      go

      # Some languages require the use of wrapper.
      rWrapper.override
      {
        packages = with pkgs.rPackages;
          [ xml2 lintr roxygen2 ];
      }
    ];
    # Python and Lua packages can be easily installed with `home-manager` options.
    extraPython3Packages = ps: with ps; [
      numpy
    ];
  };
}

```

### Required packages for building `mason.nvim` package of each languages (as of 2023/08/13)

Not all `mason.nvim` packages are researched and tracked.
These are in flux.

| Language | extraPackages                                                                    | extraDependentPackages |
| -------- | -------------------------------------------------------------------------------- | ---------------------- |
| Go       | -                                                                                | `hunspell`             |
| PHP      | `php phpPackages.composer`                                                       | -                      |
| R        | `rWrapper.override { packages = with pkgs.rPackages; [ xml2 lintr roxygen2 ]; }` | -                      |
| Vala     | ` meson` `vala `                                                                 | `vala` `jsonrpc-glib`  |

mason.nvim cannot build some of the packages or execute those installed binaries
This is because some dependencies are not distributed along with the system - NixOS does not conform to the Filesystem Hierarchy Standard (FHS), so some ingenuity is required.
This nixosModules provides several options to simplify dependency resolution. Nevertheless, you may still use programs.neovim.extraPackages, programs.neovim.extraPython3Packages, programs.neovim.extraLuaPackages provided by home-manager.

nvimdots.nix

{pkgs, ...}:
{
  programs.neovim.nvimdots = {
    enable = true;
    setBuildEnv = true;
    withBuildTools = true;
    withHaskell = true; # if use Haskell.
    extraHaskellPackages = hsPkgs: []; # cofigure packages for haskell (nixpkgs.haskellPackages).
    extraDependentPackages = with pkgs; [] # properly setup directory hierarchy (`lib`, `include`, and `pkgconfig`).
  }
}

How do you add dependencies?
You include the necessary packages for building, including include, lib, and pkgconfig requirements, in the programs.neovim.extraDependentPackages.
Such as the runtime dependencies, you add package to home.packages or programs.neovim.extraPackages.
home.packages is user scope and programs.neovim.extraPackages is neovim scope.
Some languages may use wrapper.
{ pkgs, ... }:
{
  # Install to user env.
  home.packages = with pkgs; [
    go
  ];
  programs.neovim = {
    # Packages are only accessed from neovim
    nvimdots = {
      extraDependentPackages = with pkgs; [ icu ];
      # Haskell packages can be easily installed with `nvimdots` options.
      extraHaskellPackages = hs: with hs; [ ghcup ];
    };
    extraPackages = with pkgs; [
      go

      # Some languages require the use of wrapper.
      rWrapper.override
      {
        packages = with pkgs.rPackages;
          [ xml2 lintr roxygen2 ];
      }
    ];
    # Python and Lua packages can be easily installed with `home-manager` options.
    extraPython3Packages = ps: with ps; [
      numpy
    ];
  };
}

Required packages for building mason.nvim package of each languages (as of 2023/08/13)
Not all mason.nvim packages are researched and tracked.
These are in flux.

Language
extraPackages
extraDependentPackages

Go
-
hunspell

PHP
php phpPackages.composer
-

R
rWrapper.override { packages = with pkgs.rPackages; [ xml2 lintr roxygen2 ]; }
-

Vala
 meson vala
vala jsonrpc-glib


Bar Chart implementation (Vertical only)

A chart sample has been added to NS Core demo.
PR Checklist:

[x] I have tested this extensively and it does not break any existing behavior.
[x] I have added/updated examples and tests for any new behavior.
[ ] If this is a significant change, an issue has already been created where the problem / solution was discussed: [N/A, or add link to issue here]

PR Description
This is the first implementation of Vertical BarChart. This is only tested in Android, so I'm not sure how it works in iOS.
A bar chart sample is included in NS Core demo.

@DimitrisRK you are pretty awesome :D Will test that as soon as possible both on iOS and Android. (should work the same)

@DimitrisRK you are pretty awesome :D Will test that as soon as possible both on iOS and Android. (should work the same)

Thank you. I found your efforts inspiring, so I decided to give you a hand. :)
I'll also try to help more in the future.
One thing that bothers me about iOS compatibility. For matrix to convert bar point values to pixels, it was essential that given buffer used a native array. That is why I used method createNativeArray: https://github.com/nativescript-community/ui-chart/blob/master/src/charting/utils/Utils.ts#L721
However, even though there is native support for Android, method will return a vanilla JS array in the case of iOS. I'm not sure whether this is right or not, so any possible issues will show up during testing.
P.S. When done testing (provided that everything goes smooth), a new release would be helpful. I'm developing few apps that make use of visualizations so it's a good chance to test things more.

Sure about the new release I can add you as a contributor so you can create "next" releases

@DimitrisRK awesome works perfectly both on iOS and Android

Glad to hear that, seems I underestimated nativescript-canvas a bit. It's truly powerful. :)
By the way, a new package version would be really helpful now. 0.0.25 is missing a bit of support for plain NativeScript apps which I added in my previous PR.

@DimitrisRK yes it is pretty powerful. There are some crazy possibilities, next one on my list: pdf creation using canvas...
Just pushed 0.0.26.
Thanks


ENH: Support Skysat

Skysat is a sensor potentially used in CEMS.
It would be great to support it.

[ ] Add the support of PlanetScope 8 bands in the same time


Release1.1.0 - dev

PR checklist

[ ] This comment contains a description of changes (with reason).
[ ] If you've fixed a bug or added code that should be tested, add tests!
[ ] If you've added a new tool - have you followed the pipeline conventions in the contribution docs
[ ] Make sure your code lints (nf-core lint).
[ ] Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
[ ] Usage Documentation in docs/usage.md is updated.
[ ] Output Documentation in docs/output.md is updated.
[ ] CHANGELOG.md is updated.
[ ] README.md is updated (including new tool citations and authors/contributors).

@gq1 : is a command-line / samplesheet that was working with version 1.0 still working ? (just checking if a minor version bump is appropriate).

@gq1 : is a command-line / samplesheet that was working with version 1.0 still working ? (just checking if a minor version bump is appropriate).

Still working if the bam/cram files are aligned, otherwise  --align flag needed. I think 1.1.0 ok.


Fix create zip tool - path argument

Fix
this is fixing wrong type passed when using create_zip tool with --path argument.
Close #2451

Task linked: OP-2255 OpenPype: tools/create_zip.ps1 --path flag fails with TypeError: Path must be str or Path

@antirotor Nice! It works, but not entirely it seems.
I ran this:
.\create_zip.ps1 --path P:\pipeline\openpype\versions\staging

And it put the zip file a folder too high?
"P:\pipeline\openpype\versions\openpype-v3.8.0-nightly.3.zip"

Nice! It works, but not entirely it seems.

My bad, I didn't take into account that path can be file or directory. Should be fixed.


feat: adds overview of roles associated with available endpoints

name: Add overview of available roles associated to the available endpoints
about: 'template for PRs that ensures basic information is provided'
title: '(feat)(doc): adds overview of roles associated with available endpoints'
Description
Enhances the README.md with an overview associating the available roles of MIW to the (currently) available endpoints of MIW.

@carslen or @the-tatanka please review and merge if possible.

We are both on vacation.
@SebastianBezold please take over

Thank you for the quick help during your vacation @the-tatanka!
And thank you for taking over @SebastianBezold!


while updating the user, getting error if the github value is passed empty

Go to update user, search for an id.
Delete the value for the github URL, or pass the value as empty. Getting an error stating
Error: Unprocessable Entity

Fixed!!
After adding the following lines of code to users_schemas file
@validator("github_profile_url", "profile_picture_url", "linkedin_profile_url", pre=True, always=True)
def empty_string_to_null(cls, gpl):
gpl = gpl.strip() if isinstance(gpl, str) else gpl
return None if gpl == "" else gpl


Future plans for debugger integration?

Hi, are there any plans to make this integrateable into e.g. x64dbg? That would be sick.

Yes, I want to improve the driver interface so that it easier to use VivienneVMM in debuggers, RCE tools, etc. I'm working on EPT breakpoints which are meant to be used by user mode gui applications.


Switch claim_pragma test from shell to C++ and make ExtractorConfig more testable [phab:D1204]

Created by shahms at 2016-12-29 22:30:03:
Try to remove some of the egregious shell abuse.  This just picks a test which as caused problems in the past to start.
Remove unused and deleted claim_main.UNIT from data dependencies

fromberger commented inline (context lost during migration) at 2016-12-29 22:49:28:
Please document the return value, too: Reports whether extraction succeeded. perhaps

fromberger accepted this revision at 2016-12-29 22:49:28

shahms wrote at 2016-12-29 22:52:34:

address comments

shahms wrote at 2016-12-29 22:52:41:
Done.

shahms closed via commit 73d46cb21385689fd9e86b879d1c7d647ad3ccb1 at 2016-12-29 23:04:12


Rate limit: Network

Provide a rate limit (global and server) to limit network traffic.
This is for backup

@shikharish It is about making sure that pgmoneta only send network requests to the server at the defined rate limit - f.ex. 512 kb/s.
Follow backup.c, wf_backup.c and friends

@jesperpedersen I have been trying to solve this issue for the past week and had a few questions. The solution is not clear to me yet. I wanted to get some of your inputs.

I believe the implementation would be in the pgmoneta_consume_copy_stream_start() function(or pgmoneta_read_copy_stream() to be precise)?
I think the logic would be to let pgmoneta backup data with as much bandwidth as possible at the start of an interval, and then block transfer for a calculated amount of time so as to average out the desired rate. Although I am not sure exactly how to implement this right now.

Yes, you have to work your way through wf_backup.c and make sure that f.ex. pgmoneta_consume_data_row_messages() supports the rate limit. However, note that pgmoneta_consume_data_row_messages() is also used by wal.c which should not be rate limited.
Yeah, you need to define a "window" and then measure the bytes received within it, maybe you can get some ideas from https://stackoverflow.com/questions/13557858/c-linux-bandwidth-throttling-of-application

It is to get the entire message. You can read about the message formats here
https://www.postgresql.org/docs/devel/protocol-message-formats.html

https://www.postgresql.org/docs/current/protocol-replication.html

A rate limit utility has been implemented in this PR. You can use the token bucket algorithm from that implementation as a method to enforce this network limit.


Unable to create context

Hi,
Thank you for this Sample. It has helped a lot!
I am having an issue though. The app builds and runs fine until I try scan an image.
Log:
default scene
2016-09-14 12:24:53.142 Vuforia Swift[1549:1012606] INFO/AR(1549) 2016-09-15 12:24:53: Vuforia SDK version 6.0.112
2016-09-14 12:24:53.245 Vuforia Swift[1549:1012606] Rendering mode set to: OpenGL ES 2.0
2016-09-14 12:24:53.291 Vuforia Swift[1549:1012606] Rendering mode set to: OpenGL ES 2.0
2016-09-14 12:24:53.293 Vuforia Swift[1549:1012444] DEBUG/AR(1549) UIView has CAEAGLLayer layer class
2016-09-14 12:24:53.293 Vuforia Swift[1549:1012444] DEBUG/AR(1549) UIView responds to selector renderFrameVuforia
2016-09-14 12:24:53.331 Vuforia Swift[1549:1012635] loadObjectTrackerDataSet (Stones.xml)
2016-09-14 12:24:53.333 Vuforia Swift[1549:1012635] INFO/AR(1549) 2016-09-15 12:24:53: ObjectTracker: Successfully created dataset
2016-09-14 12:24:53.334 Vuforia Swift[1549:1012635] INFO: successfully loaded data set
2016-09-14 12:24:53.388 Vuforia Swift[1549:1012635] Successfully activated data set.
did finish preparing

2016-09-14 12:24:53.415 Vuforia Swift[1549:1012635] VideoBackgroundConfig: size: 750,1334
2016-09-14 12:24:53.416 Vuforia Swift[1549:1012635] VideoMode:w=1280 h=720
2016-09-14 12:24:53.416 Vuforia Swift[1549:1012635] width=750.000 height=1334.000
2016-09-14 12:24:53.417 Vuforia Swift[1549:1012635] ViewPort: X,Y: 0.0,0.0 Size X,Y:750.0,1334.0
2016-09-14 12:24:53.693 Vuforia Swift[1549:1012492] Deleting old image data @ 0x0
2016-09-14 12:24:53.693 Vuforia Swift[1549:1012492] Created new image data buffer @ 0x106838000 w/ 1382400 bytes
stones scene
2016-09-14 12:24:56.750 Vuforia Swift[1549:1012444] SceneKit: error, Unable to create context
2016-09-14 12:24:56.751 Vuforia Swift[1549:1012444] SceneKit: error, Unable to create context

I'm also wondering if it's possible to use my own camera manager using this: https://github.com/imaginary-cloud/CameraManager
Again, thank you :)
PS. If you would like any of the files I've used for target, let me know... I didn't use yours (as they did not come with the zip I downloaded)

@byroncoetsee
Thank you for reporting.
I got same error log, but this sample works fine.
It seems to be happen in SceneKit...

I'm also wondering if it's possible to use my own camera manager using this:

It's maybe difficult to implement, because Vuforia SDK has own camera manager.

PS. If you would like any of the files I've used for target, let me know... I didn't use yours (as they did not come with the zip I downloaded)

Sorry, I can't bundle vuforia's sample target.

Hey thank you for the response :)
Could you maybe give me a rough idea of where this SceneKit error could be coming in? Where does the actual image get drawn?
You say you are also getting the SceneKit: error, Unable to create context error or not?

Could you maybe give me a rough idea of where this SceneKit error could be coming in? Where does the actual image get drawn?

It seems to be happen in [_renderer renderAtTime:] only first time, after setting scene to renderer.
This sample is drawn frame at VuforiaEAGLView's renderFrameVuforia method.

You say you are also getting the SceneKit: error, Unable to create context error or not?

Yes, but works fine.

It seems if I comment out _renderer.showsStatistics = YES; within setupRenderer, the errors go away... I'm still not getting any object overlaid on screen though.
I am using the stones from "http://developer.vuforia.com/sites/default/files/sample-apps/targets/stones.pdf" by the way

Finally got the box to show! Had to use a different XML file (even though the one I was using came from Vuforia sample)... Error still shows but I don't care - I'm just glad something is showing.
Thank you again from South Africa :D

👍

When i load and activate DataSet from background thread this error disappears.

@yshrkt do you think we will ever see this written in Swift? Or a more modern class used like GLKView instead of EAGLView... Just wondering :)

The reason I ask is, I'm not very good with Objective-C and I'm bad at C++.
I'm trying to restart a scene (there is a video playing in that scene on a spritekit) when it goes off the screen and comes back on. Currently, the music keeps playing when the camera is turned away from the target. I need it to stop playing and restart when the camera faces the target again.
Current scene creation with video:
private func createVideoScene(with view: VuforiaEAGLView) -> SCNScene {
		let scene = SCNScene()

		// create the asset & player and grab the dimensions
		let path = NSBundle.mainBundle().pathForResource("VuforiaSizzleReel_1", ofType: "mp4")!
		let asset = AVAsset(URL: NSURL(fileURLWithPath: path))
		let size = asset.tracksWithMediaType(AVMediaTypeVideo)[0].naturalSize

		let player = AVPlayer(playerItem: AVPlayerItem(asset: asset))
		print(player.rate)

		// setup the video SKVideoNode
		let videoNode = SKVideoNode(AVPlayer: player)
		videoNode.size = size
		videoNode.position = CGPoint(x: size.width * 0.5, y: size.height * 0.5)

		// setup the SKScene that will house the video node
		let videoScene = SKScene(size: size)
		videoScene.addChild(videoNode)

		// create a wrapper ** note that the geometry doesn't matter, it happens with spheres and planes
		let videoWrapperNode = SCNNode(geometry: SCNBox(width: 2, height: 2, length: 2, chamferRadius: 0))
		videoWrapperNode.position = SCNVector3(x: 0, y: 0, z: 3)

		// set the material's diffuse contents to be the video scene we created above
		videoWrapperNode.geometry?.firstMaterial?.diffuse.contents = videoScene
		videoWrapperNode.geometry?.firstMaterial?.doubleSided = true

		// reorient the video properly
		videoWrapperNode.scale.y = -1

		// add it to our scene
		scene.rootNode.addChildNode(videoWrapperNode)
		return scene
	}

@byroncoetsee

@yshrkt do you think we will ever see this written in Swift? Or a more modern class used like GLKView instead of EAGLView... Just wondering :)

We needs call C++ function in EAGLView. so, can't write it in swift.😣
I wish to write more swifty, too.

I'm trying to restart a scene (there is a video playing in that scene on a spritekit) when it goes off the screen and comes back on. Currently, the music keeps playing when the camera is turned away from the target. I need it to stop playing and restart when the camera faces the target again.

In my situation, handled the event which turned away the target in VuforiaManagerDelegate's didUpdateWithState method.
For example:
func vuforiaManager(manager: VuforiaManager!, didUpdateWithState state: VuforiaState!) {
        if state.numberOfTrackableResults == 0 {
            // Not track any target.
            // In my case, animate for hideing.
            // In your case, stop video.
            player.stop()
            return
        }
        if state.trackableResultAtIndex(0).status == VuforiaTrackableResultStatus.Tracked {
            // Tracked some target.
            // In my case, animate for showing.
            // In your case, start video if needed.
            if !player.playing {
                player.play()
            }
        }
}

Yeah I actually solved it the exact same way eventually 💃 Thanks
Have you ever tried overlaying a video onto the scene? If so, did it play at normal speed? ...I've added a video with the following code:
private func createVideoScene(with view: VuforiaEAGLView) -> SCNScene {
		let scene = SCNScene()

		// create the asset & player and grab the dimensions
//		let path = NSBundle.mainBundle().pathForResource("VuforiaSizzleReel_1", ofType: "mp4")!
		let path = NSBundle.mainBundle().pathForResource("GS_Training", ofType: "mov")!
		let asset = AVAsset(URL: NSURL(fileURLWithPath: path))
		let size = asset.tracksWithMediaType(AVMediaTypeVideo)[0].naturalSize

		player = AVPlayer(playerItem: AVPlayerItem(asset: asset))
//		let player = AVPlayer(URL: NSURL(string: "https://inm-baobab-prod-eu-west-1.s3.amazonaws.com/public/inm/media/video/2016/09/02/61537094SansSouciGirlsSchool.mp4")!)
//		player!.addObserver(self, forKeyPath: "rate", options: [NSKeyValueObservingOptions.Initial, NSKeyValueObservingOptions.New], context: nil)

//		let playerLayer = AVPlayerLayer(player: player)
//		playerLayer.videoGravity = AVLayerVideoGravityResizeAspectFill
		//playerLayer.frame = CGRect(origin: CGPoint(x: size.width * 0.5, y: size.height * 0.5), size: size)

		// setup the video SKVideoNode
//		let videoNode = SKVideoNode(AVPlayer: player)
		let videoNode = SKVideoNode(videoURL: NSURL(fileURLWithPath: path))
		videoNode.size = size
		videoNode.position = CGPoint(x: size.width * 0.5, y: size.height * 0.5)
		currentVideoNode = videoNode

		// setup the SKScene that will house the video node
		let videoScene = SKScene(size: size)
		videoScene.addChild(videoNode)

		// create a wrapper ** note that the geometry doesn't matter, it happens with spheres and planes
		let videoWrapperNode = SCNNode(geometry: SCNPlane(width: 10, height: 8))
		videoWrapperNode.position = SCNVector3(x: 0, y: 0, z: 2)

		// set the material's diffuse contents to be the video scene we created above
		videoWrapperNode.geometry?.firstMaterial?.diffuse.contents =  videoScene
		videoWrapperNode.geometry?.firstMaterial?.doubleSided = true

		// reorient the video properly
		videoWrapperNode.scale.y = -1

		// add it to our scene
		videoWrapperNode.name = "videoWrapper"
		scene.rootNode.addChildNode(videoWrapperNode)

//		videoWrapperNode.runAction( SCNAction.repeatActionForever( SCNAction.rotateByAngle(CGFloat(M_PI * 2.0), aroundAxis: SCNVector3(x: 0, y: 1, z: 0), duration: 15.0 )))
		return scene
	}

(Sorry ignore all the comments and repeated code - still busy hacking it together 😜  )
The video plays at almost 5 times the speed it should but the sound plays correctly... Do you have any experience with this?

 If so, did it play at normal speed?

I have never use SKVideoNode.
Can your video play correctly using AVPlayerLayer?

I've tried AVPlayerLayer. If I add it to my scene (via SCNNode), it doesnt play the video - only the audio.
I'm currently trying to render the scene on main thread... Maybe that makes a difference somehow.

I tried your code. SKVideoNode seems to not work well.
Also AVPlayerLayer can use only macOS. (Sorry...)
You will need to create texture using AVPlayerItemVideoOutput.

@byroncoetsee I have the same problem.But there is no solution.Did you solve it？


Conductivity discrepancy at high molality

Hi there,
First of all, thank you so much for this fantastic tool! It's really helping us in our research.
Second, I wanted to see if you had a solution to this issue I'm seeing:
I would like to find the conductivity of high molality solution (1 - 3 molal) for potassium carbonate solution. When I use PHREEQC Interactive (the USGS software) directly I get results that match chemistry handbooks. So, for example, entering this input and running the Pitzer model:
SOLUTION 0
units mmol/kgw
pH 10 charge
temp 20
K 1000
C 500
END

Gives 73.3 mS/cm and pH = 11.79
BUT, when I use your phreeqpy function
pp = PhreeqPython(database='pitzer.dat')
solution = pp.add_solution({'units':'mol/kgw', #set the units (moles per kg of water)
                                 'pH': '10 charge',
                                 'temp': 20,
                                'K':2,
                                'C': 1
                           })
pH = solution.pH
cond = solution.sc
print('pH:',pH)
print('Cond:',cond)

I get 50.5 mS/cm and the same pH as above (11.79)
There is a substantial difference in conductivity and I'd really like to be able to reconcile that. The phreeqpy function is outputting a lower conductivity than physical measurements and than PHREEQC. Do you have any suggestions for why this may be happening? Note that at molality below ~0.5, I don't see the discrepancy anymore.
Thanks so much, and again, really appreciate this tool!

Thanks for your help here! And my mistake, I did try the correct code, but accidentally copied the wrong values into the example above! Sorry for the confusion!
I've redirected the database to point to the USGS repository, as you suggested, but I'm still somehow getting different values.
pp = PhreeqPython(database='C:/Program Files/USGS/phreeqc-3.6.2-15100-x64/database/pitzer.dat')
Just figured I'd respond here while I continue debugging in case you have any suggestions. Thanks again!

Ok, I just wanted to follow up and say that I'm still thoroughly stuck on this. I'm able to call different databases (SIT, minteq, etc.) from the USGS folder to confirm that the database loading function is working properly.
BUT, the following function in python which ostensibly should be using pitzer:
import phreeqpython

pp = phreeqpython.PhreeqPython(database='C:/Program Files/USGS/phreeqc-3.6.2-15100-x64/database/pitzer.dat') #initializes a database instance
pp.ip.debug = True
solution = pp.add_solution({'units':'mmol/kgw', #set the units (moles per kg of water)
                                 'pH': '10 charge',
                                 'temp': 20,
                                'K':1000,
                                'C': 500
                           })
out = solution.species #output variable
pH = solution.pH
cond = solution.sc
print('pH:',pH)
print('Cond:',cond)

results in:
SOLUTION 0
  units mmol/kgw
  pH 10 charge
  temp 20
  K 1000
  C 500
SAVE SOLUTION 0
END

pH: 11.789155189291549
Cond: 50457.00068057522

Note that the pH is exactly the same as yours, but the conductivity is still quite off. Do you have any further suggestions here?
If you run phreeqc.dat, what conductivity do you get for the same inputs? (I get: pH: 11.70069773360222
Cond: 55380.14209795132). Maybe that will help us narrow in on whether it's something with the databases or the functions that process them?

I see that you use an older version of Phreeqc (3.6.2). What happens if you try the example with the most recent pitzer.dat? Would you mind sending me your pitzer.dat and phreeqc.dat files so I can check if I get the same results?

databases to try.zip
Let me know what the outcome is for you! And thank you again for your help with this - it would be a great resource if we can get this to work properly.

Fantastic! I just ran this branch and got the exact same values as you!
pH: 11.789155189291549
Cond: 73290.5280343256
I'm not sure what was going on there, but this seems to have addressed it! Thank you! Do you think you'll update the master?

Hey there - just following up on this thread and wondering if you all pushed this update to the master? My colleague just pip (re)installed PhreeqPython and seems to be getting different outputs for the same underlying code as me.


DBZ-4260 blog post for Debezium UI SMT support

Adding blog posts for Debezium UI features - Single Message Transformations and Auto-creation of topics.  I will need to update these with links to the actual videos, once the Debezium YouTube channel is in place and videos are uploaded.

@mdrillin, @rk3rn3r, what's missing in order to un-draft this?

Ok, pushed an update with a few changes. The video URL also is the right one now. @rk3rn3r, the last thing for you to do is to make the video show up in the listing on the YT channel and then merge this PR. Thx!

And merging.


scipy.spatial : In incremental mode volume is not recomputed

This bug is quite straightforward, but I am unsure if it comes from the scipy bindings for volume I proposed some time last year or if it comes from Qhull itself.
Each time points are added to an incremental convex hull, its volume is not updated. Maybe even worse, the volume is not updated on closing the hull.
I wrote a quick test that compares:

Computing the hulls directly (:ok_hand:)
Computing incrementally (:thumbsdown:)
Computing incrementally with restart (:ok_hand:)

3 point hull volume : 0.5
3 point incremental hull volume : 0.5
4 point hull volume : 1.0
4 point incremental hull volume : 0.5
Incremental hull closed volume : 0.5
Incremental hull volume with restart : 1.0

Probably because qh_getarea has if (qh->hasAreaVolume) return; in
the beginning. This flag should be cleared in _QHull.volume_area.

Indeed this seems to have fixed it ! However, I think I introduced a bug somewhere else, I'll submit a PR when it's fixed and I have tests.


Add preliminary nomatch directives for simpl and Kami unfold database

This PR works towards addressing #31.
I have added simpl nomatch directives to definitions and fixpoints obviously containing a match, but it may be necessary to make another pass through and add simpl nomatch directives for any definitions referring to an identifier with a match inside it.

All the necessary simpl nomatch directives have been added. I am a bit unsure about the autounfold db I've made though, if only because the order in which we unfold particular identifiers (e.g. List.length before List.seq) has had a big effect on runtime and memory consumption subsequent reduction steps, and I see no easy way to control that in this scheme.

Why does github show the entire file to be changed ?
On Wed, Sep 25, 2019 at 2:53 PM Jay Kruer<EMAIL_ADDRESS>wrote:

All the necessary simpl nomatch directives have been added. I am a bit
unsure about the autounfold db I've made though, if only because the order
in which we unfold particular identifiers (e.g. List.length before
List.seq) has had a big effect on runtime and memory consumption subsequent
reduction steps, and I see no easy way to control that in this scheme.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/sifive/Kami/pull/33?email_source=notifications&email_token=AABZURLGFGUXQRMKLYSHFH3QLPMTXA5CNFSM4I2SEZD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7TRCZY#issuecomment-535236967,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABZURKVZREF3H7ZBTNE43LQLPMTXANCNFSM4I2SEZDQ
.

I think it's a newline format thing. Hiding whitespace changes on Github shows the right diff. Not sure why it changed...

OK, newline format issue should be fixed.

I've found at least two cases in Kami where having added simpl nomatch to a definition breaks proofs that rely on simpl unfolding that definition down to a match. I am guessing dependency on this behavior is pervasive and appears throughout Kami's dependencies. Should I fix all of those proofs with manual unfolding or just remove the offending simpl nomatch directive?


Can't build Flutter APK with version 5.1.1 of Mobile_Scanner

Getting multiple errors on build attempt with Mobile_Scanner version 5.1.1
MobileScanner.kt:98:52 Unresolved reference: data
MobileScanner.kt:101:48 Unresolved reference: data
MobileScanner.kt:447:68 Unresolved reference: data
MobileScanner.kt:450:31 Type mismatch: inferred type is List but List<Map<String, Any?>>? was expected
MobileScannerHandler.kt:23:33 Unresolved reference: BarcodeHandler
MobileScannerPermissions.kt:69:24 Unresolved reference: MobileScannerPermissionsListener

Switching from Kotlin version 1.9.10 to Kotlin version 1.7.20 seems to have fixed it. The changelog does mention something about something being switched from Kotlin 1.9 to 1.7.

You might need to do flutter clean && flutter pub get first? Looks like your pub cache is outdated. I don't think you need to downgrade the Kotlin version for this.

@AndrewEllen Did you manage to resolve this on your end?

@navaronbracke I managed to fix it by changing my gradle version inside of build.gradle. I had to lower it to version 1.7 and everything started working again.


added progress bar

@Premkolte assign this

color of all the progress bar is same as green, isn't it should be different for each progress bar...

create a separate run button for each progress bar

okk i will try tomm now i have another work

ok ok sure

@Premkolte issue resolved

Good. Keep up the good work .


Fix broken react-library.gradle

This file was created on 31st October 2018, it seems to be a copy paste of react.gradle with maybe some tiny modifications.
The original file has changed a lot, and this is not reflected in our react-library.gradle
One should be able to fix it mostly by comparing the changelog of the file from react-native and apply to ours. Note that we have had some changes to this file as well since it was created.

The most important thing is that hermes does not work when our rnkiwimobile framework is released. This needs to be fixed.

MR #1676 fixes the Hermes loading problem but does not update the rect-library.gradle.

Seems this is working for now. Closing


Profiling dynamic analysis

Buck2 supports profiling of Starlark as documented under Observability and Optimization. In particular, it supports profiling of analysis via buck2 profile analysis. However, this feature only captures the static analysis. Any Starlark code that is executed as part of dynamic output actions is not included in this profile.
I would like to profile Starlark code that is executed as part of dynamic output actions, i.e. the implementation of f in ctx.actions.dynamic_output, or the equivalent under the upcoming new API. The motivation is that Buck2 reports a noticeable amount of time spent in "dynamic analysis" on the TUI for some of our targets, and I would like to better understand where this time is spent and optimize the relevant code. (Anecdotally, we had an instance where dynamic analysis took 20s. Luckily we were able to reduce it to 2s simply by refactoring, but we would like to continue optimizing it based on actual data.)
Alternative profiling methods, in particular native profiling did not yield meaningful information about the Starlark code that we need to optimize.

@aherrmann right. Internally we agreed to go with this approach — add --profile-mode= to many commands and output profile of whatever is evaluated. So far I have implemented this flag for cquery command (which is useful to do recursive "loading" profiler), but it is not committed yet for cquery command https://www.internalfb.com/diff/D59088660.

@stepancheg Thanks for the update that's good to hear. Thanks for implementing the feature for cquery. Unfortunately, I don't have access to the internal diff. Is it also visible on GitHub somewhere?


feat: Add new hidden alpha flag --json to output the result of operator-sdk bundle validate in JSON format.

Description of the change:
Alpha hidden flag. See:

HI @estroz,
Thank your for your review and great suggestions. All are addressed with 1 exception only as described above.

So the UX for this is
operator-sdk bundle validate FOO --json

This seems weird to me. I know with kubectl and oc they have -o FORMAT. Part of me would expect:
operator-sdk bundle validate FOO -o json|yaml|plain

And the default would be plain i.e. just dump the messages to stdout

-o, --output string            Output format for results.  Valid values: text, json (default "text")
that was is in scorecard currently.

-o, --output string Output format for results. Valid values: text, json (default "text")
that was is in scorecard currently.

This is what I expected.

Hi folks,
All suggestions were addressed please feel free to check it.
c/c @estroz @joelanford @jmrodri @jmccormick2001

We still need to capture individual validation errors in JSON, and I don’t think it’s a good idea to conflate log statements with validation results: the former are informative statements about command’s purpose, while the latter are the expected output of the command. bundle validate should always output validation results to stdout if all pre-conditions (command arg validation, dir creation, etc) pass, but if any of those pre-conditions fail it should log an error to stderr then exit non-zero without printing results.

HI @estroz,
The point is that we do not need re-implement the log dep just for it and to achieve if any of those pre-conditions fail it should log an error to stderr then exit non-zero without printing results. is not required have our own structure at all.

Why would this feature require re-implementing logging? That isn’t what you had written before the most recent change, although it may have appeared similar. Why don’t we want to control how validation output (which is different from log data) is structured?

So .. according to @estroz, we are about to capture validation output and dump it into JSON rather than program errors which should go to logs. If this understanding is correct, we may want to hook the JSON marshaling onto the validation logic and only that logic.

Hi @estroz,
I understand that our goal is just to allow producing the results in JSON in order to allow its command to be called by jobs as CVP.  So, we have 2 ways to move forward here.
1 - Use the mode implementation as it is done now. (pros: we achieve the goal without the dirty if and else and we keep it easier to maintain). PS. by checking the comments, I understand that @joe was not very happy with the output structure as well.
2 - Came back to the "output" structure implementation that at the end will be quite similar implementation existent in the modules if we improve it and for example follow the suggestions made already. E.g allow all types and use an integer as levels. See here and/or here

@camilamacedo86 I coded an example of my ideal implementation of non-text outputs here. We can use a stdout logger for text output and a version of what you had previously for json-alpha1 output so the command treats precondition error logs and actual output differently. Let me know what you think.

I am closing this one and you can push your PR against master as take the task/Jira @estroz

Hi @estroz,
It is now updated and done on with your suggestion. Please, feel free to check.

Hi @estroz,
All is done here, could you please give a hand in its review?
Really tks.

All done as suggested @estroz.


Page instances rendering previous pages

I'm running an express sever on Heroku with a PhantomJS buildpack. It's purpose is to act as a screenshot service and capture images of urls that are sent to it. I've created a pool of page instances to speed up the rendering process when there are multiple requests:
var _pages = [];
for (var i = 0; i < PHANTOM_PAGE_INSTANCES; i++) {
  (function(i) {
    phantom.create(function(ph) {
      ph.createPage(function(page) {
        page.set('viewportSize',{width:1200,height:630},function(err){
          _pages[i] = page
        });
      });
    });
  })(i)
}

However, later in the Express callback, I've noticed that under heavy load each instance often renders the page that it had previously visited:
function generate_preview_image(req, res) {
  // Get a random phantom page instance:
  var index = Math.floor(Math.random() * PHANTOM_PAGE_INSTANCES);
  // Make sure it is not currently being used:
  while (_pages[index].busy === true) {
    index = Math.floor(Math.random() * PHANTOM_PAGE_INSTANCES);
  }
  _pages[index].busy = true;
  _pages[index].open(req.body.url, function(status) {
    _pages[index].render(req.url + '.png', function(err) {
        res.send({'success': true});
        _pages[index].busy = false;
    });
  });
}

app.post('/gen_image/', generate_preview_image);

Is it possible that the page.open() callback for instance "x" is being triggered by one of the other page instances before instance "x" has actually finished opening the page?

You should check status value to be sure that this is a bug in phantom. Atm I see that it can be network or another problems within your code.

I stress tested the new version with cluster for 30 seconds. It worked without any errors.
$ siege -c 10 -t 20s http://localhost:3000/foo
Lifting the server siege...      done.

Transactions:		          68 hits
Availability:		      100.00 %
Elapsed time:		       19.54 secs
Data transferred:	        0.00 MB
Response time:		        2.23 secs
Transaction rate:	        3.48 trans/sec
Throughput:		        0.00 MB/sec
Concurrency:		        7.77
Successful transactions:          68
Failed transactions:	           0
Longest transaction:	        3.08
Shortest transaction:	        1.16


Confirm the Ending: Add test case

Add a test case that makes sure the user can't just check the last character or word, as suggested by @ltegman in #3587.

Not sure what you mean by your concern. The challenge literally asks for the user to verify if either 1) the last word in the first string matches the word in the second string, or 2) the last character in the first string matches the character in the second string.
If this is not what the challenge was meant to ask, then the directions need to be rewritten.

Where do you find those words? From what I can found, the instructions say Check if a string (first argument) ends with the given target string (second argument)., i.e., not just last word or character, but the last characters matching the length of the target.

It's not simply the words by themselves, but rather the information inferred from the context of the challenge. In-fact, your question, to me, furthers my initial point about this challenge.
At the start of the Bonfire Challenges, the user is instructed to consider not only the description, but also the tests that the user's code must pass.
Since we know that in JavaScript, strings are usually sentences or words (they can be other characters, I know), we know that we need to write a code that can, at the very least, parse through words.
Next, we may consider that our code should work for any characters, but when one looks at the tests that the code needs to pass, it is clear that the description is referring to strings of the word-type only.
Also, nowhere in the description does the challenge state that the user must write a code that bases its returned value off of the length of the target. That would be redundant code because if the last characters in the str match the characters in the target, then by nature their character-lengths match because they are identical.

The fact that the tests allowed the student to infer that they only needed to look for words or single characters is part of the problem. Writing the function to work for any string input is far more robust code, which is what the tests should be encouraging students to write when possible.

No. The student infers only what they are led to believe in the description. From that line of thought, one could infer almost anything.
I submitted two commits to improve this challenge. They are #3674 & #3676.

The way I see it, the point of this exercise is to practically to figure out how to write a function that does what .endsWith() does, not just to supply a function that does it. I understand where you're coming from, from a "clean solution" point-of-view, but this should, in my opinion, be more than that.

@ahstro Thanks! Keep up the hard work!
Happy Coding!


Merge pull request #719 from mendix/develop

Release 2024-03-21

The next release is scheduled for May 30th 2024: https://status.mendix.com/incidents/40hljlfdcjys

@LittleGnome I recommend reaching out to our Support team at https://support.mendix.com/hc/en-us for assistance, they'll be able to help you further with build issues :)


Real-Time-Chat-Application

FrontEnd Technologies - HTML, CSS
BackEnd Technologies - JavaScript, Node.js
Used Socket.io module for a two-way connection between client and server.

I am not able to see any files.

Should I make new PR?

yes !!

I tried many times but everytime same problem occurred.  What should I do?

You can try other project !!

Sure.


Error CS0019: Operator '>' cannot be applied to operands of type 'string' and 'string'

Has anyone faced with similar errors while trying to publish extension to server?

I'm looking now in codeunits and can't find where I compare strings with operands <,>,<=

This issue is fixed in the developer preview and will be part of a future release.
This GitHub repository is dedicated to handling issues and feedback for the latest Developer Preview releases of the AL development tools for Dynamics 365 Business Central.
You can open Support Request to CSS through PartnerSource portal to get it backported.
For more details please read:
https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/
https://github.com/Microsoft/AL/wiki/Frequently-Asked-Questions#i-found-an-issue-on-nav-2018-what-do-i-do


nuget overrides logincallback.ashx on update

This package is in maintenance mode, and no more changes done on it ATM.
If this is still considered an major issue, please reopen issue


Invite feedback

[x] open a feedback issue, including the planned submission date

Ping people

@nuest

[x] Sam Abbott: https://github.com/nuest/ten-simple-rules-dockerfiles/issues/6#issuecomment-595125323
[x] Noam Ross, potentially via "Make tends to be my highest-level abstraction - for things like building dependencies, docker images, etc. I've started using drake for analysis pipeline below that." (https://twitter.com/noamross/status/1205514611912531968?s=09)
[x] reply to https://twitter.com/nordholmen/status/1164446676427431936
[x] as Dav Clark (Gigantum), their tool focusses on UI, but still
[x]  #containers in RSE Slack - "many of you must help researchers with containerisation - maybe this is of help for you or you can share your experiences"
[x] https://twitter.com/Stikov/status/1191847797177421825?s=09)
[x] ping authors of https://f1000research.com/articles/7-742/v2

NN

[ ] Fotis E. Psomopoulos, https://twitter.com/fopsom

https://github.com/nuest/ten-simple-rules-dockerfiles/issues/61

@sje30 Do you know Pablo Moreno from EBML Cambridge? He's coauthor of the F1000 paper..

No, I don't know Pablo (yet).

@sje30 Yes, please point them to our preprint! It would only be fair to point out we plan to submit soon.


Batch error response ParseError

The struct JobDetail's deserialization does not account for the possibility some fields (notably startedAt) may be missing when a batch job is canceled from the console or the job queue is deleted before being run.
The following is an example of such a response,
{
    "jobs":[
        {
            "jobName":"123",
            "jobId":"some-id",
            "jobQueue":"arn:aws:batch:us-east-1:XXX:job-queue/a-job-queue",
            "status":"FAILED",
            "attempts":[],
            "statusReason":"Cancelled via console.",
            "createdAt":1587767042358,
            "dependsOn":[],
            "jobDefinition":"arn:aws:batch:us-east-1:XXX:job-definition/a-job-def:1",
            "parameters":{},
            "container":{
                "image":"XXX.dkr.ecr.us-east-1.amazonaws.com/some-image:1.0.0",
                "vcpus":8,
                "memory":2048,
                "command":["some command"],
                "volumes":[],
                "environment":[],
                "mountPoints":[],
                "ulimits":[],
                "networkInterfaces":[],
                "resourceRequirements":[]
            }
        }
    ]
}

+1. I also found startedAt can be missing in a successful job if the job is a parent of array jobs.


Fixes empty dictionary conversion bug

In some scenarios, an empty dictionary could be inserted into a part of the new tests section, causing an index-out-of-bounds exception. This PR addresses that issue.

Against AnacondaRecipes, this fix increases our "success" conversion metric from 70% to 85%

Also fixes a few make directives that were missing the testing directory. This got missed in upgrading the Makefile a few weeks back

85%?! That is awesome! congrats :)


Fix awful load time for iOS app!

It takes forever to load an iOS app which means testing is a complete nightmare. We need to know exactly what it is that is causing the delay and then we should look at what we can do to fix it.

For what it's worth this bug should probably be against the postcard app because the load time there is vastly worse than just running the tests on the plugin.

This is really an issue with the postcard app and we are going to switch that anyway so let's revisit with the new postcard app.


Slack messaging provider and channels configuration

This allows Slack to be used as a messaging provider.
See README.md for more details.

Overall it looks great!
One question: Why should the SlackChannel override the _ensure_sessions_exists and basically do session management outside of the channel like web channels do? If we include the slack_user (L58 in slack_listeners.py) in the SlackMessage and implement get_chat_id_from_message on the SlackChannel, then we can follow the "normal flow" by the looks of it. I'm not 100% against the current implementation, but just super wary

The main thing is that we can have multiple active sessions per 'user'. Each slack thread is a session and a user can start new sessions at any time. This is very similar to how 'Web' sessions work. I've updated the readme with more details.

Overall it looks great!
One question: Why should the SlackChannel override the _ensure_sessions_exists and basically do session management outside of the channel like web channels do? If we include the slack_user (L58 in slack_listeners.py) in the SlackMessage and implement get_chat_id_from_message on the SlackChannel, then we can follow the "normal flow" by the looks of it. I'm not 100% against the current implementation, but just super wary

The main thing is that we can have multiple active sessions per 'user'. Each slack thread is a session and a user can start new sessions at any time. This is very similar to how 'Web' sessions work. I've updated the readme with more details.

Thanks, that makes sense. This then reveals two possible paradigms for channels i.e. single threaded + multi threaded. Well, it was there all along, we just supported single threaded external channels up to this point. Although this distinction is revealed in the code, I feel like it's a bit sloppy atm and I would ideally like to see it more emphasized. I'm not 100% sure how yet, but my gut tells me we should do something like that. Ideally within the ChannelBase class to keep things neat. I'll apply my mind a bit

Should the backends.py file not be updated as well?

no, I've updated the tests to ignore the slack app

@SmittieC small change to disable slack messaging provider and channels if slack isn't configured


tf.image.resize_bilinear ops have not support

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
TensorFlow installed from (source or binary): binary
TensorFlow version (or github SHA if from source):1.12

i want to convert deeplabv3  mobilenet to tflite but it do not support?
when will you add the 'tf.image.resize_bilinear' ops in tensorflow lite?thank you.

We do have ResizeBilinear op in TensorFlow Lite.
Also, please see below if the op you are interested is not same as the version in TFLite:
As we work toward fleshing out the builtin op library for TensorFlow Lite, we've been working on an experimental feature that allows using select TensorFlow ops from within the TensorFlow Lite runtime. The goal is to help reduce some of the friction for using models that rely on ops not yet natively supported by TensorFlow Lite (at the cost of increased binary size). This feature requires opting in during model conversion, as well as adding an additional dependency. More details can be found here.
Feedback is very much appreciated (either via GitHub or directly via tflite@tensorflow.org), and we'll be adding and refining functionality over the coming weeks. Cheers.

Actually, ResizeBilinear should already be supported. Can you paste the output from your conversion attempt?

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

System Information:
TensorFlow 2.3
Model Architecture - MobileNet V1
Arduino_TensorFlow Lite 2.4.0 Alpha
I fined Tuned Mobilenet V1 for face recoginition and later quantized using full integer Quantization Technique and later converted it to .cc format to upload it to Arduino Nano 33 BLE Sense. I used all_ops_resolver function but when i ran the Model on Microcontroller, invoke failed() and error message which was shown on Serial Monitor was " Didn't find op for builtin opcode 'RESIZE_BILINEAR' version '3'. An older version of this builtin might be supported. Are you using an old TFLite binary with a newer model?". Can anyone suggest me, how i can work around this error message.


[5.3] Rename Mac Catalyst-related test

Cherry-pick of #31342 to 5.3:

Fixes rdar://62338598

@swift-ci test

The merge to master caused problems on Windows, so I’m going to need to cherry-pick a second commit to this PR.

@swift-ci please test and merge

@swift-ci please test and merge


Revise Environments Documentation

As per discussion here: https://github.com/ionic-team/ionic-cli/issues/1205#issuecomment-418736238

See also https://github.com/ionic-team/starters/pull/484


341 potential unused function

I suggest that adding crps_step_threshold_weight and adjust_fcst_for_crps are added to the CRPS tutorial in a separate pull request

The functional changes look great. I agree the table could use some refinement, but I'm going to accept this PR and then do the further refinement once it's full in the repo and I can more easily go through the documentation building workflow.

Here is what the table looks like after some post-merge adjustment. If you would like further changes, please let me know.