stdenv: introduce baseHash() to replace stripHash()
stripHash uses a global variable to communicate it's computation results, but it's not necessary. You can just pipe to stdout in a subshell. A function mostly behaves like just another command. baseHash() also introduces a suffix-stripping capability since it's something the users of the function tend to use.
This commit is contained in:
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
|
||||
sourceRoot = "./";
|
||||
|
||||
unpackCmd = ''
|
||||
ttfName=$(basename $(stripHash $curSrc; echo $strippedName))
|
||||
ttfName=$(baseHash $curSrc)
|
||||
cp $curSrc ./$ttfName
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user