gitignore: fixes for nix output links#1233
gitignore: fixes for nix output links#1233spikespaz wants to merge 3 commits intoraphamorim:mainfrom
Conversation
Previously `result/` was ignored as a directory, which doesn't work if the `result` inode is a symlink.
- Added `result-lib`, `result-dev`, and `result-man` which are all possible (known to me) names for Nix build output links. - Removed duplicate `.direnv` entry. - Removed an incorrect comment.
|
@raphamorim I have more to contribute, but I'm wondering if these changes are welcome at all. |
|
Sorry I meant to ask if this pr was still valid after the pr you did originally |
|
Separate changes at the same time. I noticed the gitignore was messed up when I was testing my changes. |
|
My original message has a poorly phrased question however, do you want me to add another commit removing whatever I thought was useless? |
| .direnv/ | ||
| result/ | ||
| # Nix build output | ||
| /result |
There was a problem hiding this comment.
right, so basically to exclude matches anywhere in the repo? (asking to understand the reason)
There was a problem hiding this comment.
This / prefix excludes matches only at the root of the repo. There is no trailing / because it's always a symlink, so a directory named result is fine.
You could use result as a bare name, but I don't like to make .gitignore patterns unnecessarily strict.
| /result-dev | ||
| /result-man | ||
|
|
||
| target/ |
There was a problem hiding this comment.
This one I rather keep because I use rio in a private fork that I have been working and target is independent there for multi levels
There was a problem hiding this comment.
Why would that be the case? The repository is a workspace, and thus, target should only appear at /.
Having a directory/module named target is perfectly reasonable, perhaps a compromise would be to add !/**/src/**/target/?
Or, I'm a big fan of adding .gitignore in directories which need special handling (for offline work, for example).
* Format with `alejandra` and add it to all devShells
* Use `lib.fileset` to get only the needed files for the build
* Fix build inputs for Darwin
* Make `wayland` and `x11` optional using the package args `with*`
* Create a separate `terminfo` output[^1]
* Fix nix file indentation to 2 instead of 4
* Remove `app`, `package` already has a `meta.mainProgram` attribute
* Add an overlay that can be used to override the `rio` package using
flake-part's easyOverlay module[^2]
* Create separate package for `msrv`, `stable` and `nightly`, matching
the different `devShells` available
* Removed the `flake = false` attribute for `inputs.systems`
* Create `legacyPackages.rio` containing four sub packages using
different versions of the rust-toolchain:
* `rio.msrv` - uses `./rust-toolchain.toml`
* `rio.stable` - uses `rust-bin.stable`
* `rio.nightly` - uses the latest nightly rust
* `rio.default` - Same as `rio.msrv`
* Added `/result` to get rid of the `nix build` output file[^3]
[^1]: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ri/rio/package.nix
[^2]: https://flake.parts/options/flake-parts-easyoverlay
[^3]: A simpler version of raphamorim#1233, that _just_ adds this one line
* Format with `alejandra` and add it to all devShells
* Use `lib.fileset` to get only the needed files for the build
* Fix build inputs for Darwin
* Make `wayland` and `x11` optional using the package args `with*`
* Create a separate `terminfo` output[^1]
* Fix nix file indentation to 2 instead of 4
* Remove `app`, `package` already has a `meta.mainProgram` attribute
* Add an overlay that can be used to override the `rio` package using
flake-part's easyOverlay module[^2]
* Create separate package for `msrv`, `stable` and `nightly`, matching
the different `devShells` available
* Removed the `flake = false` attribute for `inputs.systems`
* Create `legacyPackages.rio` containing four sub packages using
different versions of the rust-toolchain:
* `rio.msrv` - uses `./rust-toolchain.toml`
* `rio.stable` - uses `rust-bin.stable`
* `rio.nightly` - uses the latest nightly rust
* `rio.default` - Same as `rio.msrv`
* Added `/result` to get rid of the `nix build` output file[^3]
[^1]: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ri/rio/package.nix
[^2]: https://flake.parts/options/flake-parts-easyoverlay
[^3]: A simpler version of raphamorim#1233, that _just_ adds this one line
* Format with `alejandra` and add it to all devShells
* Use `lib.fileset` to get only the needed files for the build
* Fix build inputs for Darwin
* Make `wayland` and `x11` optional using the package args `with*`
* Create a separate `terminfo` output[^1]
* Fix nix file indentation to 2 instead of 4
* Remove `app`, `package` already has a `meta.mainProgram` attribute
* Add an overlay that can be used to override the `rio` package using
flake-part's easyOverlay module[^2]
* Create separate package for `msrv`, `stable` and `nightly`, matching
the different `devShells` available
* Removed the `flake = false` attribute for `inputs.systems`
* Create `legacyPackages.rio` containing four sub packages using
different versions of the rust-toolchain:
* `rio.msrv` - uses `./rust-toolchain.toml`
* `rio.stable` - uses `rust-bin.stable`
* `rio.nightly` - uses the latest nightly rust
* `rio.default` - Same as `rio.msrv`
* Added `/result` to get rid of the `nix build` output file[^3]
[^1]: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ri/rio/package.nix
[^2]: https://flake.parts/options/flake-parts-easyoverlay
[^3]: A simpler version of raphamorim#1233, that _just_ adds this one line
* Format with `alejandra` and add it to all devShells
* Use `lib.fileset` to get only the needed files for the build
* Fix build inputs for Darwin
* Make `wayland` and `x11` optional using the package args `with*`
* Create a separate `terminfo` output[^1]
* Fix nix file indentation to 2 instead of 4
* Remove `app`, `package` already has a `meta.mainProgram` attribute
* Add an overlay that can be used to override the `rio` package using
flake-part's easyOverlay module[^2]
* Create separate package for `msrv`, `stable` and `nightly`, matching
the different `devShells` available
* Removed the `flake = false` attribute for `inputs.systems`
* Create `legacyPackages.rio` containing four sub packages using
different versions of the rust-toolchain:
* `rio.msrv` - uses `./rust-toolchain.toml`
* `rio.stable` - uses `rust-bin.stable`
* `rio.nightly` - uses the latest nightly rust
* `rio.default` - Same as `rio.msrv`
* Added `/result` to get rid of the `nix build` output file[^3]
[^1]: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ri/rio/package.nix
[^2]: https://flake.parts/options/flake-parts-easyoverlay
[^3]: A simpler version of raphamorim#1233, that _just_ adds this one line
* Format with `alejandra` and add it to all devShells
* Use `lib.fileset` to get only the needed files for the build
* Fix build inputs for Darwin
* Make `wayland` and `x11` optional using the package args `with*`
* Create a separate `terminfo` output[^1]
* Fix nix file indentation to 2 instead of 4
* Remove `app`, `package` already has a `meta.mainProgram` attribute
* Add an overlay that can be used to override the `rio` package using
flake-part's easyOverlay module[^2]
* Create separate package for `msrv`, `stable` and `nightly`, matching
the different `devShells` available
* Removed the `flake = false` attribute for `inputs.systems`
* Create `legacyPackages.rio` containing four sub packages using
different versions of the rust-toolchain:
* `rio.msrv` - uses `./rust-toolchain.toml`
* `rio.stable` - uses `rust-bin.stable`
* `rio.nightly` - uses the latest nightly rust
* `rio.default` - Same as `rio.msrv`
* Added `/result` to get rid of the `nix build` output file[^3]
[^1]: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ri/rio/package.nix
[^2]: https://flake.parts/options/flake-parts-easyoverlay
[^3]: A simpler version of raphamorim#1233, that _just_ adds this one line
* Format with `alejandra` and add it to all devShells
* Use `lib.fileset` to get only the needed files for the build
* Fix build inputs for Darwin
* Make `wayland` and `x11` optional using the package args `with*`
* Create a separate `terminfo` output[^1]
* Fix nix file indentation to 2 instead of 4
* Remove `app`, `package` already has a `meta.mainProgram` attribute
* Add an overlay that can be used to override the `rio` package using
flake-part's easyOverlay module[^2]
* Create separate package for `msrv`, `stable` and `nightly`, matching
the different `devShells` available
* Removed the `flake = false` attribute for `inputs.systems`
* Create `legacyPackages.rio` containing four sub packages using
different versions of the rust-toolchain:
* `rio.msrv` - uses `./rust-toolchain.toml`
* `rio.stable` - uses `rust-bin.stable`
* `rio.nightly` - uses the latest nightly rust
* `rio.default` - Same as `rio.msrv`
* Added `/result` to get rid of the `nix build` output file[^3]
[^1]: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ri/rio/package.nix
[^2]: https://flake.parts/options/flake-parts-easyoverlay
[^3]: A simpler version of raphamorim#1233, that _just_ adds this one line
* Format with `alejandra` and add it to all devShells
* Use `lib.fileset` to get only the needed files for the build
* Fix build inputs for Darwin
* Make `wayland` and `x11` optional using the package args `with*`
* Create a separate `terminfo` output[^1]
* Fix nix file indentation to 2 instead of 4
* Remove `app`, `package` already has a `meta.mainProgram` attribute
* Add an overlay that can be used to override the `rio` package using
flake-part's easyOverlay module[^2]
* Create separate package for `msrv`, `stable` and `nightly`, matching
the different `devShells` available
* Removed the `flake = false` attribute for `inputs.systems`
* Create `legacyPackages.rio` containing four sub packages using
different versions of the rust-toolchain:
* `rio.msrv` - uses `./rust-toolchain.toml`
* `rio.stable` - uses `rust-bin.stable`
* `rio.nightly` - uses the latest nightly rust
* `rio.default` - Same as `rio.msrv`
* Added `/result` to get rid of the `nix build` output file[^3]
[^1]: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ri/rio/package.nix
[^2]: https://flake.parts/options/flake-parts-easyoverlay
[^3]: A simpler version of #1233, that _just_ adds this one line
* Format with `alejandra` and add it to all devShells
* Use `lib.fileset` to get only the needed files for the build
* Fix build inputs for Darwin
* Make `wayland` and `x11` optional using the package args `with*`
* Create a separate `terminfo` output[^1]
* Fix nix file indentation to 2 instead of 4
* Remove `app`, `package` already has a `meta.mainProgram` attribute
* Add an overlay that can be used to override the `rio` package using
flake-part's easyOverlay module[^2]
* Create separate package for `msrv`, `stable` and `nightly`, matching
the different `devShells` available
* Removed the `flake = false` attribute for `inputs.systems`
* Create `legacyPackages.rio` containing four sub packages using
different versions of the rust-toolchain:
* `rio.msrv` - uses `./rust-toolchain.toml`
* `rio.stable` - uses `rust-bin.stable`
* `rio.nightly` - uses the latest nightly rust
* `rio.default` - Same as `rio.msrv`
* Added `/result` to get rid of the `nix build` output file[^3]
[^1]: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ri/rio/package.nix
[^2]: https://flake.parts/options/flake-parts-easyoverlay
[^3]: A simpler version of #1233, that _just_ adds this one line
result/is a directory, which was supposed to be a symbolic link (file), without trailing/.result-lib,result-devandresult-manare valid Nix build outputs that should also be ignored./to prevent future confusion.There's other junk in the
.gitignorethat looks like it started from a (very bad) template. I'm not sure what else should be removed, but I see very few projects ignorerustmftbackup files (it is stable enough that these should almost never be created) andrlsis deprecated. I haven't touched these entries that I think should be removed outright.