melpaBuild: add unpackCmd for single-file packages
Emacs packages are commonly distributed as single .el files. This unpackCmd handles them correctly and sets up sourceRoot. Other sources are treated in the default manner.
This commit is contained in:
@@ -29,6 +29,19 @@ in
|
||||
stdenv.mkDerivation ({
|
||||
name = "emacs-${pname}${optionalString (version != null) "-${version}"}";
|
||||
|
||||
unpackCmd = ''
|
||||
case "$curSrc" in
|
||||
*.el)
|
||||
cp $curSrc $pname.el
|
||||
chmod +w $pname.el
|
||||
sourceRoot="."
|
||||
;;
|
||||
*)
|
||||
_defaultUnpack "$curSrc"
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
|
||||
buildInputs = [emacs texinfo] ++ packageRequires ++ buildInputs;
|
||||
propagatedBuildInputs = packageRequires;
|
||||
propagatedUserEnvPkgs = packageRequires;
|
||||
|
||||
Reference in New Issue
Block a user