diff options
author | Katharina Fey <kookie@spacekookie.de> | 2020-01-10 20:09:37 +0000 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-01-10 20:09:37 +0000 |
commit | 45431c078bf8f54aef7c9fae2e5913395ec82c31 (patch) | |
tree | fd8ff1346a963ddd72e782421f05b623f9759e2a /nixpkgs/doc/languages-frameworks | |
parent | c86fea6086c212ea489cfb023a5f5c9c8f188810 (diff) | |
parent | 3ccbc8d89153ecf13f3eae7d9c106d91cd4ab9e5 (diff) |
Merge commit '3ccbc8d89153ecf13f3eae7d9c106d91cd4ab9e5' into fuckthisshit
Diffstat (limited to 'nixpkgs/doc/languages-frameworks')
-rw-r--r-- | nixpkgs/doc/languages-frameworks/android.section.md | 2 | ||||
-rw-r--r-- | nixpkgs/doc/languages-frameworks/beam.xml | 307 | ||||
-rw-r--r-- | nixpkgs/doc/languages-frameworks/emscripten.section.md | 2 | ||||
-rw-r--r-- | nixpkgs/doc/languages-frameworks/haskell.section.md | 50 | ||||
-rw-r--r-- | nixpkgs/doc/languages-frameworks/idris.section.md | 2 | ||||
-rw-r--r-- | nixpkgs/doc/languages-frameworks/index.xml | 6 | ||||
-rw-r--r-- | nixpkgs/doc/languages-frameworks/ios.section.md | 12 | ||||
-rw-r--r-- | nixpkgs/doc/languages-frameworks/node.section.md | 4 | ||||
-rw-r--r-- | nixpkgs/doc/languages-frameworks/python.section.md | 20 | ||||
-rw-r--r-- | nixpkgs/doc/languages-frameworks/r.section.md | 4 | ||||
-rw-r--r-- | nixpkgs/doc/languages-frameworks/rust.section.md | 15 | ||||
-rw-r--r-- | nixpkgs/doc/languages-frameworks/vim.section.md | 2 |
12 files changed, 102 insertions, 324 deletions
diff --git a/nixpkgs/doc/languages-frameworks/android.section.md b/nixpkgs/doc/languages-frameworks/android.section.md index f268c552566..9a5df2523a2 100644 --- a/nixpkgs/doc/languages-frameworks/android.section.md +++ b/nixpkgs/doc/languages-frameworks/android.section.md @@ -95,7 +95,7 @@ $ nix-build The Android SDK gets deployed with all desired plugin versions. -We can also deploy subsets of the Android SDK. For example, to only the the +We can also deploy subsets of the Android SDK. For example, to only the `platform-tools` package, you can evaluate the following expression: ```nix diff --git a/nixpkgs/doc/languages-frameworks/beam.xml b/nixpkgs/doc/languages-frameworks/beam.xml index 74c595cc89b..278535237c2 100644 --- a/nixpkgs/doc/languages-frameworks/beam.xml +++ b/nixpkgs/doc/languages-frameworks/beam.xml @@ -26,7 +26,7 @@ </listitem> <listitem> <para> - <literal>packages</literal>: a set of package sets, each compiled with a specific Erlang/OTP version, e.g. <literal>beam.packages.erlangR19</literal>. + <literal>packages</literal>: a set of package builders (Mix and rebar3), each compiled with a specific Erlang/OTP version, e.g. <literal>beam.packages.erlangR19</literal>. </para> </listitem> </itemizedlist> @@ -36,15 +36,11 @@ </para> <para> - To create a package set built with a custom Erlang version, use the lambda, <literal>beam.packagesWith</literal>, which accepts an Erlang/OTP derivation and produces a package set similar to <literal>beam.packages.erlang</literal>. + To create a package builder built with a custom Erlang version, use the lambda, <literal>beam.packagesWith</literal>, which accepts an Erlang/OTP derivation and produces a package builder similar to <literal>beam.packages.erlang</literal>. </para> <para> - Many Erlang/OTP distributions available in <literal>beam.interpreters</literal> have versions with ODBC and/or Java enabled. For example, there's <literal>beam.interpreters.erlangR19_odbc_javac</literal>, which corresponds to <literal>beam.interpreters.erlangR19</literal>. - </para> - - <para xml:id="erlang-call-package"> - We also provide the lambda, <literal>beam.packages.erlang.callPackage</literal>, which simplifies writing BEAM package definitions by injecting all packages from <literal>beam.packages.erlang</literal> into the top-level context. + Many Erlang/OTP distributions available in <literal>beam.interpreters</literal> have versions with ODBC and/or Java enabled or without wx (no observer support). For example, there's <literal>beam.interpreters.erlangR22_odbc_javac</literal>, which corresponds to <literal>beam.interpreters.erlangR22</literal> and <literal>beam.interpreters.erlangR22_nox</literal>, which corresponds to <literal>beam.interpreters.erlangR22</literal>. </para> </section> @@ -55,7 +51,7 @@ <title>Rebar3</title> <para> - We provide a version of Rebar3, which is the normal, unmodified Rebar3, under <literal>rebar3</literal>. We also provide a helper to fetch Rebar3 dependencies from a lockfile under <literal>fetchRebar3Deps</literal>. + We provide a version of Rebar3, under <literal>rebar3</literal>. We also provide a helper to fetch Rebar3 dependencies from a lockfile under <literal>fetchRebar3Deps</literal>. </para> </section> @@ -72,32 +68,14 @@ <title>How to Install BEAM Packages</title> <para> - BEAM packages are not registered at the top level, simply because they are not relevant to the vast majority of Nix users. They are installable using the <literal>beam.packages.erlang</literal> attribute set (aliased as <literal>beamPackages</literal>), which points to packages built by the default Erlang/OTP version in Nixpkgs, as defined by <literal>beam.interpreters.erlang</literal>. To list the available packages in <literal>beamPackages</literal>, use the following command: - </para> - -<screen> -<prompt>$ </prompt>nix-env -f "<nixpkgs>" -qaP -A beamPackages -beamPackages.esqlite esqlite-0.2.1 -beamPackages.goldrush goldrush-0.1.7 -beamPackages.ibrowse ibrowse-4.2.2 -beamPackages.jiffy jiffy-0.14.5 -beamPackages.lager lager-3.0.2 -beamPackages.meck meck-0.8.3 -beamPackages.rebar3-pc pc-1.1.0 -</screen> - - <para> - To install any of those packages into your profile, refer to them by their attribute path (first column): + BEAM builders are not registered at the top level, simply because they are not relevant to the vast majority of Nix users. + To install any of those builders into your profile, refer to them by their attribute path <literal>beamPackages.rebar3</literal>: </para> -<screen> -<prompt>$ </prompt>nix-env -f "<nixpkgs>" -iA beamPackages.ibrowse -</screen> - - <para> - The attribute path of any BEAM package corresponds to the name of that particular package in <link xlink:href="https://hex.pm">Hex</link> or its OTP Application/Release name. - </para> - </section> + <screen> + <prompt>$ </prompt>nix-env -f "<nixpkgs>" -iA beamPackages.rebar3 + </screen> +</section> <section xml:id="packaging-beam-applications"> <title>Packaging BEAM Applications</title> @@ -109,35 +87,7 @@ beamPackages.rebar3-pc pc-1.1.0 <title>Rebar3 Packages</title> <para> - The Nix function, <literal>buildRebar3</literal>, defined in <literal>beam.packages.erlang.buildRebar3</literal> and aliased at the top level, can be used to build a derivation that understands how to build a Rebar3 project. For example, we can build <link - xlink:href="https://github.com/erlang-nix/hex2nix">hex2nix</link> as follows: - </para> - -<programlisting> -{ stdenv, fetchFromGitHub, buildRebar3, ibrowse, jsx, erlware_commons }: - -buildRebar3 rec { - name = "hex2nix"; - version = "0.0.1"; - - src = fetchFromGitHub { - owner = "ericbmerritt"; - repo = "hex2nix"; - rev = "${version}"; - sha256 = "1w7xjidz1l5yjmhlplfx7kphmnpvqm67w99hd2m7kdixwdxq0zqg"; - }; - - beamDeps = [ ibrowse jsx erlware_commons ]; -} -</programlisting> - - <para> - Such derivations are callable with <literal>beam.packages.erlang.callPackage</literal> (see <xref - linkend="erlang-call-package"/>). To call this package using the normal <literal>callPackage</literal>, refer to dependency packages via <literal>beamPackages</literal>, e.g. <literal>beamPackages.ibrowse</literal>. - </para> - - <para> - Notably, <literal>buildRebar3</literal> includes <literal>beamDeps</literal>, while <literal>stdenv.mkDerivation</literal> does not. BEAM dependencies added there will be correctly handled by the system. + The Nix function, <literal>buildRebar3</literal>, defined in <literal>beam.packages.erlang.buildRebar3</literal> and aliased at the top level, can be used to build a derivation that understands how to build a Rebar3 project. </para> <para> @@ -152,30 +102,6 @@ buildRebar3 rec { Erlang.mk functions similarly to Rebar3, except we use <literal>buildErlangMk</literal> instead of <literal>buildRebar3</literal>. </para> -<programlisting> -{ buildErlangMk, fetchHex, cowlib, ranch }: - -buildErlangMk { - name = "cowboy"; - version = "1.0.4"; - - src = fetchHex { - pkg = "cowboy"; - version = "1.0.4"; - sha256 = "6a0edee96885fae3a8dd0ac1f333538a42e807db638a9453064ccfdaa6b9fdac"; - }; - - beamDeps = [ cowlib ranch ]; - - meta = { - description = '' - Small, fast, modular HTTP server written in Erlang - ''; - license = stdenv.lib.licenses.isc; - homepage = https://github.com/ninenines/cowboy; - }; -} -</programlisting> </section> <section xml:id="mix-packages"> @@ -185,57 +111,9 @@ buildErlangMk { Mix functions similarly to Rebar3, except we use <literal>buildMix</literal> instead of <literal>buildRebar3</literal>. </para> -<programlisting> -{ buildMix, fetchHex, plug, absinthe }: - -buildMix { - name = "absinthe_plug"; - version = "1.0.0"; - - src = fetchHex { - pkg = "absinthe_plug"; - version = "1.0.0"; - sha256 = "08459823fe1fd4f0325a8bf0c937a4520583a5a26d73b193040ab30a1dfc0b33"; - }; - - beamDeps = [ plug absinthe ]; - - meta = { - description = '' - A plug for Absinthe, an experimental GraphQL toolkit - ''; - license = stdenv.lib.licenses.bsd3; - homepage = https://github.com/CargoSense/absinthe_plug; - }; -} -</programlisting> - <para> Alternatively, we can use <literal>buildHex</literal> as a shortcut: </para> - -<programlisting> -{ buildHex, buildMix, plug, absinthe }: - -buildHex { - name = "absinthe_plug"; - version = "1.0.0"; - - sha256 = "08459823fe1fd4f0325a8bf0c937a4520583a5a26d73b193040ab30a1dfc0b33"; - - builder = buildMix; - - beamDeps = [ plug absinthe ]; - - meta = { - description = '' - A plug for Absinthe, an experimental GraphQL toolkit - ''; - license = stdenv.lib.licenses.bsd3; - homepage = https://github.com/CargoSense/absinthe_plug; - }; -} -</programlisting> </section> </section> </section> @@ -243,66 +121,13 @@ buildHex { <section xml:id="how-to-develop"> <title>How to Develop</title> - <section xml:id="accessing-an-environment"> - <title>Accessing an Environment</title> - - <para> - Often, we simply want to access a valid environment that contains a specific package and its dependencies. We can accomplish that with the <literal>env</literal> attribute of a derivation. For example, let's say we want to access an Erlang REPL with <literal>ibrowse</literal> loaded up. We could do the following: - </para> - -<screen> -<prompt>$ </prompt><userinput>nix-shell -A beamPackages.ibrowse.env --run "erl"</userinput> -<computeroutput>Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] - -Eshell V7.0 (abort with ^G)</computeroutput> -<prompt>1> </prompt><userinput>m(ibrowse).</userinput> -<computeroutput>Module: ibrowse -MD5: 3b3e0137d0cbb28070146978a3392945 -Compiled: January 10 2016, 23:34 -Object file: /nix/store/g1rlf65rdgjs4abbyj4grp37ry7ywivj-ibrowse-4.2.2/lib/erlang/lib/ibrowse-4.2.2/ebin/ibrowse.beam -Compiler options: [{outdir,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/ebin"}, -debug_info,debug_info,nowarn_shadow_vars, -warn_unused_import,warn_unused_vars,warnings_as_errors, -{i,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/include"}] -Exports: -add_config/1 send_req_direct/7 -all_trace_off/0 set_dest/3 -code_change/3 set_max_attempts/3 -get_config_value/1 set_max_pipeline_size/3 -get_config_value/2 set_max_sessions/3 -get_metrics/0 show_dest_status/0 -get_metrics/2 show_dest_status/1 -handle_call/3 show_dest_status/2 -handle_cast/2 spawn_link_worker_process/1 -handle_info/2 spawn_link_worker_process/2 -init/1 spawn_worker_process/1 -module_info/0 spawn_worker_process/2 -module_info/1 start/0 -rescan_config/0 start_link/0 -rescan_config/1 stop/0 -send_req/3 stop_worker_process/1 -send_req/4 stream_close/1 -send_req/5 stream_next/1 -send_req/6 terminate/2 -send_req_direct/4 trace_off/0 -send_req_direct/5 trace_off/2 -send_req_direct/6 trace_on/0 -trace_on/2 -ok</computeroutput> -<prompt>2></prompt> -</screen> - - <para> - Notice the <literal>-A beamPackages.ibrowse.env</literal>. That is the key to this functionality. - </para> - </section> - <section xml:id="creating-a-shell"> <title>Creating a Shell</title> - <para> - Getting access to an environment often isn't enough to do real development. Usually, we need to create a <literal>shell.nix</literal> file and do our development inside of the environment specified therein. This file looks a lot like the packaging described above, except that <literal>src</literal> points to the project root and we call the package directly. - </para> + <para> + Usually, we need to create a <literal>shell.nix</literal> file and do our development inside of the environment specified therein. Just install your version of erlang and other interpreter, and then user your normal build tools. + As an example with elixir: + </para> <programlisting> { pkgs ? import "<nixpkgs"> {} }: @@ -311,114 +136,24 @@ with pkgs; let - f = { buildRebar3, ibrowse, jsx, erlware_commons }: - buildRebar3 { - name = "hex2nix"; - version = "0.1.0"; - src = ./.; - beamDeps = [ ibrowse jsx erlware_commons ]; - }; - drv = beamPackages.callPackage f {}; + elixir = beam.packages.erlangR22.elixir_1_9; in +mkShell { + buildInputs = [ elixir ]; - drv + ERL_INCLUDE_PATH="${erlang}/lib/erlang/usr/include"; +} </programlisting> <section xml:id="building-in-a-shell"> <title>Building in a Shell (for Mix Projects)</title> <para> - We can leverage the support of the derivation, irrespective of the build derivation, by calling the commands themselves. - </para> - -<programlisting> -# ============================================================================= -# Variables -# ============================================================================= - -NIX_TEMPLATES := "$(CURDIR)/nix-templates" - -TARGET := "$(PREFIX)" - -PROJECT_NAME := thorndyke - -NIXPKGS=../nixpkgs -NIX_PATH=nixpkgs=$(NIXPKGS) -NIX_SHELL=nix-shell -I "$(NIX_PATH)" --pure -# ============================================================================= -# Rules -# ============================================================================= -.PHONY= all test clean repl shell build test analyze configure install \ - test-nix-install publish plt analyze - -all: build - -guard-%: - @ if [ "${${*}}" == "" ]; then \ - echo "Environment variable $* not set"; \ - exit 1; \ - fi - -clean: - rm -rf _build - rm -rf .cache - -repl: - $(NIX_SHELL) --run "iex -pa './_build/prod/lib/*/ebin'" - -shell: - $(NIX_SHELL) - -configure: - $(NIX_SHELL) --command 'eval "$$configurePhase"' - -build: configure - $(NIX_SHELL) --command 'eval "$$buildPhase"' - -install: - $(NIX_SHELL) --command 'eval "$$installPhase"' - -test: - $(NIX_SHELL) --command 'mix test --no-start --no-deps-check' - -plt: - $(NIX_SHELL) --run "mix dialyzer.plt --no-deps-check" - -analyze: build plt - $(NIX_SHELL) --run "mix dialyzer --no-compile" - -</programlisting> - - <para> Using a <literal>shell.nix</literal> as described (see <xref - linkend="creating-a-shell"/>) should just work. Aside from <literal>test</literal>, <literal>plt</literal>, and <literal>analyze</literal>, the Make targets work just fine for all of the build derivations. + linkend="creating-a-shell"/>) should just work. </para> </section> </section> </section> - - <section xml:id="generating-packages-from-hex-with-hex2nix"> - <title>Generating Packages from Hex with <literal>hex2nix</literal></title> - - <para> - Updating the <link xlink:href="https://hex.pm">Hex</link> package set requires <link - xlink:href="https://github.com/erlang-nix/hex2nix">hex2nix</link>. Given the path to the Erlang modules (usually <literal>pkgs/development/erlang-modules</literal>), it will dump a file called <literal>hex-packages.nix</literal>, containing all the packages that use a recognized build system in <link - xlink:href="https://hex.pm">Hex</link>. It can't be determined, however, whether every package is buildable. - </para> - - <para> - To make life easier for our users, try to build every <link - xlink:href="https://hex.pm">Hex</link> package and remove those that fail. To do that, simply run the following command in the root of your <literal>nixpkgs</literal> repository: - </para> - -<screen> -<prompt>$ </prompt>nix-build -A beamPackages -</screen> - - <para> - That will attempt to build every package in <literal>beamPackages</literal>. Then manually remove those that fail. Hopefully, someone will improve <link - xlink:href="https://github.com/erlang-nix/hex2nix">hex2nix</link> in the future to automate the process. - </para> - </section> </section> diff --git a/nixpkgs/doc/languages-frameworks/emscripten.section.md b/nixpkgs/doc/languages-frameworks/emscripten.section.md index 24c49ec1409..80e1094809a 100644 --- a/nixpkgs/doc/languages-frameworks/emscripten.section.md +++ b/nixpkgs/doc/languages-frameworks/emscripten.section.md @@ -1,4 +1,4 @@ -# User's Guide to Emscripten in Nixpkgs +# Emscripten [Emscripten](https://github.com/kripken/emscripten): An LLVM-to-JavaScript Compiler diff --git a/nixpkgs/doc/languages-frameworks/haskell.section.md b/nixpkgs/doc/languages-frameworks/haskell.section.md index 48d22831cd9..be5c7b7c8d1 100644 --- a/nixpkgs/doc/languages-frameworks/haskell.section.md +++ b/nixpkgs/doc/languages-frameworks/haskell.section.md @@ -3,7 +3,7 @@ title: User's Guide for Haskell in Nixpkgs author: Peter Simons date: 2015-06-01 --- -# User's Guide to the Haskell Infrastructure +# Haskell ## How to install Haskell packages @@ -25,14 +25,14 @@ avoided that by keeping all Haskell-related packages in a separate attribute set called `haskellPackages`, which the following command will list: ``` $ nix-env -f "<nixpkgs>" -qaP -A haskellPackages -haskellPackages.a50 a50-0.5 -haskellPackages.abacate haskell-abacate-0.0.0.0 -haskellPackages.abcBridge haskell-abcBridge-0.12 -haskellPackages.afv afv-0.1.1 -haskellPackages.alex alex-3.1.4 -haskellPackages.Allure Allure-0.4.101.1 -haskellPackages.alms alms-0.6.7 -[... some 8000 entries omitted ...] +haskellPackages.a50 a50-0.5 +haskellPackages.AAI AAI-0.2.0.1 +haskellPackages.abacate abacate-0.0.0.0 +haskellPackages.abc-puzzle abc-puzzle-0.2.1 +haskellPackages.abcBridge abcBridge-0.15 +haskellPackages.abcnotation abcnotation-1.9.0 +haskellPackages.abeson abeson-0.1.0.1 +[... some 14000 entries omitted ...] ``` To install any of those packages into your profile, refer to them by their @@ -101,19 +101,21 @@ 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.ghc6104 ghc-6.10.4 -haskell.compiler.ghc6123 ghc-6.12.3 -haskell.compiler.ghc704 ghc-7.0.4 -haskell.compiler.ghc722 ghc-7.2.2 -haskell.compiler.ghc742 ghc-7.4.2 -haskell.compiler.ghc763 ghc-7.6.3 -haskell.compiler.ghc784 ghc-7.8.4 -haskell.compiler.ghc7102 ghc-7.10.2 -haskell.compiler.ghcHEAD ghc-7.11.20150402 -haskell.compiler.ghcNokinds ghc-nokinds-7.11.20150704 -haskell.compiler.ghcjs ghcjs-0.1.0 -haskell.compiler.jhc jhc-0.8.2 -haskell.compiler.uhc uhc-1.1.9.0 +haskell.compiler.ghc822 ghc-8.2.2 +haskell.compiler.integer-simple.ghc822 ghc-8.2.2 +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.ghcjs ghcjs-8.6.0.1 ``` We have no package sets for `jhc` or `uhc` yet, unfortunately, but for every @@ -398,7 +400,9 @@ nix: For more on how to write a `shell.nix` file see the below section. You'll need to express a derivation. Note that Nixpkgs ships with a convenience wrapper function around `mkDerivation` called `haskell.lib.buildStackProject` to help you -create this derivation in exactly the way Stack expects. All of the same inputs +create this derivation in exactly the way Stack expects. However for this to work +you need to disable the sandbox, which you can do by using `--option sandbox relaxed` +or `--option sandbox false` to the Nix command. All of the same inputs as `mkDerivation` can be provided. For example, to build a Stack project that including packages that link against a version of the R library compiled with special options turned on: diff --git a/nixpkgs/doc/languages-frameworks/idris.section.md b/nixpkgs/doc/languages-frameworks/idris.section.md index e88015f08e3..8d7962d7fb9 100644 --- a/nixpkgs/doc/languages-frameworks/idris.section.md +++ b/nixpkgs/doc/languages-frameworks/idris.section.md @@ -1,4 +1,4 @@ -# Idris packages +# Idris ## Installing Idris diff --git a/nixpkgs/doc/languages-frameworks/index.xml b/nixpkgs/doc/languages-frameworks/index.xml index cd0b48adb14..9364c764bbf 100644 --- a/nixpkgs/doc/languages-frameworks/index.xml +++ b/nixpkgs/doc/languages-frameworks/index.xml @@ -1,7 +1,7 @@ <chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="chap-language-support"> - <title>Support for specific programming languages and frameworks</title> + <title>Languages and frameworks</title> <para> The <link linkend="chap-stdenv">standard build environment</link> makes it easy to build typical Autotools-based packages with very little code. Any other kind of package can be accomodated by overriding the appropriate phases of <literal>stdenv</literal>. However, there are specialised functions in Nixpkgs to easily build packages for other programming languages, such as Perl or Haskell. These are described in this chapter. </para> @@ -9,6 +9,8 @@ <xi:include href="beam.xml" /> <xi:include href="bower.xml" /> <xi:include href="coq.xml" /> + <xi:include href="crystal.section.xml" /> + <xi:include href="emscripten.section.xml" /> <xi:include href="gnome.xml" /> <xi:include href="go.xml" /> <xi:include href="haskell.section.xml" /> @@ -27,6 +29,4 @@ <xi:include href="texlive.xml" /> <xi:include href="titanium.section.xml" /> <xi:include href="vim.section.xml" /> - <xi:include href="emscripten.section.xml" /> - <xi:include href="crystal.section.xml" /> </chapter> diff --git a/nixpkgs/doc/languages-frameworks/ios.section.md b/nixpkgs/doc/languages-frameworks/ios.section.md index 6684b809ffe..5a81795c004 100644 --- a/nixpkgs/doc/languages-frameworks/ios.section.md +++ b/nixpkgs/doc/languages-frameworks/ios.section.md @@ -1,7 +1,7 @@ --- title: iOS author: Sander van der Burg -date: 2018-11-18 +date: 2019-11-10 --- # iOS @@ -217,3 +217,13 @@ xcode.simulateApp { By providing the result of an `xcode.buildApp {}` function and configuring the app bundle id, the app gets deployed automatically and started. + +Troubleshooting +--------------- +In some rare cases, it may happen that after a failure, changes are not picked +up. Most likely, this is caused by a derived data cache that Xcode maintains. +To wipe it you can run: + +```bash +$ rm -rf ~/Library/Developer/Xcode/DerivedData +``` diff --git a/nixpkgs/doc/languages-frameworks/node.section.md b/nixpkgs/doc/languages-frameworks/node.section.md index c6dce04c7b8..4dc95fc1dd9 100644 --- a/nixpkgs/doc/languages-frameworks/node.section.md +++ b/nixpkgs/doc/languages-frameworks/node.section.md @@ -1,5 +1,5 @@ -Node.js packages -================ +Node.js +======= The `pkgs/development/node-packages` folder contains a generated collection of [NPM packages](https://npmjs.com/) that can be installed with the Nix package manager. diff --git a/nixpkgs/doc/languages-frameworks/python.section.md b/nixpkgs/doc/languages-frameworks/python.section.md index 4b18a9139d8..1bedebd1190 100644 --- a/nixpkgs/doc/languages-frameworks/python.section.md +++ b/nixpkgs/doc/languages-frameworks/python.section.md @@ -144,6 +144,24 @@ What's happening here? 2. Then we create a Python 3.5 environment with the `withPackages` function. 3. The `withPackages` function expects us to provide a function as an argument that takes the set of all python packages and returns a list of packages to include in the environment. Here, we select the packages `numpy` and `toolz` from the package set. +To combine this with `mkShell` you can: + +```nix +with import <nixpkgs> {}; + +let + pythonEnv = python35.withPackages (ps: [ + ps.numpy + ps.toolz + ]); +in mkShell { + buildInputs = [ + pythonEnv + hello + ]; +} +``` + ##### Execute command with `--run` A convenient option with `nix-shell` is the `--run` option, with which you can execute a command in the `nix-shell`. We can @@ -593,7 +611,7 @@ as the interpreter unless overridden otherwise. All parameters from `stdenv.mkDerivation` function are still supported. The following are specific to `buildPythonPackage`: * `catchConflicts ? true`: If `true`, abort package build if a package name appears more than once in dependency tree. Default is `true`. -* `disabled` ? false: If `true`, package is not build for the particular Python interpreter version. +* `disabled` ? false: If `true`, package is not built for the particular Python interpreter version. * `dontWrapPythonPrograms ? false`: Skip wrapping of python programs. * `permitUserSite ? false`: Skip setting the `PYTHONNOUSERSITE` environment variable in wrapped programs. * `installFlags ? []`: A list of strings. Arguments to be passed to `pip install`. To pass options to `python setup.py install`, use `--install-option`. E.g., `installFlags=["--install-option='--cpp_implementation'"]`. diff --git a/nixpkgs/doc/languages-frameworks/r.section.md b/nixpkgs/doc/languages-frameworks/r.section.md index c8f02bd1478..d4e1617779c 100644 --- a/nixpkgs/doc/languages-frameworks/r.section.md +++ b/nixpkgs/doc/languages-frameworks/r.section.md @@ -1,5 +1,5 @@ -R packages -========== +R += ## Installation diff --git a/nixpkgs/doc/languages-frameworks/rust.section.md b/nixpkgs/doc/languages-frameworks/rust.section.md index 83b7b159bd6..709a0d504cf 100644 --- a/nixpkgs/doc/languages-frameworks/rust.section.md +++ b/nixpkgs/doc/languages-frameworks/rust.section.md @@ -4,7 +4,7 @@ author: Matthias Beyer date: 2017-03-05 --- -# User's Guide to the Rust Infrastructure +# Rust To install the rust compiler and cargo put @@ -68,6 +68,17 @@ build-time. When `verifyCargoDeps` is set to `true`, the build will also verify that the `cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the `cargoDeps` and `src`. Note that this option changes the value of `cargoSha256` since it also copies the `Cargo.lock` in it. To avoid breaking backward-compatibility this option is not enabled by default but hopefully will be in the future. +### Building a crate for a different target + +To build your crate with a different cargo `--target` simply specify the `target` attribute: + +```nix +pkgs.rustPlatform.buildRustPackage { + (...) + target = "x86_64-fortanix-unknown-sgx"; +} +``` + ## Compiling Rust crates using Nix instead of Cargo ### Simple operation @@ -192,7 +203,7 @@ argument and returns a set that contains all attribute that should be overwritten. For more complicated cases, such as when parts of the crate's -derivation depend on the the crate's version, the `attrs` argument of +derivation depend on the crate's version, the `attrs` argument of the override above can be read, as in the following example, which patches the derivation: diff --git a/nixpkgs/doc/languages-frameworks/vim.section.md b/nixpkgs/doc/languages-frameworks/vim.section.md index 537e7b93e52..05a23d26cf2 100644 --- a/nixpkgs/doc/languages-frameworks/vim.section.md +++ b/nixpkgs/doc/languages-frameworks/vim.section.md @@ -3,7 +3,7 @@ title: User's Guide for Vim in Nixpkgs author: Marc Weber date: 2016-06-25 --- -# User's Guide to Vim Plugins/Addons/Bundles/Scripts in Nixpkgs +# Vim Both Neovim and Vim can be configured to include your favorite plugins and additional libraries. |