all-packages: Use callPackage where possible

This commit is contained in:
Mathnerd314
2015-09-14 22:27:19 -06:00
parent 7fb1c7efcf
commit eb7404d97a
64 changed files with 409 additions and 726 deletions

View File

@@ -1,26 +1,26 @@
args: with args; with stringsWithDeps; with lib;
args @ {stringsWithDeps, lib, stdenv, writeScript, fetchurl, fetchmtn, fetchgit, ...}: with args; with stringsWithDeps; with lib;
let inherit (builtins) head tail trace; in
(rec
{
inherit writeScript;
inherit writeScript;
src = attrByPath ["src"] "" args;
addSbinPath = attrByPath ["addSbinPath"] false args;
forceShare = if args ? forceShare then args.forceShare else ["man" "doc" "info"];
forceCopy = ["COPYING" "LICENSE" "DISTRIBUTION" "LEGAL"
"README" "AUTHORS" "ChangeLog" "CHANGES" "LICENCE" "COPYRIGHT"] ++
(optional (attrByPath ["forceCopyDoc"] true args) "doc");
forceCopy = ["COPYING" "LICENSE" "DISTRIBUTION" "LEGAL"
"README" "AUTHORS" "ChangeLog" "CHANGES" "LICENCE" "COPYRIGHT"] ++
(optional (attrByPath ["forceCopyDoc"] true args) "doc");
hasSuffixHack = a: b: hasSuffix (a+(substring 0 0 b)) ((substring 0 0 a)+b);
archiveType = s:
archiveType = s:
(if hasSuffixHack ".tar" s then "tar"
else if (hasSuffixHack ".tar.gz" s) || (hasSuffixHack ".tgz" s) then "tgz"
else if (hasSuffixHack ".tar.bz2" s) || (hasSuffixHack ".tbz2" s) ||
else if (hasSuffixHack ".tar.gz" s) || (hasSuffixHack ".tgz" s) then "tgz"
else if (hasSuffixHack ".tar.bz2" s) || (hasSuffixHack ".tbz2" s) ||
(hasSuffixHack ".tbz" s) then "tbz2"
else if hasSuffixHack ".tar.Z" s then "tZ"
else if hasSuffixHack ".tar.Z" s then "tZ"
else if hasSuffixHack ".tar.lzma" s then "tar.lzma"
else if hasSuffixHack ".tar.xz" s then "tar.xz"
else if hasSuffixHack ".rar" s then "rar"

View File

@@ -1,6 +1,6 @@
# trivial builder for Emacs packages
{ lib, ... }@envargs:
{ lib, stdenv, texinfo, ... }@envargs:
with lib;