diff options
Diffstat (limited to 'pkgs')
19 files changed, 4 insertions, 1309 deletions
diff --git a/pkgs/build-support/builder-defs/builder-defs.nix b/pkgs/build-support/builder-defs/builder-defs.nix deleted file mode 100644 index e21b032aacb..00000000000 --- a/pkgs/build-support/builder-defs/builder-defs.nix +++ /dev/null @@ -1,607 +0,0 @@ -args @ {stringsWithDeps, lib, stdenv, writeScript, fetchurl, fetchmtn, fetchgit, ...}: with args; with stringsWithDeps; with lib; -let inherit (builtins) head tail trace; in -(rec -{ - 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"); - - hasSuffixHack = a: b: hasSuffix (a+(substring 0 0 b)) ((substring 0 0 a)+b); - - 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) || - (hasSuffixHack ".tbz" s) then "tbz2" - 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" - else if (hasSuffixHack ".zip" s) || (hasSuffixHack ".ZIP" s) then "zip" - else if hasSuffixHack "-cvs-export" s then "cvs-dir" - else if hasSuffixHack "-git-export" s then "git-dir" - else if hasSuffixHack ".nar.bz2" s then "narbz2" - else if hasSuffixHack ".rpm" s then "rpm" - - # Mostly for manually specified directories.. - else if hasSuffixHack "/" s then "dir" - - # Last block - for single files!! It should be always after .tar.* - else if hasSuffixHack ".bz2" s then "plain-bz2" - else if hasSuffixHack ".gz" s then "plain-gz" - - # For bootstrap calls - else if (s ==("" + (substring 0 0 s))) then "empty" - - else (abort "unknown archive type : ${s}")); - - # changing this ? see [1] - defAddToSearchPath = fullDepEntry (" - addToSearchPathWithCustomDelimiter() { - local delimiter=\$1 - local varName=\$2 - local needDir=\$3 - local addDir=\${4:-\$needDir} - local prefix=\$5 - if [ -d \$prefix\$needDir ]; then - if [ -z \${!varName} ]; then - eval export \${varName}=\${prefix}\$addDir - else - eval export \${varName}=\${!varName}\${delimiter}\${prefix}\$addDir - fi - fi - } - - addToSearchPath() - { - addToSearchPathWithCustomDelimiter \"\${PATH_DELIMITER}\" \"\$@\" - } - ") ["defNest"]; - - # changing this ? see [1] - defNest = noDepEntry (" - nestingLevel=0 - - startNest() { - nestingLevel=\$((\$nestingLevel + 1)) - echo -en \"\\e[\$1p\" - } - - stopNest() { - nestingLevel=\$((\$nestingLevel - 1)) - echo -en \"\\e[q\" - } - - header() { - startNest \"\$2\" - echo \"\$1\" - } - - # Make sure that even when we exit abnormally, the original nesting - # level is properly restored. - closeNest() { - while test \$nestingLevel -gt 0; do - stopNest - done - } - - trap \"closeNest\" EXIT - "); - - - # changing this ? see [1] - minInit = fullDepEntry (" - ${stdenv.preHook} - - set -e - NIX_CC=${stdenv.cc} - export SHELL=${stdenv.shell} - PATH_DELIMITER=':' - - # Set up the initial path. - PATH= - for i in \$NIX_CC ${toString stdenv.initialPath}; do - PATH=\$PATH\${PATH:+\"\${PATH_DELIMITER}\"}\$i/bin - done - - export TZ=UTC - - prefix=${if args ? prefix then (toString args.prefix) else "\$out"} - - ") ["defNest" "defAddToSearchPath"]; - - # if you change this rewrite using '' instead of "" to get rid of indentation in builder scripts - addInputs = fullDepEntry (" - # Recursively find all build inputs. - findInputs() - { - local pkg=\$1 - - case \$pkgs in - *\\ \$pkg\\ *) - return 0 - ;; - esac - - pkgs=\"\$pkgs \$pkg \" - - echo \$pkg - if test -f \$pkg/nix-support/setup-hook; then - source \$pkg/nix-support/setup-hook - fi - } - - pkgs=\"\" - for i in \$NIX_CC ${toString realBuildInputs}; do - findInputs \$i - done - - - # Set the relevant environment variables to point to the build inputs - # found above. - addToEnv() - { - local pkg=\$1 - "+ - (if !((args ? ignoreFailedInputs) && (args.ignoreFailedInputs == 1)) then " - if [ -e \$1/nix-support/failed ]; then - echo \"failed input \$1\" >&2 - fail - fi - " else "") - +(if addSbinPath then " - if test -d \$1/sbin; then - export _PATH=\$_PATH\${_PATH:+\"\${PATH_DELIMITER}\"}\$1/sbin - fi - " else "") - +" - if test -d \$1/bin; then - export _PATH=\$_PATH\${_PATH:+\"\${PATH_DELIMITER}\"}\$1/bin - fi - - for i in \"\${envHooks[@]}\"; do - \$i \$pkg - done - } - - for i in \$pkgs; do - addToEnv \$i - done - - - # Add the output as an rpath. - if test \"\$NIX_NO_SELF_RPATH\" != \"1\"; then - export NIX_LDFLAGS=\"-rpath \$out/lib \$NIX_LDFLAGS\" - fi - - PATH=\$_PATH\${_PATH:+\"\${PATH_DELIMITER}\"}\$PATH - ") ["minInit"]; - - # changing this ? see [1] - defEnsureDir = fullDepEntry (" - # Ensure that the given directories exists. - ensureDir() { - local dir - for dir in \"\$@\"; do - if ! test -x \"\$dir\"; then mkdir -p \"\$dir\"; fi - done - } - ") ["minInit"]; - - # changing this ? see [1] - toSrcDir = s : fullDepEntry ((if (archiveType s) == "tar" then " - tar xvf '${s}' - cd \"\$(tar tf '${s}' | head -1 | sed -e 's@/.*@@' )\" - " else if (archiveType s) == "tgz" then " - tar xvzf '${s}' - cd \"\$(tar tzf '${s}' | head -1 | sed -e 's@/.*@@' )\" - " else if (archiveType s) == "tbz2" then " - tar xvjf '${s}' - cd \"\$(tar tjf '${s}' | head -1 | sed -e 's@/.*@@' )\" - " else if (archiveType s) == "tZ" then " - uncompress < '${s}' | tar x - cd \"\$(uncompress < '${s}' | tar t | head -1 | sed -e 's@/.*@@' )\" - " else if (archiveType s) == "tar.lzma" then " - unlzma -d -c <'${s}' | tar xv - cd \"\$(unlzma -d -c <'${s}' | tar t | head -1 | sed -e 's@/.*@@' )\" - " else if (archiveType s) == "tar.xz" then " - xz -d -c <'${s}' | tar xv - cd \"\$(xz -d -c <'${s}' | tar t | head -1 | sed -e 's@/.*@@' )\" - " else if (archiveType s) == "rar" then " - unrar x '${s}' - cd \"$(unrar lb '${s}' | tail -1 | sed -e 's@/.*@@' )\" - " else if (archiveType s) == "zip" then " - unzip '${s}' - cd \"$( unzip -lqq '${s}' | tail -1 | - sed -e 's@^\\(\\s\\+[-0-9:]\\+\\)\\{3,3\\}\\s\\+\\([^/]\\+\\)/.*@\\2@' )\" - " else if (archiveType s) == "cvs-dir" then " - cp -r '${s}' . - cd \$(basename ${s}) - chmod u+rwX -R . - " else if (archiveType s) == "git-dir" then " - cp -r '${s}' . - cd \$(basename ${s}) - chmod u+rwX -R . - " else if (archiveType s) == "dir" then " - cp -r '${s}' . - cd \$(basename ${s}) - chmod u+rwX -R . - " else if (archiveType s) == "narbz2" then " - bzip2 <${s} | nix-store --restore \$PWD/\$(basename ${s} .nar.bz2) - cd \$(basename ${s} .nar.bz2) - " else if (archiveType s) == "rpm" then '' - rpm2cpio ${s} > ${s}.cpio - cpio -iv < ${s}.cpio - test -f *.tar.* && tar -xvf *.tar.* - test -d */ && cd */ - '' else if (archiveType s) == "plain-bz2" then " - mkdir \$PWD/\$(basename ${s} .bz2) - NAME=\$(basename ${s} .bz2) - bzip2 -d <${s} > \$PWD/\$(basename ${s} .bz2)/\${NAME#*-} - cd \$(basename ${s} .bz2) - " else if (archiveType s) == "plain-gz" then " - mkdir \$PWD/\$(basename ${s} .gz) - NAME=\$(basename ${s} .gz) - gzip -d <${s} > \$PWD/\$(basename ${s} .gz)/\${NAME#*-} - cd \$(basename ${s} .gz) - " else if (archiveType s) == "empty" then " - echo No source to unpack - doing nothing .. - " else (abort "unknown archive type : ${s}"))+ - # goSrcDir is typically something like "cd mysubdir" .. but can be anything else - (if args ? goSrcDir then args.goSrcDir else "") - ) ["minInit"]; - - configureCommand = attrByPath ["configureCommand"] "./configure" args; - - # changing this ? see [1] - doConfigure = fullDepEntry (" - ${configureCommand} --prefix=\"\$prefix\" ${toString configureFlags} - ") ["minInit" "addInputs" "doUnpack"]; - - # changing this ? see [1] - doIntltool = fullDepEntry (" - mkdir -p config - intltoolize --copy --force - ") ["minInit" "addInputs" "doUnpack"]; - - # changing this ? see [1] - doAutotools = fullDepEntry (" - mkdir -p config - libtoolize --copy --force - aclocal --force - #Some packages do not need this - autoheader || true; - automake --add-missing --copy - autoconf - ")["minInit" "addInputs" "doUnpack"]; - - # changing this ? see [1] - doAutogen = fullDepEntry ('' - ./autogen.sh - '')["minInit" "addInputs" "doUnpack"]; - - # changing this ? see [1] - doMake = fullDepEntry (" - make ${toString makeFlags} - ") ["minInit" "addInputs" "doUnpack"]; - - doUnpack = toSrcDir (toString src); - - # changing this ? see [1] - installPythonPackage = fullDepEntry (" - python setup.py install --prefix=\"\$prefix\" - ") ["minInit" "addInputs" "doUnpack"]; - - doPythonConfigure = fullDepEntry ('' - pythonVersion=$(toPythonPath "$prefix") - pythonVersion=''${pythonVersion#*/lib/python} - pythonVersion=''${pythonVersion%%/site-packages} - ${if args ? extraPythonConfigureCommand then - args.extraPythonConfigureCommand - else ""} - python configure.py -b "$prefix/bin" -d "$(toPythonPath "$prefix")" -v "$prefix/share/sip" ${toString configureFlags} - '') ["minInit" "addInputs" "doUnpack"]; - - # changing this ? see [1] - doMakeInstall = fullDepEntry (" - make ${toString (attrByPath ["makeFlags"] "" args)} "+ - "${toString (attrByPath ["installFlags"] "" args)} install") ["doMake"]; - - # changing this ? see [1] - doForceShare = fullDepEntry (" - mkdir -p \"\$prefix/share\" - for d in ${toString forceShare}; do - if [ -d \"\$prefix/\$d\" -a ! -d \"\$prefix/share/\$d\" ]; then - mv -v \"\$prefix/\$d\" \"\$prefix/share\" - ln -sv share/\$d \"\$prefix\" - fi; - done; - ") ["minInit" "defEnsureDir"]; - - doForceCopy = fullDepEntry ('' - name="$(basename $out)" - name="''${name#*-}" - mkdir -p "$prefix/share/$name" - for f in ${toString forceCopy}; do - cp -r "$f" "$prefix/share/$name/$f" || true - done; - '') ["minInit" "defEnsureDir"]; - - doDump = n: noDepEntry "echo Dump number ${n}; set"; - - saveEnv = noDepEntry ''export > "$TMP/env-vars" || true''; - - doDumpBuildInputs = noDepEntry ('' - echo "${toString realBuildInputs}" - ''); - - patchFlags = if args ? patchFlags then args.patchFlags else "-p1"; - - patches = attrByPath ["patches"] [] args; - - toPatchCommand = s: "cat ${s} | patch ${toString patchFlags}"; - - doPatch = fullDepEntry (concatStringsSep ";" - (map toPatchCommand patches) - ) ["minInit" "doUnpack"]; - - envAdderInner = s: x: if x==null then s else y: - a: envAdderInner (s+"echo export ${x}='\"'\"\$${x}:${y}\";'\"'\n") a; - - envAdder = envAdderInner ""; - - envAdderList = l: if l==[] then "" else - "echo export ${head l}='\"'\"\\\$${head l}:${head (tail l)}\"'\"';\n" + - envAdderList (tail (tail l)); - - # changing this ? see [1] - wrapEnv = cmd: env: " - mv \"${cmd}\" \"${cmd}-orig\"; - touch \"${cmd}\"; - chmod a+rx \"${cmd}\"; - (${envAdderList env} - echo '\"'\"${cmd}-orig\"'\"' '\"'\\\$@'\"' \n) > \"${cmd}\""; - - doWrap = cmd: fullDepEntry (wrapEnv cmd (attrByPath ["wrappedEnv"] [] args)) ["minInit"]; - - makeManyWrappers = wildcard : wrapperFlags : fullDepEntry ('' - for i in ${wildcard}; do - wrapProgram "$i" ${wrapperFlags} - done - '') ["minInit" "addInputs" "defEnsureDir"]; - - wrapBinContentsPython = (makeManyWrappers - ''$out/bin/*'' - pythonWrapperArguments - ); - - pythonWrapperArguments = - (''--prefix PYTHONPATH : $(toPythonPath $out)'' + - ''''${PYTHONPATH:+ --prefix PYTHONPATH : $PYTHONPATH}''); - - preservePathWrapperArguments = ''''${PATH:+ --prefix PATH : $PATH }''; - - doPropagate = fullDepEntry (" - mkdir -p \$out/nix-support - echo '${toString (attrByPath ["propagatedBuildInputs"] [] args)}' >\$out/nix-support/propagated-build-inputs - ") ["minInit" "defEnsureDir"]; - - cmakeFlags = attrByPath ["cmakeFlags"] [] args; - - cmakeRPathFlag = if attrByPath ["cmakeSkipRpath "] true args then " -DCMAKE_SKIP_BUILD_RPATH=ON " else ""; - - cmakeBuildDir = attrByPath ["cmakeBuildDir"] "build" args; - - doCmake = fullDepEntry ('' - mkdir ${cmakeBuildDir} - cd ${cmakeBuildDir} - cmake -D CMAKE_INSTALL_PREFIX="$out" ${cmakeRPathFlag}${toString cmakeFlags} .. - '') ["minInit" "addInputs" "doUnpack"]; - - doScons = fullDepEntry ('' - mkdir -p $out - ${if (attrByPath ["sconsCleanEnv"] false args) - then "" - else '' - sed -e '1iimport os' -i SConstruct - sed -e 's/env *= *Environment *.*/&; env['"'"'ENV'"'"']=os.environ;/' -i SConstruct - '' - } - scons ${toString (attrByPath ["sconsFlags"] [] args)} PREFIX=$out - scons ${toString (attrByPath ["sconsFlags"] [] args)} PREFIX=$out install - '') ["minInit" "doUnpack" "addInputs" "defEnsureDir"]; - - /*debug = x:(trace x x); - debugX = x:(trace (toXML x) x);*/ - - makeNest = x: if x == defNest.text then x else "startNest\n" + x + "\nstopNest\n"; - textClosure = a: steps: textClosureMap makeNest a (["defNest"] ++ steps); - - inherit noDepEntry fullDepEntry packEntry; - - defList = attrByPath ["defList"] [] args; - getVal = getValue args defList; - check = checkFlag args; - reqsList = attrByPath ["reqsList"] [] args; - buildInputsNames = filter (x: null != getVal x) - (uniqList {inputList = - (concatLists (map - (x: if x==[] then [] else builtins.tail x) - reqsList));}); - configFlags = attrByPath ["configFlags"] [] args; - buildFlags = attrByPath ["buildFlags"] [] args; - nameSuffixes = attrByPath ["nameSuffixes"] [] args; - autoBuildInputs = assert (checkReqs args defList reqsList); - filter (x: x!=null) (map getVal buildInputsNames); - autoConfigureFlags = condConcat "" configFlags check; - autoMakeFlags = condConcat "" buildFlags check; - useConfig = attrByPath ["useConfig"] false args; - realBuildInputs = - lib.closePropagation ((if useConfig then - autoBuildInputs else - attrByPath ["buildInputs"] [] args)++ - (attrByPath ["propagatedBuildInputs"] [] args)); - configureFlags = if useConfig then autoConfigureFlags else - attrByPath ["configureFlags"] "" args; - makeFlags = if useConfig then autoMakeFlags else attrByPath ["makeFlags"] "" args; - - inherit lib; - - surroundWithCommands = x : before : after : {deps=x.deps; text = before + "\n" + - x.text + "\n" + after ;}; - - createDirs = fullDepEntry (concatStringsSep ";" - (map (x: "mkdir -p ${x}") (attrByPath ["neededDirs"] [] args)) - ) ["minInit" "defEnsureDir"]; - - copyExtraDoc = fullDepEntry ('' - name="$(basename $out)" - name="''${name#*-}" - mkdir -p "$out/share/doc/$name" - '' + (concatStringsSep ";" - (map - (x: ''cp "${x}" "$out/share/doc/$name" || true;'') - (attrByPath ["extraDoc"] [] args)))) ["minInit" "defEnsureDir" "doUnpack"]; - - realPhaseNames = - (optional ([] != attrByPath ["neededDirs"] [] args) "createDirs") - ++ - (attrByPath ["phaseNames"] [] args) - ++ - ["doForceShare" "doPropagate" "doForceCopy"] - ++ - (optional ([] != attrByPath ["extraDoc"] [] args) "copyExtraDoc") - ++ - (optional (attrByPath ["doCheck"] false args) "doMakeCheck") - ++ - (optional (attrByPath ["alwaysFail"] false args) "doFail") - ; - - doFail = noDepEntry " - echo 'Failing to keep builddir (and to invalidate result).' - a() { return 127; } ; a ; - "; - - doMakeCheck = fullDepEntry ('' - make check - '') ["minInit"]; - - extraDerivationAttrs = lib.attrByPath ["extraDerivationAttrs"] {} args; - - # for overrides.. - builderDefsArgs = args; - - innerBuilderDefsPackage = bd: args: ( - let localDefs = bd.passthru.function args; in - - stdenv.mkDerivation ((rec { - inherit (localDefs) name; - buildCommand = textClosure localDefs localDefs.realPhaseNames; - meta = localDefs.meta; - passthru = localDefs.passthru // {inherit (localDefs) src; }; - }) // (if localDefs ? propagatedBuildInputs then { - inherit (localDefs) propagatedBuildInputs; - } else {}) // extraDerivationAttrs) - ); - - builderDefsPackage = bd: func: - if builtins.isFunction func then - (foldArgs - (x: y: ((func (bd // x // y)) // y)) - (innerBuilderDefsPackage bd) - {}) - else - (builderDefsPackage bd (import (toString func))) - ; - - generateFontsFromSFD = fullDepEntry ('' - for i in *.sfd; do - echo $i; - fontforge -c \ - 'Open($1); - ${optionalString (args ? extraFontForgeCommands) args.extraFontForgeCommands - }Reencode("unicode"); - ${optionalString (attrByPath ["createTTF"] true args) ''Generate($1:r + ".ttf");''} - ${optionalString (attrByPath ["createOTF"] true args) ''Generate($1:r + ".otf");''} - Reencode("TeX-Base-Encoding"); - ${optionalString (attrByPath ["createAFM"] true args) ''Generate($1:r + ".afm");''} - ${optionalString (attrByPath ["createPFM"] true args) ''Generate($1:r + ".pfm");''} - ${optionalString (attrByPath ["createPFB"] true args) ''Generate($1:r + ".pfb");''} - ${optionalString (attrByPath ["createMAP"] true args) ''Generate($1:r + ".map");''} - ${optionalString (attrByPath ["createENC"] true args) ''Generate($1:r + ".enc");''} - ' $i; - done - '') ["minInit" "addInputs" "doUnpack"]; - - installFonts = - let retrievedName = (if args ? name then args.name else ""); in - fullDepEntry ('' - mkdir -p $out/share/fonts/truetype/public/${retrievedName} - mkdir -p $out/share/fonts/opentype/public/${retrievedName} - mkdir -p $out/share/fonts/type1/public/${retrievedName} - mkdir -p $out/share/texmf/fonts/enc/${retrievedName} - mkdir -p $out/share/texmf/fonts/map/${retrievedName} - - find -name '*.ttf' -exec cp {} $out/share/fonts/truetype/public/${retrievedName} \; - find -name '*.otf' -exec cp {} $out/share/fonts/opentype/public/${retrievedName} \; - find -name '*.pfm' -o -name '*.afm' -o -name '*.pfb' -exec cp {} $out/share/fonts/type1/public/${retrievedName} \; - find -name '*.enc' -exec cp {} $out/share/texmf/fonts/enc/${retrievedName} \; - find -name '*.map' -exec cp {} $out/share/texmf/fonts/map/${retrievedName} \; - '') ["minInit" "defEnsureDir"]; - - simplyShare = shareName: fullDepEntry ('' - mkdir -p $out/share - cp -r . $out/share/${shareName} - '') ["doUnpack" "defEnsureDir"]; - - doPatchShebangs = dir: fullDepEntry ('' - patchShebangFun() { - # Rewrite all script interpreter file names (`#! /path') under the - # specified directory tree to paths found in $PATH. E.g., - # /bin/sh will be rewritten to /nix/store/<hash>-some-bash/bin/sh. - # Interpreters that are already in the store are left untouched. - echo "patching script interpreter paths" - local f - for f in $(find "${dir}" -xtype f -perm -0100); do - local oldPath=$(sed -ne '1 s,^#![ ]*\([^ ]*\).*$,\1,p' "$f") - if test -n "$oldPath" -a "''${oldPath:0:''${#NIX_STORE}}" != "$NIX_STORE"; then - local newPath=$(type -P $(basename $oldPath) || true) - if test -n "$newPath" -a "$newPath" != "$oldPath"; then - echo "$f: interpreter changed from $oldPath to $newPath" - sed -i "1 s,$oldPath,$newPath," "$f" - else - echo "$f: not changing interpreter from $oldPath" - fi - fi - done - } - patchShebangFun; - '') ["minInit"]; - - createPythonInstallationTarget = fullDepEntry ('' - mkdir -p $(toPythonPath $out) - export PYTHONPATH=$PYTHONPATH''${PYTHONPATH:+:}$(toPythonPath $out) - '') ["minInit" "addInputs" "defEnsureDir"]; - - fetchUrlFromSrcInfo = srcInfo: fetchurl ({ - url = srcInfo.url; - sha256 = srcInfo.hash; - } // - (if srcInfo ? downloadName then {name = srcInfo.downloadName;} else {})); - - fetchGitFromSrcInfo = srcInfo: fetchgit { - url = srcInfo.url; - rev = srcInfo.rev; - sha256 = srcInfo.hash; - }; -}) // args - -# [1]: rewrite using '' instead of " so that indentation gets stripped. It's -# only about some spaces but in the end they will sum up diff --git a/pkgs/build-support/builder-defs/template-auto-callable.nix b/pkgs/build-support/builder-defs/template-auto-callable.nix deleted file mode 100644 index a94a96fe538..00000000000 --- a/pkgs/build-support/builder-defs/template-auto-callable.nix +++ /dev/null @@ -1,48 +0,0 @@ -x@{builderDefsPackage - (abort "Specify dependencies") - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - [(abort "Specify helper argument names")]; - - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="${abort ''Specify package name''}"; - version=""; - name="${baseName}-${version}"; - url="${name}"; - hash=""; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; - }; - - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - meta = { - description = "${abort ''Specify description''}"; - maintainers = with a.lib.maintainers; - [ - (abort "Specify maintainers") - ]; - platforms = with a.lib.platforms; - (abort "Specify platforms"); - license = a.lib.licenses.(abort "Specify license"); - }; - passthru = { - updateInfo = { - downloadPage = "${abort ''Specify download page''}"; - }; - }; -}) x - diff --git a/pkgs/build-support/builder-defs/template-bdp-uud.nix b/pkgs/build-support/builder-defs/template-bdp-uud.nix deleted file mode 100644 index 2b2af257d37..00000000000 --- a/pkgs/build-support/builder-defs/template-bdp-uud.nix +++ /dev/null @@ -1,26 +0,0 @@ -a : -let - s = import ./src-for-default.nix; - buildInputs = with a; [ - - ]; -in -rec { - src = a.fetchUrlFromSrcInfo s; - - inherit (s) name; - inherit buildInputs; - configureFlags = []; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - meta = { - description = "${abort "Specify description"}"; - maintainers = [ - a.lib.maintainers.(abort "Specify maintainer") - ]; - platforms = with a.lib.platforms; - (abort "Specify supported platforms"); - }; -} diff --git a/pkgs/build-support/builder-defs/template-composing+config.nix b/pkgs/build-support/builder-defs/template-composing+config.nix deleted file mode 100644 index a774d421efa..00000000000 --- a/pkgs/build-support/builder-defs/template-composing+config.nix +++ /dev/null @@ -1,22 +0,0 @@ -args : with args; let localDefs = builderDefs (args // rec { - src = /* put a fetchurl here */ - (abort "Specify source"); - useConfig = true; - reqsList = [ - ["true" ] - ["false"] - ]; - /* List consisiting of an even number of strings; "key" "value" */ - configFlags = [ - ]; - }) args null; /* null is a terminator for sumArgs */ - in with localDefs; -stdenv.mkDerivation rec { - name = "${(abort "Specify name")}"+version; - builder = writeScript (name + "-builder") - (textClosure localDefs [(abort "Check phases") doMakeInstall doForceShare doPropagate]); - meta = { - description = "${(abort "Specify description")}"; - inherit src; - }; -} diff --git a/pkgs/build-support/builder-defs/template-composing-builder.nix b/pkgs/build-support/builder-defs/template-composing-builder.nix deleted file mode 100644 index 979df800008..00000000000 --- a/pkgs/build-support/builder-defs/template-composing-builder.nix +++ /dev/null @@ -1,26 +0,0 @@ -a : -let - fetchurl = a.fetchurl; - - version = a.lib.attrByPath ["version"] "" a; - buildInputs = with a; [ - - ]; -in -rec { - src = /* Here a fetchurl expression goes */; - - inherit buildInputs; - configureFlags = []; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - name = "${abort "Specify name"}-" + version; - meta = { - description = "${abort "Specify description"}"; - maintainers = [ - a.lib.maintainers.(abort "Specify maintainer") - ]; - }; -} diff --git a/pkgs/build-support/upstream-updater/attrset-to-dir.sh b/pkgs/build-support/upstream-updater/attrset-to-dir.sh deleted file mode 100755 index 2d99ef110a1..00000000000 --- a/pkgs/build-support/upstream-updater/attrset-to-dir.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh - -[ -n "$2" ] && NIXPKGS_ALL="$2"; -[ -z "$NIXPKGS_ALL" ] && [ -d "/etc/nixos/nixpkgs" ] && NIXPKGS_ALL="/etc/nixos/nixpkgs"; -[ -z "$NIXPKGS_ALL" ] && [ -d "$HOME/nixpkgs" ] && NIXPKGS_ALL="$HOME/nixpkgs"; -[ -z "$NIXPKGS_ALL" ] && { - echo "Cannot find Nixpkgs source. Please specify it via NIXPKGS_ALL or second command line argument" - exit 1 -}; - -derivation="$(nix-instantiate --show-trace - << EOF -let - pkgs = import "${NIXPKGS_ALL}" {}; - attrSet = import "${1}"; -in - pkgs.attrSetToDir attrSet -EOF -)" -echo "Derivation is: $derivation" >&2 -output="$(nix-store -r "$derivation")" -echo "$output/attributes" diff --git a/pkgs/development/interpreters/octave/hg.nix b/pkgs/development/interpreters/octave/hg.nix deleted file mode 100644 index 797fff584f6..00000000000 --- a/pkgs/development/interpreters/octave/hg.nix +++ /dev/null @@ -1,49 +0,0 @@ -{stdenv, fetchurl, gfortran, readline, ncurses, perl, flex, - bison, autoconf, automake, sourceFromHead, config, lib, atlas, gperf, python, glibc, gnuplot, texinfo, texLive, qhull, libX11}: - -let commonBuildInputs = [gfortran readline ncurses perl glibc qhull libX11 texinfo]; in - -stdenv.mkDerivation ({ - NIX_LDFLAGS = "-lpthread"; - configureFlags = "--enable-readline --enable-dl"; - meta = { - description = "High-level interactive language for numerical computations"; - homepage = http://www.octave.org; - license = stdenv.lib.licenses.gpl3; - }; -} // ( - if config.octave.devVersion or false then { - name = "octave-hg"; # developement version mercurial repo - # REGION AUTO UPDATE: { name="octave"; type = "hg"; url = "http://www.octave.org/hg/octave"; } - src = sourceFromHead "octave-03b414516dd8.tar.gz" - (fetchurl { url = "http://mawercer.de/~nix/repos/octave-03b414516dd8.tar.gz"; sha256 = "30877f1e2ff1a456e7a76153aabf7c59ce7c7a8b63eda0515b1eead6a4351ce7"; }); - # END - # HOME is set to $TMP because octave needs to access ${HOME}/.octave_hist while running targets - # in doc/interpreter.. Maybe this can be done better. This hack is fastest :) - preConfigure = '' - # glob is contained in glibc! Don't know why autotools want to use -lglob - sed -i 's/-lglob//' configure.in - ./autogen.sh - export HOME=$TMP - ''; - buildInputs = commonBuildInputs ++ [ flex bison autoconf automake gperf gnuplot texLive ] - ++ lib.optionals (config.octave.atlas or true) [ python atlas ]; - # it does build, but documentation doesn't.. So just remove that directory - # from the buildfile - buildPhase = '' - sed -i octMakefile \ - -e 's/^\(INSTALL_SUBDIRS = .*\)doc \(.*\)$/\1 \2/' \ - -e 's/^\(SUBDIRS = .*\)doc \(.*\)$/\1 \2/' \ - -e 's/\$(MAKE) -C doc/#/' - make - ''; - } else { - name = "octave-3.1.55"; - src = fetchurl { - url = ftp://ftp.octave.org/pub/octave/bleeding-edge/octave-3.1.55.tar.bz2; - sha256 = "1lm4v85kdic4n5yxwzrdb0v6dc6nw06ljgx1q8hfkmi146kpg7s6"; - }; - buildInputs = commonBuildInputs ++ [ flex bison autoconf automake python ] - ++ lib.optionals (config.octave.atlas or true) [ python atlas ]; - } -)) diff --git a/pkgs/tools/typesetting/tex/texlive/aggregate.nix b/pkgs/tools/typesetting/tex/texlive/aggregate.nix deleted file mode 100644 index 550870b0a6a..00000000000 --- a/pkgs/tools/typesetting/tex/texlive/aggregate.nix +++ /dev/null @@ -1,87 +0,0 @@ -args @ {poppler, perl, makeWrapper, ... }: with args; -rec { - name = "TeXLive-linkdir"; - - buildInputs = lib.closePropagation paths - ++ [perl] - ++ stdenv.lib.optional stdenv.isDarwin makeWrapper; - - phaseNames = [ "doAggregate" ]; - - doAggregate = fullDepEntry ('' - set +o pipefail - - mkdir -p $out/bin - for currentPath in ${lib.concatStringsSep " " buildInputs}; do - echo Symlinking "$currentPath" - find $currentPath/share/info $currentPath/share/man $(echo $currentPath/texmf*/) -type d | while read; do - REPLY="''${REPLY#$currentPath}" - mkdir -p $out/"$REPLY" - done - find $currentPath/share/info $currentPath/share/man $(echo $currentPath/texmf*/) ! -type d | while read; do - REPLY="''${REPLY#$currentPath}" - ln -fs $currentPath/"$REPLY" $out/"$REPLY" - echo - done | while read; do head -n 999 >/dev/null; echo -n .; done - - for i in "$currentPath/bin/"* :; do - test "$i" != : || continue - echo -ne "#! $SHELL\\nexec $i \"\$@\"" > "$out/bin/$(basename "$i")" && \ - chmod a+x "$out/bin/$(basename "$i")" - done - - echo - - cp -Trfp $currentPath/libexec $out/libexec || true - done - - ln -s $out/texmf* $out/share/ - - rm -rf $out/texmf-config - find $out/texmf*/ -type d | while read; do - REPLY="''${REPLY#$out/texmf}" - mkdir -p $out/texmf-config/"$REPLY" - done - - for i in $out/libexec/*/* :; do - test "$i" = : && continue; - test -f "$i" && \ - test -x "$i" && \ - echo -ne "#! $SHELL\\nexec $i \"\$@\"" >$out/bin/$(basename $i) && \ - chmod a+x $out/bin/$(basename $i) - done - - rm -f $out/texmf*/ls-R - for i in web2c texconfig fonts/map; do - mkdir -p $out/texmf-config/$i - cp -Lr $out/texmf*/$i/* $out/texmf-config/$i || true - done - chmod -R u+w $out/texmf-config - - yes | TEXMFCONFIG=$out/texmf-config HOME=$PWD PATH=$PATH:$out/bin updmap --syncwithtrees - yes | PATH=$PATH:$out/bin mktexlsr $out/texmf* - yes | TEXMFCONFIG=$out/texmf-config HOME=$PWD PATH=$PATH:$out/bin updmap --syncwithtrees - yes | PATH=$PATH:$out/bin mktexlsr $out/texmf* - '' + stdenv.lib.optionalString stdenv.isDarwin '' - # did the same thing in texLive, but couldn't get it to carry to the - # binaries installed by texLiveFull - for prog in $out/bin/*; do - wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${poppler.out}/lib" - done - '' ) [ "minInit" "defEnsureDir" "addInputs" ]; - - preferLocalBuild = true; - - meta = { - description = "TeX distribution directory"; - longDescription = '' - Here all the files from different TeX-related - packages are collected in one directory. Of - course, mktexlsr is called. Later placed - directories take precedence. It is supposed that - share and libexec are symlinked, and bin is - recreated with wrappers for libexec-located - linked binaries. - ''; - }; -} diff --git a/pkgs/tools/typesetting/tex/texlive/beamer.nix b/pkgs/tools/typesetting/tex/texlive/beamer.nix deleted file mode 100644 index 7acecd66543..00000000000 --- a/pkgs/tools/typesetting/tex/texlive/beamer.nix +++ /dev/null @@ -1,25 +0,0 @@ -args @ {texLiveLatexXColor, texLivePGF, texLive, ...}: with args; -rec { - name = "texlive-beamer-2013"; - src = fetchurl { - url = mirror://debian/pool/main/l/latex-beamer/latex-beamer_3.24.orig.tar.gz; - sha256 = "0rzjlbs67kzmvlh7lwga4yxgddvrvfkkhhx1ajdn4lqy2w9zxiv8"; - }; - - buildInputs = [texLive]; - propagatedBuildInputs = [texLiveLatexXColor texLivePGF]; - phaseNames = ["doCopy"]; - doCopy = fullDepEntry ('' - mkdir -p $out/share/ - - mkdir -p $out/texmf-dist/tex/latex/beamer - cp -r * $out/texmf-dist/tex/latex/beamer - - ln -s $out/texmf* $out/share/ - '') ["minInit" "doUnpack" "defEnsureDir" "addInputs"]; - - meta = { - description = "Extra components for TeXLive: beamer class"; - maintainers = [ stdenv.lib.maintainers.mornfall stdenv.lib.maintainers.jwiegley ]; - }; -} diff --git a/pkgs/tools/typesetting/tex/texlive/cm-super.nix b/pkgs/tools/typesetting/tex/texlive/cm-super.nix deleted file mode 100644 index 5c442fad27f..00000000000 --- a/pkgs/tools/typesetting/tex/texlive/cm-super.nix +++ /dev/null @@ -1,35 +0,0 @@ -args @ {texLive, ...}: with args; -rec { - name = "texlive-cm-super-2009"; - src = fetchurl { - url = mirror://debian/pool/main/c/cm-super/cm-super_0.3.4.orig.tar.gz; - sha256 = "0zrq4sr9ank35svkz3cfd7f978i9c8xbzdqm2c8kvxia2753v082"; - }; - - phaseNames = ["doCopy"]; - doCopy = fullDepEntry ('' - mkdir -p $out/share/ - - mkdir -p $out/texmf-dist/fonts/enc - mkdir -p $out/texmf-dist/fonts/map - mkdir -p $out/texmf-dist/fonts/type1/public/cm-super - cp pfb/*.pfb $out/texmf-dist/fonts/type1/public/cm-super - mkdir -p $out/texmf-dist/dvips/cm-super - cp dvips/*.{map,enc} $out/texmf-dist/dvips/cm-super - cp dvips/*.enc $out/texmf-dist/fonts/enc - cp dvips/*.map $out/texmf-dist/fonts/map - mkdir -p $out/texmf-dist/dvipdfm/config - cp dvipdfm/*.map $out/texmf-dist/dvipdfm/config - - ln -s $out/texmf* $out/share/ - '') ["minInit" "doUnpack" "defEnsureDir" "addInputs"]; - buildInputs = [texLive]; - - meta = { - description = "Extra components for TeXLive: CM-Super fonts"; - maintainers = [ args.lib.maintainers.raskin ]; - - # Actually, arch-independent.. - hydraPlatforms = []; - }; -} diff --git a/pkgs/tools/typesetting/tex/texlive/context.nix b/pkgs/tools/typesetting/tex/texlive/context.nix deleted file mode 100644 index 2cc62c33409..00000000000 --- a/pkgs/tools/typesetting/tex/texlive/context.nix +++ /dev/null @@ -1,25 +0,0 @@ -args @ { texLive, ... }: with args; -rec { - name = "context-2014.05.21"; - src = fetchurl { - url = mirror://debian/pool/main/c/context/context_2014.05.21.20140528.orig.tar.gz; - sha256 = "1d744xrsjyl52x2xbh87k5ad826mzz8yqmhdznrmqrhk3qpjkzic"; - }; - - buildInputs = [texLive]; - phaseNames = ["doCopy"]; - doCopy = fullDepEntry ('' - mkdir -p $out/share/ - - mkdir -p $out/texmf-dist - cp -r * $out/texmf-dist - - ln -s $out/texmf* $out/share/ - '') ["minInit" "doUnpack" "defEnsureDir" "addInputs"]; - - meta = { - description = "ConTEXt TeX wrapper"; - }; - -} - diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix deleted file mode 100644 index 3a93c6445a7..00000000000 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ /dev/null @@ -1,161 +0,0 @@ -args @ { -builderDefs, zlib, bzip2, ncurses, libpng, ed, lesstif, ruby, potrace -, gd, t1lib, freetype, icu, perl, expat, curl, xz, pkgconfig, zziplib, texinfo -, libjpeg, bison, python, fontconfig, flex, poppler, libpaper, graphite2 -, makeWrapper, gmp, mpfr, xpdf, config -, libXaw, libX11, xproto, libXt, libXpm -, libXmu, libXext, xextproto, libSM, libICE -, ... }: with args; - -rec { - src = assert config.allowTexliveBuilds or true; fetchurl { - url = mirror://debian/pool/main/t/texlive-bin/texlive-bin_2014.20140926.35254.orig.tar.xz; - sha256 = "1c39x059jhn5jsy6i9j3akjbkm1kmmzssy1jyi1aw20rl2vp86w3"; - }; - - texmfVersion = "2014.20141024"; - texmfSrc = fetchurl { - url = "mirror://debian/pool/main/t/texlive-base/texlive-base_${texmfVersion}.orig.tar.xz"; - sha256 = "1a6968myfi81s76n9p1qljgpwia9mi55pkkz1q6lbnwybf97akj1"; - }; - - langTexmfVersion = "2014.20141024"; - langTexmfSrc = fetchurl { - url = "mirror://debian/pool/main/t/texlive-lang/texlive-lang_${langTexmfVersion}.orig.tar.xz"; - sha256 = "1ydz5m1v40n34g1l31r3vqg74rbr01x2f80drhz4igh21fm7zzpa"; - }; - - passthru = { inherit texmfSrc langTexmfSrc; }; - - setupHook = ./setup-hook.sh; - - doMainBuild = fullDepEntry ( stdenv.lib.optionalString stdenv.isDarwin '' - export DYLD_LIBRARY_PATH="${poppler.out}/lib" - '' + '' - mkdir -p $out - mkdir -p $out/nix-support - cp ${setupHook} $out/nix-support/setup-hook.sh - mkdir -p $out/share - tar xf ${texmfSrc} -C $out --strip-components=1 - tar xf ${langTexmfSrc} -C $out --strip-components=1 - - sed -e s@/usr/bin/@@g -i $(grep /usr/bin/ -rl . ) - - sed -e 's@dehypht-x-2013-05-26@dehypht-x-2014-05-21@' -i $(grep 'dehypht-x' -rl $out ) - sed -e 's@dehyphn-x-2013-05-26@dehyphn-x-2014-05-21@' -i $(grep 'dehyphn-x' -rl $out ) - - sed -e 's@\<env ruby@${ruby}/bin/ruby@' -i $(grep 'env ruby' -rl . ) - sed -e 's@\<env perl@${perl}/bin/perl@' -i $(grep 'env perl' -rl . ) - sed -e 's@\<env python@${python}/bin/python@' -i $(grep 'env python' -rl . ) - - sed -e '/ubidi_open/i#include <unicode/urename.h>' -i $(find . -name configure) - sed -e 's/-lttf/-lfreetype/' -i $(find . -name configure) - - # sed -e s@ncurses/curses.h@curses.h@g -i $(grep ncurses/curses.h -rl . ) - sed -e '1i\#include <string.h>\n\#include <stdlib.h>' -i $( find libs/teckit -name '*.cpp' -o -name '*.c' ) - - NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${icu.dev}/include/layout"; - - ./Build --prefix="$out" --datadir="$out/share" --mandir="$out/share/man" --infodir="$out/share/info" \ - ${args.lib.concatStringsSep " " configureFlags} - cd Work - '' ) [ "minInit" "doUnpack" "addInputs" "defEnsureDir" ]; - - promoteLibexec = fullDepEntry ('' - mkdir -p $out/libexec/ - mv $out/bin $out/libexec/$(uname -m) - mkdir -p $out/bin - for i in "$out/libexec/"* "$out/libexec/"*"/"* ; do - test \( \! -d "$i" \) -a \( -x "$i" -o -L "$i" \) || continue - - if [ -x "$i" ]; then - echo -ne "#! $SHELL\\nexec $i \"\$@\"" >$out/bin/$(basename $i) - chmod a+x $out/bin/$(basename $i) - else - mv "$i" "$out/libexec" - ln -s "$(readlink -f "$out/libexec/$(basename "$i")")" "$out/bin/$(basename "$i")"; - ln -sf "$(readlink -f "$out/libexec/$(basename "$i")")" "$out/libexec/$(uname -m)/$(basename "$i")"; - rm "$out/libexec/$(basename "$i")" - fi; - done - '') ["doMakeInstall"]; - - doPostInstall = fullDepEntry( '' - cp -r "$out/"texmf* "$out/share/" || true - rm -rf "$out"/texmf* - [ -d $out/share/texmf-config ] || ln -s $out/share/texmf-dist $out/share/texmf-config - ln -s "$out"/share/texmf* "$out"/ - - PATH=$PATH:$out/bin mktexlsr $out/share/texmf* - - yes | HOME=. PATH=$PATH:$out/bin updmap-sys --syncwithtrees || echo $? - - # Prebuild the format files, as it used to be done with TeXLive 2007. - # Luatex currently fails this way: - # - # This is a summary of all `failed' messages: - # `luatex -ini -jobname=luatex -progname=luatex luatex.ini' failed - # `luatex -ini -jobname=dviluatex -progname=dviluatex dviluatex.ini' failed - # - # I find it acceptable, hence the "|| true". - echo "building format files..." - mkdir -p "$out/share/texmf-var/web2c" - ln -sf "$out"/out/share/texmf* "$out"/ - PATH="$PATH:$out/bin" fmtutil-sys --all || true - - PATH=$PATH:$out/bin mktexlsr $out/share/texmf* - '' + stdenv.lib.optionalString stdenv.isDarwin '' - for prog in "$out/bin/"*; do - wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${poppler.out}/lib" - done - '' ) [ "minInit" "defEnsureDir" "doUnpack" "doMakeInstall" "promoteLibexec" "patchShebangsInterim"]; - - patchShebangsInterimBin = doPatchShebangs ''$out/bin/''; - patchShebangsInterimLibexec = doPatchShebangs ''$out/libexec/''; - patchShebangsInterimShareTexmfDist = doPatchShebangs ''$out/share/texmf-dist/scripts/''; - patchShebangsInterimTexmfDist = doPatchShebangs ''$out/texmf-dist/scripts/''; - - patchShebangsInterim = fullDepEntry ("") ["patchShebangsInterimBin" - "patchShebangsInterimLibexec" "patchShebangsInterimTexmfDist" - "patchShebangsInterimShareTexmfDist"]; - - buildInputs = [ zlib bzip2 ncurses libpng flex bison libX11.out libICE xproto - freetype t1lib gd libXaw icu ghostscript ed libXt libXpm libXmu libXext - xextproto perl libSM ruby expat curl libjpeg python fontconfig xz pkgconfig - poppler libpaper graphite2 lesstif zziplib harfbuzz texinfo potrace gmp mpfr - xpdf ] - ++ stdenv.lib.optionals stdenv.isDarwin [ makeWrapper ] - ; - - configureFlags = [ "--with-x11" "--enable-ipc" "--with-mktexfmt" - "--enable-shared" "--disable-native-texlive-build" "--with-system-zziplib" - "--with-system-libgs" "--with-system-t1lib" "--with-system-freetype2" - "--with-system-freetype=no" "--disable-ttf2pk" "--enable-ttf2pk2" ] - ++ stdenv.lib.optionals stdenv.isDarwin [ - # TODO: We should be able to fix these tests - "--disable-devnag" - - # jww (2014-06-02): The following fails with: - # FAIL: tests/dvisvgm - # =================== - # - # dyld: Library not loaded: libgs.dylib.9.06 - # Referenced from: .../Work/texk/dvisvgm/.libs/dvisvgm - # Reason: image not found - "--disable-dvisvgm" - ]; - - phaseNames = [ "addInputs" "doMainBuild" "doMakeInstall" "doPostInstall" ]; - - name = "texlive-core-2014"; - - meta = with stdenv.lib; { - description = "A TeX distribution"; - homepage = http://www.tug.org/texlive; - license = stdenv.lib.licenses.gpl2; - maintainers = with maintainers; [ lovek323 raskin jwiegley ]; - platforms = platforms.unix; - hydraPlatforms = []; - broken = true; # https://github.com/NixOS/nixpkgs/issues/14807 - }; -} diff --git a/pkgs/tools/typesetting/tex/texlive/extra.nix b/pkgs/tools/typesetting/tex/texlive/extra.nix deleted file mode 100644 index 7f7ffbee7c2..00000000000 --- a/pkgs/tools/typesetting/tex/texlive/extra.nix +++ /dev/null @@ -1,26 +0,0 @@ -args @ { texLive, xz, ... }: with args; -rec { - name = "texlive-extra-2014"; - version = "2014.20141024"; - - src = fetchurl { - url = "mirror://debian/pool/main/t/texlive-extra/texlive-extra_${version}.orig.tar.xz"; - sha256 = "190p5v6madcgkxjmfal0pcylfz88zi6yaixky0vrcz1kbvxqlcb9"; - }; - - buildInputs = [texLive xz]; - phaseNames = ["doCopy"]; - doCopy = fullDepEntry ('' - mkdir -p $out/share - cp -r texmf* $out/ - ln -s $out/texmf* $out/share - '') ["minInit" "doUnpack" "defEnsureDir" "addInputs"]; - - meta = { - description = "Extra components for TeXLive"; - maintainers = [ args.lib.maintainers.raskin args.lib.maintainers.jwiegley ]; - - # Actually, arch-independent.. - hydraPlatforms = []; - }; -} diff --git a/pkgs/tools/typesetting/tex/texlive/moderncv.nix b/pkgs/tools/typesetting/tex/texlive/moderncv.nix deleted file mode 100644 index 29e1c45245f..00000000000 --- a/pkgs/tools/typesetting/tex/texlive/moderncv.nix +++ /dev/null @@ -1,24 +0,0 @@ -args @ {texLive, unzip, ...}: with args; -rec { - version = "1.5.1"; - name = "moderncv-${version}"; - src = fetchurl { - url = "https://launchpad.net/moderncv/trunk/${version}/+download/moderncv-${version}.zip"; - sha256 = "0k26s0z8hmw3h09vnpndim7gigwh8q6n9nbbihb5qbrw5qg2yqck"; - }; - - buildInputs = [texLive unzip]; - phaseNames = ["doCopy"]; - doCopy = fullDepEntry ('' - mkdir -p $out/texmf-dist/tex/latex/moderncv $out/texmf-dist/doc $out/share - mv *.cls *.sty $out/texmf-dist/tex/latex/moderncv/ - mv examples $out/texmf-dist/doc/moderncv - ln -s $out/texmf* $out/share/ - '') ["minInit" "addInputs" "doUnpack" "defEnsureDir"]; - - meta = { - description = "The moderncv class for TeXLive"; - # Actually, arch-independent.. - hydraPlatforms = []; - }; -} diff --git a/pkgs/tools/typesetting/tex/texlive/moderntimeline.nix b/pkgs/tools/typesetting/tex/texlive/moderntimeline.nix deleted file mode 100644 index caa140d42c7..00000000000 --- a/pkgs/tools/typesetting/tex/texlive/moderntimeline.nix +++ /dev/null @@ -1,24 +0,0 @@ -args @ {texLive, unzip, ...}: with args; -rec { - version = "0.9"; - name = "moderntimeline-${version}"; - src = fetchurl { - url = "https://github.com/raphink/moderntimeline/archive/v0.9.zip"; - sha256 = "1h1sfdh0whb74y6f999hs80flwpdbs2n4n2b9c450rvs1y7abcml"; - }; - - buildInputs = [texLive unzip]; - phaseNames = ["doCopy"]; - doCopy = fullDepEntry ('' - mkdir -p $out/texmf-dist/tex/latex/moderntimeline $out/texmf-dist/doc/moderntimeline $out/share - mv *.dtx *.ins $out/texmf-dist/tex/latex/moderntimeline/ - mv *.md $out/texmf-dist/doc/moderntimeline/ - ln -s $out/texmf* $out/share/ - '') ["minInit" "addInputs" "doUnpack" "defEnsureDir"]; - - meta = { - description = "The moderntimeline extensions for moderncv"; - # Actually, arch-independent.. - hydraPlatforms = []; - }; -} diff --git a/pkgs/tools/typesetting/tex/texlive/setup-hook.sh b/pkgs/tools/typesetting/tex/texlive/setup-hook.sh deleted file mode 100644 index 9c5424e881e..00000000000 --- a/pkgs/tools/typesetting/tex/texlive/setup-hook.sh +++ /dev/null @@ -1,7 +0,0 @@ -addTeXMFPath () { - if test -d "$1/share/texmf-nix"; then - export TEXINPUTS="${TEXINPUTS}${TEXINPUTS:+:}$1/share/texmf-nix//:" - fi -} - -envHooks+=(addTeXMFPath) diff --git a/pkgs/tools/typesetting/tex/texlive/xcolor.nix b/pkgs/tools/typesetting/tex/texlive/xcolor.nix deleted file mode 100644 index 57351e06992..00000000000 --- a/pkgs/tools/typesetting/tex/texlive/xcolor.nix +++ /dev/null @@ -1,37 +0,0 @@ -args @ {texLive, ... }: with args; -rec { - name = "texlive-latex-xcolor-2007"; - src = fetchurl { - url = mirror://debian/pool/main/l/latex-xcolor/latex-xcolor_2.11.orig.tar.gz; - sha256 = "0z78xfn5iq5ncg82sd6v2qrxs8p9hs3m4agaz90p4db5dvk2w0mn"; - }; - - buildInputs = [texLive]; - phaseNames = ["doCopy"]; - doCopy = fullDepEntry ('' - export HOME=$PWD - mkdir -p $out/share/ - - mkdir -p $out/texmf-dist/tex/latex/xcolor - mkdir -p $out/texmf-dist/dvips/xcolor - latex xcolor.ins - cp *.sty *.def $out/texmf-dist/tex/latex/xcolor - cp *.pro $out/texmf-dist/dvips/xcolor - - #latex xcolor.dtx - #latex xcolor.dtx - #makeindex -s gind.ist xcolor.idx - #latex xcolor.dtx - #latex xcolor.dtx - - rm *.sty *.pro *.ins *.def *.dtx - mkdir -p $out/texmf-dist/doc/latex-xcolor - cp * $out/texmf-dist/doc/latex-xcolor - - ln -s $out/texmf* $out/share/ - '') ["minInit" "doUnpack" "defEnsureDir" "addInputs"]; - - meta = { - description = "Extra components for TeXLive: LaTeX color support"; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd6154ebde8..fb682895acb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -88,10 +88,6 @@ in # inside the set for derivations. recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; }; - builderDefs = lib.composedArgsAndFun (callPackage ../build-support/builder-defs/builder-defs.nix) {}; - - builderDefsPackage = builderDefs.builderDefsPackage builderDefs; - stringsWithDeps = lib.stringsWithDeps; @@ -104,10 +100,6 @@ in ### BUILD SUPPORT - attrSetToDir = arg: callPackage ../build-support/upstream-updater/attrset-to-dir.nix { - theAttrSet = arg; - }; - autoreconfHook = makeSetupHook { substitutions = { inherit autoconf automake gettext libtool; }; } ../build-support/setup-hooks/autoreconf.sh; @@ -4934,7 +4926,10 @@ in microscheme = callPackage ../development/compilers/microscheme { }; - mitscheme = callPackage ../development/compilers/mit-scheme { }; + mitscheme = callPackage ../development/compilers/mit-scheme { + texLive = texlive.combine { inherit (texlive) scheme-small; }; + texinfo = texinfo5; + }; mkcl = callPackage ../development/compilers/mkcl {}; @@ -5839,9 +5834,6 @@ in qt = qt4; })); - # mercurial (hg) bleeding edge version - octaveHG = callPackage ../development/interpreters/octave/hg.nix { }; - ocropus = callPackage ../applications/misc/ocropus { }; inherit (callPackages ../development/interpreters/perl {}) perl perl520 perl522; @@ -17344,50 +17336,6 @@ in texlive = recurseIntoAttrs (callPackage ../tools/typesetting/tex/texlive-new { }); - texLive = builderDefsPackage (callPackage ../tools/typesetting/tex/texlive) { - ghostscript = ghostscriptX; - harfbuzz = harfbuzz.override { - withIcu = true; withGraphite2 = true; - }; - }; - - texLiveFull = lib.setName "texlive-full" (texLiveAggregationFun { - paths = [ texLive texLiveExtra lmodern texLiveCMSuper texLiveLatexXColor - texLivePGF texLiveBeamer texLiveModerncv tipa tex4ht texinfo - texLiveModerntimeline texLiveContext ]; - }); - - /* Look in configurations/misc/raskin.nix for usage example (around revisions - where TeXLive was added) - - (texLiveAggregationFun { - paths = [texLive texLiveExtra texLiveCMSuper - texLiveBeamer - ]; - }) - - You need to use texLiveAggregationFun to regenerate, say, ls-R (TeX-related file list) - Just installing a few packages doesn't work. - */ - texLiveAggregationFun = params: - builderDefsPackage (callPackage ../tools/typesetting/tex/texlive/aggregate.nix) params; - - texLiveContext = builderDefsPackage (callPackage ../tools/typesetting/tex/texlive/context.nix) {}; - - texLiveExtra = builderDefsPackage (callPackage ../tools/typesetting/tex/texlive/extra.nix) {}; - - texLiveCMSuper = builderDefsPackage (callPackage ../tools/typesetting/tex/texlive/cm-super.nix) {}; - - texLiveLatexXColor = builderDefsPackage (callPackage ../tools/typesetting/tex/texlive/xcolor.nix) {}; - - texLivePGF = pgf3; - - texLiveBeamer = builderDefsPackage (callPackage ../tools/typesetting/tex/texlive/beamer.nix) {}; - - texLiveModerncv = builderDefsPackage (callPackage ../tools/typesetting/tex/texlive/moderncv.nix) {}; - - texLiveModerntimeline = builderDefsPackage (callPackage ../tools/typesetting/tex/texlive/moderntimeline.nix) {}; - ib-tws = callPackage ../applications/office/ib/tws { jdk=oraclejdk8; }; ib-controller = callPackage ../applications/office/ib/controller { jdk=oraclejdk8; }; diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix index 2774ff66f57..430c03f5190 100644 --- a/pkgs/top-level/release-small.nix +++ b/pkgs/top-level/release-small.nix @@ -154,9 +154,6 @@ with import ./release-lib.nix { inherit supportedSystems; }; sysvtools = linux; tcl = linux; tcpdump = linux; - texLive = linux; - texLiveBeamer = linux; - texLiveExtra = linux; texinfo = all; time = linux; tinycc = linux; |