Merge branch 'master' into unstable-channel

This commit is contained in:
Jörg Thalheim 2018-07-08 17:49:33 +01:00 committed by GitHub
commit bd3c9d77f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 11 deletions

17
.editorconfig Normal file
View file

@ -0,0 +1,17 @@
# EditorConfig configuration for nixpkgs
# http://EditorConfig.org
# Top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file, utf-8 charset
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
# Match json/python files, set indent to spaces with width of two
[*.{json,py}]
indent_style = space
indent_size = 4

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.mypy_cache/

View file

@ -196,7 +196,6 @@ option to a path relative to the repository root:
}
}
```
## Git submodules
To fetch git submodules in repositories set `submodules`:
@ -212,6 +211,9 @@ To fetch git submodules in repositories set `submodules`:
}
```
<!--
This currently does not work as advertised at least for modules
## Conventions for NixOS modules, overlays and library functions
To make NixOS modules, overlays and library functions more discoverable,
@ -222,7 +224,9 @@ Put all NixOS modules in the `modules` attribute of your repository:
```nix
# default.nix
modules = ./import modules;
{
modules = ./import modules;
}
```
```nix
@ -247,9 +251,11 @@ For overlays use the `overlays` attribute:
```nix
# default.nix
overlays = {
hello-overlay = ./import hello-overlay;
};
{
overlays = {
hello-overlay = ./import hello-overlay;
};
}
```
```nix
@ -264,11 +270,13 @@ self: super: {
The result can be used like this:
```nix
nixpkgs = import <nixpkgs> {
overlays = [
nixpkgs.nur.repos.mpickering.overlays.haskell-plugins
];
};
{
nixpkgs = import <nixpkgs> {
overlays = [
nixpkgs.nur.repos.mpickering.overlays.haskell-plugins
];
};
}
```
Put reusable nix functions that are intend for public use in the `lib` attribute:
@ -285,6 +293,7 @@ with lib;
};
}
```
-->
## Contribution guideline
@ -319,3 +328,4 @@ cycles.
## Roadmap
- Implement a search to find packages
- Figure out how make it working for NixOS modules

View file

@ -141,7 +141,7 @@ def prefetch(spec: RepoSpec,
def nixpkgs_path() -> str:
cmd = ["nix", "eval", "(<nixpkgs>)"]
cmd = ["nix-instantiate", "--find-file", "nixpkgs"]
return subprocess.check_output(cmd).decode("utf-8").strip()