From 2cf462000dfb6e0f5b5f8a346ef2f91e48ff71bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 1 Jul 2018 21:54:05 +0100 Subject: [PATCH 1/6] add .editorconfig --- .editorconfig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..8590f29ab --- /dev/null +++ b/.editorconfig @@ -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 From 1a26978b528f5b87e40d827b3af8ff3da9aebd77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 1 Jul 2018 21:55:12 +0100 Subject: [PATCH 2/6] gitignore: mypy_cache --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..e5daf0d15 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.mypy_cache/ From f4d0e231804ffaf23e7ef189ce9ffca4ab750db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 1 Jul 2018 21:56:38 +0100 Subject: [PATCH 3/6] README.md: proper sets in examples to satisfy syntax highlighter --- README.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 867ccb91a..8e8b067f0 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,9 @@ Put all NixOS modules in the `modules` attribute of your repository: ```nix # default.nix -modules = ./import modules; +{ + modules = ./import modules; +} ``` ```nix @@ -232,9 +234,11 @@ For overlays use the `overlays` attribute: ```nix # default.nix -overlays = { - hello-overlay = ./import hello-overlay; -}; +{ + overlays = { + hello-overlay = ./import hello-overlay; + }; +} ``` ```nix @@ -249,11 +253,13 @@ self: super: { The result can be used like this: ```nix -nixpkgs = import { - overlays = [ - nixpkgs.nur.repos.mpickering.overlays.haskell-plugins - ]; -}; +{ + nixpkgs = import { + overlays = [ + nixpkgs.nur.repos.mpickering.overlays.haskell-plugins + ]; + }; +} ``` Put reusable nix functions that are intend for public use in the `lib` attribute: From 7c6fa818a78f9f3266ee1869600604353e109da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 2 Jul 2018 14:15:49 +0100 Subject: [PATCH 4/6] comment out modules/overlays/lib section for the moment --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8e8b067f0..a6692cef5 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,9 @@ option to a path relative to the repository root: } ``` + ## Contribution guideline From 7f768691e62a7e58d51a380a3325eba07dadb129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 2 Jul 2018 14:54:15 +0100 Subject: [PATCH 5/6] README.md: add modules again to roadmap --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a6692cef5..6e2a788b9 100644 --- a/README.md +++ b/README.md @@ -314,3 +314,4 @@ cycles. ## Roadmap - Implement a search to find packages +- Figure out how make it working for NixOS modules From 16246f510e237430e91feff20cc78d167351b989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 5 Jul 2018 13:47:09 +0100 Subject: [PATCH 6/6] Use nix-instantiate to find nixpkgs source --- nur/update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nur/update.py b/nur/update.py index f095ce62d..9e8c4d7d5 100755 --- a/nur/update.py +++ b/nur/update.py @@ -120,7 +120,7 @@ def prefetch(name: str, url: ParseResult, def nixpkgs_path() -> str: - cmd = ["nix", "eval", "()"] + cmd = ["nix-instantiate", "--find-file", "nixpkgs"] return subprocess.check_output(cmd).decode("utf-8").strip()