forked from mirrors/nixpkgs
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:
parent
32c0069b79
commit
07a0031029
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue