summary refs log tree commit diff
path: root/doc/stdenv.xml
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2016-06-25 14:25:58 +0100
committerzimbatm <zimbatm@zimbatm.com>2016-06-25 14:25:58 +0100
commit4f5918cd2e11082f33b3ce6a1bdcd5f70c68d3c2 (patch)
treebb0b815513dc9a0b5562c9795d725557a845e9d0 /doc/stdenv.xml
parent893ab31159486b260e0ede4ab876ea9cdf935fbc (diff)
downloadnixlib-4f5918cd2e11082f33b3ce6a1bdcd5f70c68d3c2.tar
nixlib-4f5918cd2e11082f33b3ce6a1bdcd5f70c68d3c2.tar.gz
nixlib-4f5918cd2e11082f33b3ce6a1bdcd5f70c68d3c2.tar.bz2
nixlib-4f5918cd2e11082f33b3ce6a1bdcd5f70c68d3c2.tar.lz
nixlib-4f5918cd2e11082f33b3ce6a1bdcd5f70c68d3c2.tar.xz
nixlib-4f5918cd2e11082f33b3ce6a1bdcd5f70c68d3c2.tar.zst
nixlib-4f5918cd2e11082f33b3ce6a1bdcd5f70c68d3c2.zip
Revert "stdenv: introduce baseHash() to replace stripHash()"
Introduced by mistake

This reverts commit e71a5cb87841f0af4a2279517b77a9a07ba394c0.
Diffstat (limited to 'doc/stdenv.xml')
-rw-r--r--doc/stdenv.xml30
1 files changed, 13 insertions, 17 deletions
diff --git a/doc/stdenv.xml b/doc/stdenv.xml
index 99c5d30c2db9..b075e0219a54 100644
--- a/doc/stdenv.xml
+++ b/doc/stdenv.xml
@@ -1191,35 +1191,31 @@ echo @foo@
     <replaceable>file</replaceable>.</para></listitem>
   </varlistentry>
 
-  <varlistentry xml:id='fun-baseHash'>
-    <term>
-      <function>baseHash</function>
-      <replaceable>path</replaceable>
-      <replaceable>suffix</replaceable>
-    </term>
+
+  <varlistentry xml:id='fun-stripHash'>
+    <term><function>stripHash</function>
+    <replaceable>path</replaceable></term>
     <listitem><para>Strips the directory and hash part of a store
     path, storing the name part in the environment variable
-    <literal>strippedName</literal>. If <literal>suffix</literal> is also
-    provided, the suffix will also be removed. For example:</para>
+    <literal>strippedName</literal>. For example:
     
 <programlisting>
-baseHash "/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
+stripHash "/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
 # prints coreutils-8.24
+echo $strippedName
 </programlisting>
 
+    If you wish to store the result in another variable, then the
+    following idiom may be useful:
+    
 <programlisting>
-baseHash "/nix/store/0016702zbydafsr20n9l1dcw7x2bf6jj-arraysugar-0.1.0.gem" .gem
-# prints arraysugar-0.1.0
+name="/nix/store/9s9r019176g7cvn2nvcw41gsp862y6b4-coreutils-8.24"
+someVar=$(stripHash $name; echo $strippedName)
 </programlisting>
-    </listitem>
 
+    </para></listitem>
   </varlistentry>
 
-  <varlistentry xml:id='fun-stripHash'>
-    <term><function>stripHash</function>
-    <replaceable>path</replaceable></term>
-    <listitem><para>Deprecated. Use baseHash instead.</para></listitem>
-  </varlistentry>
   
 </variablelist>