summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorAneesh Agrawal <aneeshusa@gmail.com>2016-10-30 12:35:57 -0400
committerAneesh Agrawal <aneeshusa@gmail.com>2016-10-30 14:34:40 -0400
commit3d99eea85208d4f491e3a5c241b03d2c8d0c4125 (patch)
tree7e11be2d49a3d9202d879fb147d52cc40857c632 /nixos/modules
parent3cb116f708896b2c33f5cc3a4a925fd6a762dfa0 (diff)
downloadnixpkgs-3d99eea85208d4f491e3a5c241b03d2c8d0c4125.tar
nixpkgs-3d99eea85208d4f491e3a5c241b03d2c8d0c4125.tar.gz
nixpkgs-3d99eea85208d4f491e3a5c241b03d2c8d0c4125.tar.bz2
nixpkgs-3d99eea85208d4f491e3a5c241b03d2c8d0c4125.tar.lz
nixpkgs-3d99eea85208d4f491e3a5c241b03d2c8d0c4125.tar.xz
nixpkgs-3d99eea85208d4f491e3a5c241b03d2c8d0c4125.tar.zst
nixpkgs-3d99eea85208d4f491e3a5c241b03d2c8d0c4125.zip
docs: use overrideAttrs instead of overrideDerivation
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/config/debug-info.nix6
-rw-r--r--nixos/modules/services/editors/emacs.xml6
2 files changed, 5 insertions, 7 deletions
diff --git a/nixos/modules/config/debug-info.nix b/nixos/modules/config/debug-info.nix
index 671a59f52f6..49991d22a93 100644
--- a/nixos/modules/config/debug-info.nix
+++ b/nixos/modules/config/debug-info.nix
@@ -17,12 +17,10 @@ with lib;
         where tools such as <command>gdb</command> can find them.
         If you need debug symbols for a package that doesn't
         provide them by default, you can enable them as follows:
-        <!-- FIXME: ugly, see #10721 -->
         <programlisting>
         nixpkgs.config.packageOverrides = pkgs: {
-          hello = pkgs.lib.overrideDerivation pkgs.hello (attrs: {
-            outputs = attrs.outputs or ["out"] ++ ["debug"];
-            buildInputs = attrs.buildInputs ++ [&lt;nixpkgs/pkgs/build-support/setup-hooks/separate-debug-info.sh>];
+          hello = pkgs.hello.overrideAttrs (oldAttrs: {
+            separateDebugInfo = true;
           });
         };
         </programlisting>
diff --git a/nixos/modules/services/editors/emacs.xml b/nixos/modules/services/editors/emacs.xml
index bcaa8b8df3d..e03f6046de8 100644
--- a/nixos/modules/services/editors/emacs.xml
+++ b/nixos/modules/services/editors/emacs.xml
@@ -356,14 +356,14 @@ https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides
         <programlisting><![CDATA[
 { pkgs ? import <nixpkgs> {} }:
 let
-  myEmacs = pkgs.lib.overrideDerivation (pkgs.emacs.override {
+  myEmacs = (pkgs.emacs.override {
     # Use gtk3 instead of the default gtk2
     withGTK3 = true;
     withGTK2 = false;
-  }) (attrs: {
+  }).overrideAttrs (attrs: {
     # I don't want emacs.desktop file because I only use
     # emacsclient.
-    postInstall = attrs.postInstall + ''
+    postInstall = (attrs.postInstall or "") + ''
       rm $out/share/applications/emacs.desktop
     '';
   });