MatrixAI / nixpkgs-matrix

A public nixpkgs/flakes package collection for Matrix AI.

Home Page:https://matrix.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Integrate new .gitignore system

brynblack opened this issue · comments

Specification

There exists a more advanced .gitignore system called hercules-ci. Our current nix-gitignore.gitignoreSource still keeps .git in the produced output.

nix-gitignore.gitignoreSource [] ./.

Still has .git.

But you need to do:

nix-gitignore.gitignoreSource [".git"] ./.

Actually ignores it.

Now I didn't see this before, not sure if this is a regression.

However the hercules-ci gitignore is apparently the more advanced one.

Basically get this done: hercules-ci/gitignore.nix#6

Tasks

  1. ...
  2. ...
  3. ...

According to NixOS Wiki, for flakes in git repos, only files in the working tree will be copied to the store. Given that we are migrating our repos from using shell.nix to use flake.nix, this issue might be redundant.

No, we still need to ignore more files then what is left in the working tree.

So it may be that we don't have to ignore .git, but we still have to ignore all other files. For example:

  src = nix-gitignore.gitignoreSource [
    # The `.git` itself should be ignored
    ".git"
    # Non-build files
    "/nodemon.json"
    # Hidden files
    "/.*"
    # Nix files
    "/*.nix"
    # Benchmarks
    "/benches"
    # Docs
    "/docs"
    # Tests
    "/tests"
    "/jest.config.js"
  ] ./.;

So this issue isn't redundant.

Getting this issue needs to be the focus for now @aryanj. Then go back to ENG-358. In the mean time I'll have a look over that and resolve the blocker you have for it.