aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/doc/languages-frameworks
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-01-12 01:00:12 +0000
committerKatharina Fey <kookie@spacekookie.de>2020-01-12 01:00:12 +0000
commiteeaf5d25d5f6ae7ae1f5bf8a3dee4559693f8147 (patch)
treeafc41ca8dde96b41089ca324533084aef570322f /nixpkgs/doc/languages-frameworks
parent63c4c4dda49dc69e5812faa7ef8406180998f3ae (diff)
parente4134747f5666bcab8680aff67fa3b63384f9a0f (diff)
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/doc/languages-frameworks')
-rw-r--r--nixpkgs/doc/languages-frameworks/gnome.xml16
-rw-r--r--nixpkgs/doc/languages-frameworks/go.xml15
-rw-r--r--nixpkgs/doc/languages-frameworks/haskell.section.md29
-rw-r--r--nixpkgs/doc/languages-frameworks/python.section.md16
-rw-r--r--nixpkgs/doc/languages-frameworks/texlive.xml91
5 files changed, 135 insertions, 32 deletions
diff --git a/nixpkgs/doc/languages-frameworks/gnome.xml b/nixpkgs/doc/languages-frameworks/gnome.xml
index 3d69d77a1c8..bb68d026ae2 100644
--- a/nixpkgs/doc/languages-frameworks/gnome.xml
+++ b/nixpkgs/doc/languages-frameworks/gnome.xml
@@ -74,7 +74,7 @@
preFixup = ''
for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
wrapProgram "$f" \
- --prefix GIO_EXTRA_MODULES : "${getLib gnome3.dconf}/lib/gio/modules" \
+ --prefix GIO_EXTRA_MODULES : "${getLib dconf}/lib/gio/modules" \
--prefix XDG_DATA_DIRS : "$out/share" \
--prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \
--prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
@@ -102,7 +102,7 @@ preFixup = ''
</listitem>
<listitem xml:id="ssec-gnome-hooks-dconf">
<para>
- <package>gnome3.dconf.lib</package> is a dependency of <package>wrapGAppsHook</package>, which then also adds it to the <envar>GIO_EXTRA_MODULES</envar> variable.
+ <package>dconf.lib</package> is a dependency of <package>wrapGAppsHook</package>, which then also adds it to the <envar>GIO_EXTRA_MODULES</envar> variable.
</para>
</listitem>
<listitem xml:id="ssec-gnome-hooks-hicolor-icon-theme">
@@ -199,9 +199,9 @@ python3.pkgs.buildPythonApplication {
dontWrapGApps = true;
# Arguments to be passed to `makeWrapper`, only used by buildPython*
- makeWrapperArgs = [
- "\${gappsWrapperArgs[@]}"
- ];
+ preFixup = ''
+ makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
+ '';
}
</programlisting>
And for a QT app like:
@@ -219,9 +219,9 @@ mkDerivation {
dontWrapGApps = true;
# Arguments to be passed to `makeWrapper`, only used by qt5’s mkDerivation
- qtWrapperArgs = [
- "\${gappsWrapperArgs[@]}"
- ];
+ preFixup = ''
+ qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
+ '';
}
</programlisting>
</para>
diff --git a/nixpkgs/doc/languages-frameworks/go.xml b/nixpkgs/doc/languages-frameworks/go.xml
index 288a9029863..e8cf27d0565 100644
--- a/nixpkgs/doc/languages-frameworks/go.xml
+++ b/nixpkgs/doc/languages-frameworks/go.xml
@@ -26,7 +26,7 @@
<title>buildGoModule</title>
<programlisting>
pet = buildGoModule rec {
- name = "pet-${version}";
+ pname = "pet";
version = "0.3.4";
src = fetchFromGitHub {
@@ -66,6 +66,15 @@ pet = buildGoModule rec {
</callout>
</calloutlist>
</para>
+
+ <para>
+ <varname>modSha256</varname> can also take <varname>null</varname> as an input.
+
+ When `null` is used as a value, the derivation won't be a
+ fixed-output derivation but disable the build sandbox instead. This can be useful outside
+ of nixpkgs where re-generating the modSha256 on each mod.sum changes is cumbersome,
+ but will fail to build by Hydra, as builds with a disabled sandbox are discouraged.
+ </para>
</section>
<section xml:id="ssec-go-legacy">
@@ -79,7 +88,7 @@ pet = buildGoModule rec {
<title>buildGoPackage</title>
<programlisting>
deis = buildGoPackage rec {
- name = "deis-${version}";
+ pname = "deis";
version = "1.13.0";
goPackagePath = "github.com/deis/deis"; <co xml:id='ex-buildGoPackage-1' />
@@ -94,7 +103,7 @@ deis = buildGoPackage rec {
goDeps = ./deps.nix; <co xml:id='ex-buildGoPackage-3' />
- buildFlags = "--tags release"; <co xml:id='ex-buildGoPackage-4' />
+ buildFlags = [ "--tags" "release" ]; <co xml:id='ex-buildGoPackage-4' />
}
</programlisting>
</example>
diff --git a/nixpkgs/doc/languages-frameworks/haskell.section.md b/nixpkgs/doc/languages-frameworks/haskell.section.md
index be5c7b7c8d1..b485ec583ec 100644
--- a/nixpkgs/doc/languages-frameworks/haskell.section.md
+++ b/nixpkgs/doc/languages-frameworks/haskell.section.md
@@ -84,37 +84,36 @@ nix-env -qaP -A nixos.haskellPackages
nix-env -iA nixos.haskellPackages.cabal-install
```
-Our current default compiler is GHC 7.10.x and the `haskellPackages` set
-contains packages built with that particular version. Nixpkgs contains the
-latest major release of every GHC since 6.10.4, however, and there is a whole
-family of package sets available that defines Hackage packages built with each
-of those compilers, too:
+Our current default compiler is GHC 8.6.x and the `haskellPackages` set
+contains packages built with that particular version. Nixpkgs contains the last
+three major releases of GHC and there is a whole family of package sets
+available that defines Hackage packages built with each of those compilers,
+too:
```shell
-nix-env -f "<nixpkgs>" -qaP -A haskell.packages.ghc6123
-nix-env -f "<nixpkgs>" -qaP -A haskell.packages.ghc763
+nix-env -f "<nixpkgs>" -qaP -A haskell.packages.ghc844
+nix-env -f "<nixpkgs>" -qaP -A haskell.packages.ghc882
```
The name `haskellPackages` is really just a synonym for
-`haskell.packages.ghc7102`, because we prefer that package set internally and
+`haskell.packages.ghc865`, because we prefer that package set internally and
recommend it to our users as their default choice, but ultimately you are free
to compile your Haskell packages with any GHC version you please. The following
command displays the complete list of available compilers:
```
$ nix-env -f "<nixpkgs>" -qaP -A haskell.compiler
-haskell.compiler.ghc822 ghc-8.2.2
-haskell.compiler.integer-simple.ghc822 ghc-8.2.2
+haskell.compiler.ghc8101 ghc-8.10.0.20191210
+haskell.compiler.integer-simple.ghc8101 ghc-8.10.0.20191210
+haskell.compiler.ghcHEAD ghc-8.10.20191119
+haskell.compiler.integer-simple.ghcHEAD ghc-8.10.20191119
haskell.compiler.ghc822Binary ghc-8.2.2-binary
haskell.compiler.ghc844 ghc-8.4.4
haskell.compiler.ghc863Binary ghc-8.6.3-binary
-haskell.compiler.ghc864 ghc-8.6.4
-haskell.compiler.integer-simple.ghc864 ghc-8.6.4
haskell.compiler.ghc865 ghc-8.6.5
haskell.compiler.integer-simple.ghc865 ghc-8.6.5
haskell.compiler.ghc881 ghc-8.8.1
haskell.compiler.integer-simple.ghc881 ghc-8.8.1
-haskell.compiler.ghcHEAD ghc-8.9.20190601
-haskell.compiler.integer-simple.ghcHEAD ghc-8.9.20190601
-haskell.compiler.ghcjs84 ghcjs-8.4.0.1
+haskell.compiler.ghc882 ghc-8.8.1.20191211
+haskell.compiler.integer-simple.ghc882 ghc-8.8.1.20191211
haskell.compiler.ghcjs ghcjs-8.6.0.1
```
diff --git a/nixpkgs/doc/languages-frameworks/python.section.md b/nixpkgs/doc/languages-frameworks/python.section.md
index 1bedebd1190..41a5dae8b9b 100644
--- a/nixpkgs/doc/languages-frameworks/python.section.md
+++ b/nixpkgs/doc/languages-frameworks/python.section.md
@@ -821,6 +821,9 @@ should be used with `ignoreCollisions = true`.
The following are setup hooks specifically for Python packages. Most of these are
used in `buildPythonPackage`.
+- `eggUnpackhook` to move an egg to the correct folder so it can be installed with the `eggInstallHook`
+- `eggBuildHook` to skip building for eggs.
+- `eggInstallHook` to install eggs.
- `flitBuildHook` to build a wheel using `flit`.
- `pipBuildHook` to build a wheel using `pip` and PEP 517. Note a build system (e.g. `setuptools` or `flit`) should still be added as `nativeBuildInput`.
- `pipInstallHook` to install wheels.
@@ -1034,7 +1037,10 @@ Create this `default.nix` file, together with a `requirements.txt` and simply ex
```nix
with import <nixpkgs> {};
-with python27Packages;
+
+let
+ pythonPackages = python27Packages;
+in
stdenv.mkDerivation {
name = "impurePythonEnv";
@@ -1044,9 +1050,8 @@ stdenv.mkDerivation {
buildInputs = [
# these packages are required for virtualenv and pip to work:
#
- python27Full
- python27Packages.virtualenv
- python27Packages.pip
+ pythonPackages.virtualenv
+ pythonPackages.pip
# the following packages are related to the dependencies of your python
# project.
# In this particular example the python modules listed in the
@@ -1059,14 +1064,13 @@ stdenv.mkDerivation {
libxml2
libxslt
libzip
- stdenv
zlib
];
shellHook = ''
# set SOURCE_DATE_EPOCH so that we can use python wheels
SOURCE_DATE_EPOCH=$(date +%s)
- virtualenv --no-setuptools venv
+ virtualenv --python=${pythonPackages.python.interpreter} --no-setuptools venv
export PATH=$PWD/venv/bin:$PATH
pip install -r requirements.txt
'';
diff --git a/nixpkgs/doc/languages-frameworks/texlive.xml b/nixpkgs/doc/languages-frameworks/texlive.xml
index 7876cc213b6..8fa8f963b2f 100644
--- a/nixpkgs/doc/languages-frameworks/texlive.xml
+++ b/nixpkgs/doc/languages-frameworks/texlive.xml
@@ -59,6 +59,97 @@ nix-repl> texlive.collection-<TAB>
</itemizedlist>
</section>
+ <section xml:id="sec-language-texlive-custom-packages">
+ <title>Custom packages</title>
+ <para>
+ You may find that you need to use an external TeX package. A derivation for such package has to provide contents of the "texmf" directory in its output and provide the <varname>tlType</varname> attribute. Here is a (very verbose) example:
+<programlisting><![CDATA[
+with import <nixpkgs> {};
+
+let
+ foiltex_run = stdenvNoCC.mkDerivation {
+ pname = "latex-foiltex";
+ version = "2.1.4b";
+ passthru.tlType = "run";
+
+ srcs = [
+ (fetchurl {
+ url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.dtx";
+ sha256 = "07frz0krpz7kkcwlayrwrj2a2pixmv0icbngyw92srp9fp23cqpz";
+ })
+ (fetchurl {
+ url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.ins";
+ sha256 = "09wkyidxk3n3zvqxfs61wlypmbhi1pxmjdi1kns9n2ky8ykbff99";
+ })
+ ];
+
+ unpackPhase = ''
+ runHook preUnpack
+
+ for _src in $srcs; do
+ cp "$_src" $(stripHash "$_src")
+ done
+
+ runHook postUnpack
+ '';
+
+ nativeBuildInputs = [ texlive.combined.scheme-small ];
+
+ dontConfigure = true;
+
+ buildPhase = ''
+ runHook preBuild
+
+ # Generate the style files
+ latex foiltex.ins
+
+ runHook postBuild
+ '';
+
+ installPhase = ''
+ runHook preInstall
+
+ path="$out/tex/latex/foiltex"
+ mkdir -p "$path"
+ cp *.{cls,def,clo} "$path/"
+
+ runHook postInstall
+ '';
+
+ meta = with lib; {
+ description = "A LaTeX2e class for overhead transparencies";
+ license = licenses.unfreeRedistributable;
+ maintainers = with maintainers; [ veprbl ];
+ platforms = platforms.all;
+ };
+ };
+ foiltex = { pkgs = [ foiltex_run ]; };
+
+ latex_with_foiltex = texlive.combine {
+ inherit (texlive) scheme-small;
+ inherit foiltex;
+ };
+in
+ runCommand "test.pdf" {
+ nativeBuildInputs = [ latex_with_foiltex ];
+ } ''
+cat >test.tex <<EOF
+\documentclass{foils}
+
+\title{Presentation title}
+\date{}
+
+\begin{document}
+\maketitle
+\end{document}
+EOF
+ pdflatex test.tex
+ cp test.pdf $out
+''
+]]></programlisting>
+ </para>
+ </section>
+
<section xml:id="sec-language-texlive-known-problems">
<title>Known problems</title>