commit
87a7098f5e
2 changed files with 19 additions and 4 deletions
|
|
@ -350,7 +350,6 @@ with pkgs.lib;
|
|||
}
|
||||
```
|
||||
|
||||
|
||||
## Contribution guideline
|
||||
|
||||
- When adding packages to your repository make sure they build and set
|
||||
|
|
@ -381,6 +380,11 @@ override existing packages.
|
|||
Also without coordination multiple overlays could easily introduce dependency
|
||||
cycles.
|
||||
|
||||
## Contact
|
||||
|
||||
You can chat with us on IRC in channel [#nixos-nur](https://webchat.freenode.net/?url=irc%3A%2F%2Firc.freenode.net%2Fnixos-nur).
|
||||
Apart from that we also read posts on [https://discourse.nixos.org](https://discourse.nixos.org/).
|
||||
|
||||
## Roadmap
|
||||
|
||||
- Implement a search to find packages
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import logging
|
|||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
from tempfile import TemporaryDirectory
|
||||
from argparse import Namespace
|
||||
from distutils.dir_util import copy_tree
|
||||
from pathlib import Path
|
||||
|
|
@ -44,12 +45,22 @@ def commit_files(files: List[str], message: str) -> None:
|
|||
|
||||
|
||||
def commit_repo(repo: Repo, message: str, path: Path) -> Repo:
|
||||
repo_path = str(path.joinpath(repo.name).resolve())
|
||||
repo_path = path.joinpath(repo.name).resolve()
|
||||
|
||||
copy_tree(repo_source(repo.name), repo_path)
|
||||
tmp: Optional[TemporaryDirectory] = TemporaryDirectory(prefix=str(repo_path.parent))
|
||||
assert tmp is not None
|
||||
|
||||
try:
|
||||
copy_tree(repo_source(repo.name), tmp.name)
|
||||
shutil.rmtree(repo_path, ignore_errors=True)
|
||||
os.rename(tmp.name, repo_path)
|
||||
tmp = None
|
||||
finally:
|
||||
if tmp is not None:
|
||||
tmp.cleanup()
|
||||
|
||||
with chdir(str(path)):
|
||||
commit_files([repo_path], message)
|
||||
commit_files([str(repo_path)], message)
|
||||
|
||||
return repo
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue