From fbc5093649b17b65a5db6caa252f7d3aa99f94d0 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Mon, 19 Aug 2019 16:05:44 +0200 Subject: hooks: add moveSystemdUserUnitsHook This hook moves systemd user service file from `lib/systemd/user` to `share/systemd/user`. This is to allow systemd to find the user services when installed into a user profile. The `lib/systemd/user` path does not work since `lib` is not in `XDG_DATA_DIRS`. --- doc/stdenv/stdenv.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/stdenv/stdenv.xml b/doc/stdenv/stdenv.xml index f97c2a145af5..e85e2ccb0ec4 100644 --- a/doc/stdenv/stdenv.xml +++ b/doc/stdenv/stdenv.xml @@ -1834,6 +1834,19 @@ addEnvHooks "$hostOffset" myBashFunction + + + move-systemd-user-units.sh + + + + This setup hook moves any systemd user units installed in the lib + subdirectory into share. In addition, a link is provided from share to + lib for compatibility. This is needed for systemd to find user services + when installed into the user profile. + + + set-source-date-epoch-to-latest.sh -- cgit v1.2.3 From 87cab901a3328792fd4abf6b63e9c4a5f8f92e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20B=C3=A4renz?= Date: Wed, 16 Sep 2020 10:44:57 +0200 Subject: agda.section.md: Fix header, enumerations, capitalisation --- doc/languages-frameworks/agda.section.md | 39 ++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'doc') diff --git a/doc/languages-frameworks/agda.section.md b/doc/languages-frameworks/agda.section.md index 9ce046d05b6f..5ba4e285f424 100644 --- a/doc/languages-frameworks/agda.section.md +++ b/doc/languages-frameworks/agda.section.md @@ -12,12 +12,13 @@ Agda can be installed from `agda`: $ nix-env -iA agda ``` -To use agda with libraries, the `agda.withPackages` function can be used. This function either takes: -+ A list of packages, -+ or a function which returns a list of packages when given the `agdaPackages` attribute set, -+ or an attribute set containing a list of packages and a GHC derivation for compilation (see below). +To use Agda with libraries, the `agda.withPackages` function can be used. This function either takes: -For example, suppose we wanted a version of agda which has access to the standard library. This can be obtained with the expressions: +* A list of packages, +* or a function which returns a list of packages when given the `agdaPackages` attribute set, +* or an attribute set containing a list of packages and a GHC derivation for compilation (see below). + +For example, suppose we wanted a version of Agda which has access to the standard library. This can be obtained with the expressions: ``` agda.withPackages [ agdaPackages.standard-library ] @@ -33,18 +34,19 @@ or can be called as in the [Compiling Agda](#compiling-agda) section. If you want to use a library in your home directory (for instance if it is a development version) then typecheck it manually (using `agda.withPackages` if necessary) and then override the `src` attribute of the package to point to your local repository. -Agda will not by default use these libraries. To tell agda to use the library we have some options: -- Call `agda` with the library flag: +Agda will not by default use these libraries. To tell Agda to use the library we have some options: + +* Call `agda` with the library flag: ``` $ agda -l standard-library -i . MyFile.agda ``` -- Write a `my-library.agda-lib` file for the project you are working on which may look like: +* Write a `my-library.agda-lib` file for the project you are working on which may look like: ``` name: my-library include: . depend: standard-library ``` -- Create the file `~/.agda/defaults` and add any libraries you want to use by default. +* Create the file `~/.agda/defaults` and add any libraries you want to use by default. More information can be found in the [official Agda documentation on library management](https://agda.readthedocs.io/en/v2.6.1/tools/package-system.html). @@ -60,12 +62,13 @@ agda.withPackages { ``` ## Writing Agda packages -To write a nix derivation for an agda library, first check that the library has a `*.agda-lib` file. +To write a nix derivation for an Agda library, first check that the library has a `*.agda-lib` file. A derivation can then be written using `agdaPackages.mkDerivation`. This has similar arguments to `stdenv.mkDerivation` with the following additions: -+ `everythingFile` can be used to specify the location of the `Everything.agda` file, defaulting to `./Everything.agda`. If this file does not exist then either it should be patched in or the `buildPhase` should be overridden (see below). -+ `libraryName` should be the name that appears in the `*.agda-lib` file, defaulting to `pname`. -+ `libraryFile` should be the file name of the `*.agda-lib` file, defaulting to `${libraryName}.agda-lib`. + +* `everythingFile` can be used to specify the location of the `Everything.agda` file, defaulting to `./Everything.agda`. If this file does not exist then either it should be patched in or the `buildPhase` should be overridden (see below). +* `libraryName` should be the name that appears in the `*.agda-lib` file, defaulting to `pname`. +* `libraryFile` should be the file name of the `*.agda-lib` file, defaulting to `${libraryName}.agda-lib`. ### Building Agda packages The default build phase for `agdaPackages.mkDerivation` simply runs `agda` on the `Everything.agda` file. @@ -74,12 +77,14 @@ Additionally, a `preBuild` or `configurePhase` can be used if there are steps th `agda` and the Agda libraries contained in `buildInputs` are made available during the build phase. ### Installing Agda packages -The default install phase copies agda source files, agda interface files (`*.agdai`) and `*.agda-lib` files to the output directory. +The default install phase copies Agda source files, Agda interface files (`*.agdai`) and `*.agda-lib` files to the output directory. This can be overridden. -By default, agda sources are files ending on `.agda`, or literate agda files ending on `.lagda`, `.lagda.tex`, `.lagda.org`, `.lagda.md`, `.lagda.rst`. The list of recognised agda source extensions can be extended by setting the `extraExtensions` config variable. +By default, Agda sources are files ending on `.agda`, or literate Agda files ending on `.lagda`, `.lagda.tex`, `.lagda.org`, `.lagda.md`, `.lagda.rst`. The list of recognised Agda source extensions can be extended by setting the `extraExtensions` config variable. + +## Adding Agda packages to Nixpkgs -To add an agda package to `nixpkgs`, the derivation should be written to `pkgs/development/libraries/agda/${library-name}/` and an entry should be added to `pkgs/top-level/agda-packages.nix`. Here it is called in a scope with access to all other agda libraries, so the top line of the `default.nix` can look like: +To add an Agda package to `nixpkgs`, the derivation should be written to `pkgs/development/libraries/agda/${library-name}/` and an entry should be added to `pkgs/top-level/agda-packages.nix`. Here it is called in a scope with access to all other Agda libraries, so the top line of the `default.nix` can look like: ``` { mkDerivation, standard-library, fetchFromGitHub }: ``` @@ -103,4 +108,4 @@ mkDerivation { ``` This library has a file called `.agda-lib`, and so we give an empty string to `libraryFile` as nothing precedes `.agda-lib` in the filename. This file contains `name: IAL-1.3`, and so we let `libraryName = "IAL-1.3"`. This library does not use an `Everything.agda` file and instead has a Makefile, so there is no need to set `everythingFile` and we set a custom `buildPhase`. -When writing an agda package it is essential to make sure that no `.agda-lib` file gets added to the store as a single file (for example by using `writeText`). This causes agda to think that the nix store is a agda library and it will attempt to write to it whenever it typechecks something. See [https://github.com/agda/agda/issues/4613](https://github.com/agda/agda/issues/4613). +When writing an Agda package it is essential to make sure that no `.agda-lib` file gets added to the store as a single file (for example by using `writeText`). This causes Agda to think that the nix store is a Agda library and it will attempt to write to it whenever it typechecks something. See [https://github.com/agda/agda/issues/4613](https://github.com/agda/agda/issues/4613). -- cgit v1.2.3 From 748bc995207059b61676389c0b953243999f497c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 13 Oct 2020 18:53:40 +0200 Subject: docs: python39 is available --- doc/languages-frameworks/python.section.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index e2d9172919ef..59f7389b9ad3 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -755,8 +755,8 @@ and in this case the `python38` interpreter is automatically used. ### Interpreters -Versions 2.7, 3.6, 3.7 and 3.8 of the CPython interpreter are available as -respectively `python27`, `python36`, `python37` and `python38`. The +Versions 2.7, 3.6, 3.7, 3.8 and 3.9 of the CPython interpreter are available as +respectively `python27`, `python36`, `python37`, `python38` and `python39`. The aliases `python2` and `python3` correspond to respectively `python27` and `python38`. The default interpreter, `python`, maps to `python2`. The PyPy interpreters compatible with Python 2.7 and 3 are available as `pypy27` and -- cgit v1.2.3