1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 16:11:58 +00:00
nixpkgs/pkgs/build-support/emacs/generic.nix
2015-07-31 02:02:04 +00:00

46 lines
817 B
Nix

# generic builder for Emacs packages
{ lib, stdenv, emacs, texinfo }:
with lib;
{ pname
, version ? null
, buildInputs ? []
, packageRequires ? []
, meta ? {}
, ...
}@args:
let
defaultMeta = {
broken = false;
platforms = emacs.meta.platforms;
} // optionalAttrs ((args.src.meta.homepage or "") != "") {
homepage = args.src.meta.homepage;
};
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"
])