aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-07-16 16:36:28 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-07-16 16:36:28 +0300
commit6df1126c4c9cbb574acdec973fe9e5d5a134296d (patch)
treeee0505c1e0dc9e3fede389da3a2120fefda6d6d6
parentc6f46f47c947a7f19918adcbe28089556496b8b7 (diff)
downloadnixsap-6df1126c4c9cbb574acdec973fe9e5d5a134296d.tar.gz
Allow building and installing local packages
-rw-r--r--README.md9
-rw-r--r--pkgs/default.nix16
2 files changed, 24 insertions, 1 deletions
diff --git a/README.md b/README.md
index e85612f..4a5a119 100644
--- a/README.md
+++ b/README.md
@@ -26,11 +26,18 @@ For example:
modules/pkgs/writeXML.nix => pkgs.writeXML
modules/pkgs/rdsdump/default.nix => pkgs.rdsdump
-You can use this technics in your own projects. You can take out any modules
+You can use this techniques in your own projects. You can take out any modules
or packages and put them into your project with your modifications without
maintaning a fork of Nixsap. When taking modules you have to change the
`nixsap` namespace to something different to avoid conflicts.
+It is also possible to build and install packages that are overridden
+by Nixsap, for example:
+
+```
+nix-env -I nixpkgs=/path/to/vanila/nixpkgs -f /path/to/nixsap/pkgs -i nodejs-sass
+```
+
Automatic unix user id
-----------------------
diff --git a/pkgs/default.nix b/pkgs/default.nix
new file mode 100644
index 0000000..60159f8
--- /dev/null
+++ b/pkgs/default.nix
@@ -0,0 +1,16 @@
+let
+
+ inherit (import <nixpkgs/lib>) evalModules;
+
+
+ evaluated = evalModules {
+ modules = [
+ { nixpkgs.system = builtins.currentSystem; }
+ (import <nixpkgs/nixos/modules/misc/nixpkgs.nix>)
+ (import ../modules/pkgs)
+ ];
+ };
+
+ inherit (evaluated.config._module.args) pkgs;
+
+in pkgs