about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2022-11-05 23:53:41 +0200
committerArtturin <Artturin@artturin.com>2022-11-06 00:00:39 +0200
commit66cf79f28218d47f076826001198b849366504de (patch)
treeb4a52050a09115e9d2520872a072a107dac6ed90 /doc
parentc4b49b957bfd008a77be9188be0b43a34d5fd01e (diff)
downloadnixlib-66cf79f28218d47f076826001198b849366504de.tar
nixlib-66cf79f28218d47f076826001198b849366504de.tar.gz
nixlib-66cf79f28218d47f076826001198b849366504de.tar.bz2
nixlib-66cf79f28218d47f076826001198b849366504de.tar.lz
nixlib-66cf79f28218d47f076826001198b849366504de.tar.xz
nixlib-66cf79f28218d47f076826001198b849366504de.tar.zst
nixlib-66cf79f28218d47f076826001198b849366504de.zip
lib,doc: remove obvious usages of toString on paths
It gives a warning on the lazy-trees branch of Nix
(NixOS/nix#6530)

one of these was also giving me an error (the one in lib/trivial probably)

```
$ nix build
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/installer/sd-card/sd
-image-aarch64.nix' and then accessing it is deprecated, at /home/artturin/nixgits/my-nixpkgs/lib/modules.
nix:349:99
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/.git' and then accessing it is dep
recated, at /home/artturin/nixgits/my-nixpkgs/lib/sources.nix:35:32
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/system/etc/etc.nix'
and then accessing it is deprecated, at «stdin»:0
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/system/etc/etc-activ
ation.nix' and then accessing it is deprecated, at «stdin»:0
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/installer/sd-card/sd
-image-aarch64.nix' and then accessing it is deprecated, at «stdin»:0
error: cannot decode virtual path '/nix/store/virtual0000000000000000000000005-source'
(use '--show-trace' to show detailed location information)
```
Diffstat (limited to 'doc')
-rw-r--r--doc/doc-support/lib-function-locations.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/doc-support/lib-function-locations.nix b/doc/doc-support/lib-function-locations.nix
index 68edd2709854..ac4da88052da 100644
--- a/doc/doc-support/lib-function-locations.nix
+++ b/doc/doc-support/lib-function-locations.nix
@@ -38,7 +38,7 @@ let
       substr = builtins.substring prefixLen filenameLen filename;
       in substr;
 
-  removeNixpkgs = removeFilenamePrefix (builtins.toString pkgs.path);
+  removeNixpkgs = removeFilenamePrefix pkgs.path;
 
   liblocations =
     builtins.filter