From eb7404d97a7e46df1f598a74982ca06e08033a45 Mon Sep 17 00:00:00 2001 From: Mathnerd314 Date: Mon, 14 Sep 2015 22:27:19 -0600 Subject: all-packages: Use callPackage where possible --- pkgs/build-support/builder-defs/builder-defs.nix | 20 ++++++++++---------- pkgs/build-support/emacs/trivial.nix | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'pkgs/build-support') diff --git a/pkgs/build-support/builder-defs/builder-defs.nix b/pkgs/build-support/builder-defs/builder-defs.nix index e7c64501614c..d4e7f703af9b 100644 --- a/pkgs/build-support/builder-defs/builder-defs.nix +++ b/pkgs/build-support/builder-defs/builder-defs.nix @@ -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" diff --git a/pkgs/build-support/emacs/trivial.nix b/pkgs/build-support/emacs/trivial.nix index 9c97e8bf9514..98463c56ba96 100644 --- a/pkgs/build-support/emacs/trivial.nix +++ b/pkgs/build-support/emacs/trivial.nix @@ -1,6 +1,6 @@ # trivial builder for Emacs packages -{ lib, ... }@envargs: +{ lib, stdenv, texinfo, ... }@envargs: with lib; -- cgit 1.4.1