2014-01-20 23:57:04 +00:00
|
|
|
# generic builder for Emacs packages
|
|
|
|
|
|
|
|
{ lib, stdenv, emacs, texinfo }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{ pname
|
|
|
|
, version ? null
|
|
|
|
|
|
|
|
, buildInputs ? []
|
|
|
|
, packageRequires ? []
|
|
|
|
|
|
|
|
, meta ? {}
|
|
|
|
|
|
|
|
, ...
|
|
|
|
}@args:
|
|
|
|
|
|
|
|
let
|
2015-05-24 15:06:12 +01:00
|
|
|
|
2014-01-20 23:57:04 +00:00
|
|
|
defaultMeta = {
|
|
|
|
broken = false;
|
|
|
|
platforms = emacs.meta.platforms;
|
2015-05-24 15:06:12 +01:00
|
|
|
} // optionalAttrs ((args.src.meta.homepage or "") != "") {
|
|
|
|
homepage = args.src.meta.homepage;
|
2014-01-20 23:57:04 +00:00
|
|
|
};
|
2015-05-24 15:06:12 +01:00
|
|
|
|
2014-01-20 23:57:04 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation ({
|
|
|
|
name = "emacs-${pname}${optionalString (version != null) "-${version}"}";
|
|
|
|
|
|
|
|
buildInputs = [emacs texinfo] ++ packageRequires ++ buildInputs;
|
|
|
|
propagatedBuildInputs = packageRequires;
|
|
|
|
propagatedUserEnvPkgs = packageRequires;
|
|
|
|
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = defaultMeta // meta;
|
|
|
|
}
|
|
|
|
|
|
|
|
// removeAttrs args [ "buildInputs" "packageRequires"
|
|
|
|
"meta"
|
|
|
|
])
|