···12121313 <para>
1414 Some extensions (plugins) might require OCaml and sometimes other OCaml
1515- packages. The <literal>coq.ocamlPackages</literal> attribute can be used
1616- to depend on the same package set Coq was built against.
1515+ packages. The <literal>coq.ocamlPackages</literal> attribute can be used to
1616+ depend on the same package set Coq was built against.
1717 </para>
18181919 <para>
+4
doc/languages-frameworks/vim.section.md
···23232424```
2525vim_configurable.customize {
2626+ # `name` specifies the name of the executable and package
2627 name = "vim-with-plugins";
27282829 vimrcConfig.customRC = ''
···3031 '';
3132}
3233```
3434+3535+This configuration is used when vim is invoked with the command specified as name, in this case `vim-with-plugins`.
33363437For Neovim the `configure` argument can be overridden to achieve the same:
3538···8386{
8487 packageOverrides = pkgs: with pkgs; {
8588 myVim = vim_configurable.customize {
8989+ # `name` specifies the name of the executable and package
8690 name = "vim-with-plugins";
8791 # add here code from the example section
8892 };
+30-8
doc/stdenv.xml
···372372 They are programs/libraries used at build time that furthermore produce
373373 programs/libraries also used at build time. If the dependency doesn't
374374 care about the target platform (i.e. isn't a compiler or similar tool),
375375- put it in <varname>nativeBuildInputs</varname>instead. The most common
375375+ put it in <varname>nativeBuildInputs</varname> instead. The most common
376376 use for this <literal>buildPackages.stdenv.cc</literal>, the default C
377377 compiler for this role. That example crops up more than one might think
378378 in old commonly used C libraries.
···20992099 </para>
2100210021012101 <para>
21022102- In order to alleviate this burden, the <firstterm>setup
21032103- hook></firstterm>mechanism was written, where any package can include a
21042104- shell script that [by convention rather than enforcement by Nix], any
21052105- downstream reverse-dependency will source as part of its build process. That
21062106- allows the downstream dependency to merely specify its dependencies, and
21072107- lets those dependencies effectively initialize themselves. No boilerplate
21082108- mirroring the list of dependencies is needed.
21022102+ In order to alleviate this burden, the <firstterm>setup hook</firstterm>
21032103+ mechanism was written, where any package can include a shell script that [by
21042104+ convention rather than enforcement by Nix], any downstream
21052105+ reverse-dependency will source as part of its build process. That allows the
21062106+ downstream dependency to merely specify its dependencies, and lets those
21072107+ dependencies effectively initialize themselves. No boilerplate mirroring the
21082108+ list of dependencies is needed.
21092109 </para>
2110211021112111 <para>
···24422442 use <citerefentry>
24432443 <refentrytitle>dlopen</refentrytitle>
24442444 <manvolnum>3</manvolnum> </citerefentry> to load libraries at runtime.
24452445+ </para>
24462446+ </listitem>
24472447+ </varlistentry>
24482448+ <varlistentry>
24492449+ <term>
24502450+ breakpointHook
24512451+ </term>
24522452+ <listitem>
24532453+ <para>
24542454+ This hook will make a build pause instead of stopping when a failure
24552455+ happen. It prevents nix to cleanup the build environment immediatly and
24562456+ allows the user to attach to a build environment using the
24572457+ <command>cntr</command> command. On build error it will print the
24582458+ instruction that are neccessary for <command>cntr</command>. Installing
24592459+ cntr and running the command will provide shell access to the build
24602460+ sandbox of failed build. At <filename>/var/lib/cntr</filename> the
24612461+ sandbox filesystem is mounted. All commands and files of the system are
24622462+ still accessible within the shell. To execute commands from the sandbox
24632463+ use the cntr exec subcommand. Note that <command>cntr</command> also
24642464+ needs to be executed on the machine that is doing the build, which might
24652465+ be not the case when remote builders are enabled.
24662466+ <command>cntr</command> is only supported on linux based platforms.
24452467 </para>
24462468 </listitem>
24472469 </varlistentry>
···11+{ config, lib, pkgs, ... }:
22+33+with lib;
44+55+let
66+77+ cfg = config.services.eternal-terminal;
88+99+in
1010+1111+{
1212+1313+ ###### interface
1414+1515+ options = {
1616+1717+ services.eternal-terminal = {
1818+1919+ enable = mkEnableOption "Eternal Terminal server";
2020+2121+ port = mkOption {
2222+ default = 2022;
2323+ type = types.int;
2424+ description = ''
2525+ The port the server should listen on. Will use the server's default (2022) if not specified.
2626+ '';
2727+ };
2828+2929+ verbosity = mkOption {
3030+ default = 0;
3131+ type = types.enum (lib.range 0 9);
3232+ description = ''
3333+ The verbosity level (0-9).
3434+ '';
3535+ };
3636+3737+ silent = mkOption {
3838+ default = false;
3939+ type = types.bool;
4040+ description = ''
4141+ If enabled, disables all logging.
4242+ '';
4343+ };
4444+4545+ logSize = mkOption {
4646+ default = 20971520;
4747+ type = types.int;
4848+ description = ''
4949+ The maximum log size.
5050+ '';
5151+ };
5252+ };
5353+ };
5454+5555+ ###### implementation
5656+5757+ config = mkIf cfg.enable {
5858+5959+ # We need to ensure the et package is fully installed because
6060+ # the (remote) et client runs the `etterminal` binary when it
6161+ # connects.
6262+ environment.systemPackages = [ pkgs.eternal-terminal ];
6363+6464+ systemd.services = {
6565+ eternal-terminal = {
6666+ description = "Eternal Terminal server.";
6767+ wantedBy = [ "multi-user.target" ];
6868+ after = [ "syslog.target" "network.target" ];
6969+ serviceConfig = {
7070+ Type = "forking";
7171+ ExecStart = "${pkgs.eternal-terminal}/bin/etserver --daemon --cfgfile=${pkgs.writeText "et.cfg" ''
7272+ ; et.cfg : Config file for Eternal Terminal
7373+ ;
7474+7575+ [Networking]
7676+ port = ${toString cfg.port}
7777+7878+ [Debug]
7979+ verbose = ${toString cfg.verbosity}
8080+ silent = ${if cfg.silent then "1" else "0"}
8181+ logsize = ${toString cfg.logSize}
8282+ ''}";
8383+ Restart = "on-failure";
8484+ KillMode = "process";
8585+ };
8686+ };
8787+ };
8888+ };
8989+}
+1-1
nixos/modules/services/web-apps/nextcloud.nix
···192192 type = types.nullOr types.str;
193193 default = null;
194194 description = ''
195195- Database password. Use <literal>adminpassFile</literal> to avoid this
195195+ Admin password. Use <literal>adminpassFile</literal> to avoid this
196196 being world-readable in the <literal>/nix/store</literal>.
197197 '';
198198 };
···5050 return false;
5151 cur = cur.Append(kPepperFlashBaseDirectory);
5252 break;
5353-@@ -323,7 +316,7 @@ bool PathProvider(int key, base::FilePath* result) {
5454- // We currently need a path here to look up whether the plugin is disabled
5555- // and what its permissions are.
5656- case chrome::FILE_NACL_PLUGIN:
5757-- if (!GetInternalPluginsDirectory(&cur))
5858-+ if (!GetInternalPluginsDirectory(&cur, "NACL"))
5959- return false;
6060- cur = cur.Append(kInternalNaClPluginFileName);
6161- break;
6253@@ -358,7 +351,7 @@ bool PathProvider(int key, base::FilePath* result) {
6354 cur = cur.DirName();
6455 }
···11+breakpointHook() {
22+ local red='\033[0;31m'
33+ local no_color='\033[0m'
44+55+ echo -e "${red}build failed in ${curPhase} with exit code ${exitCode}${no_color}"
66+ printf "To attach install cntr and run the following command as root:\n\n"
77+ sh -c "echo ' cntr attach -t command cntr-${out}'; while true; do sleep 99999999; done"
88+}
99+failureHooks+=(breakpointHook)
···5656 };
5757 in appendPatch super.hadoop-rpc patch;
58585959- # Version 1.9.1 needs Cabal 2.4.x or later, so
6060- # we use the one from the ghc-8.6.1 package set.
6161- stack = markBroken super.stack;
5959+ # stack-1.9.1 needs Cabal 2.4.x, a recent version of hpack, and a non-recent
6060+ # version of yaml. Go figure. We avoid overrideScope here because using it to
6161+ # change Cabal would re-compile every single package instead of just those
6262+ # that have it as an actual library dependency. The explicit overrides are
6363+ # more verbose but friendlier for Hydra.
6464+ stack = (doJailbreak super.stack).override {
6565+ Cabal = self.Cabal_2_4_0_1;
6666+ hpack = self.hpack_0_31_0.override { Cabal = self.Cabal_2_4_0_1; };
6767+ yaml = self.yaml_0_11_0_0;
6868+ hackage-security = self.hackage-security.override { Cabal = self.Cabal_2_4_0_1; };
6969+ };
7070+ hpack_0_31_0 = super.hpack_0_31_0.override {
7171+ yaml = self.yaml_0_11_0_0;
7272+ };
62736374}
···245245 on hackage. This can be used as a test for the source distribution,
246246 assuming the build fails when packaging mistakes are in the cabal file.
247247 */
248248- buildFromSdist = pkg: lib.overrideDerivation pkg (drv: {
249249- unpackPhase = let src = sdistTarball pkg; tarname = "${pkg.pname}-${pkg.version}"; in ''
250250- echo "Source tarball is at ${src}/${tarname}.tar.gz"
251251- tar xf ${src}/${tarname}.tar.gz
252252- cd ${pkg.pname}-*
253253- '';
248248+ buildFromSdist = pkg: overrideCabal pkg (drv: {
249249+ src = "${sdistTarball pkg}/${pkg.pname}-${pkg.version}.tar.gz";
250250+251251+ # Revising and jailbreaking the cabal file has been handled in sdistTarball
252252+ revision = null;
253253+ editedCabalFile = null;
254254+ jailbreak = false;
254255 });
255256256257 /* Build the package in a strict way to uncover potential problems.
···99 sha256 = "0pz8kf9mxj0k8yp8jgmhahddz58zv2b7gnyjwng75xgsx4i55xi2";
1010 };
11111212- meta = {
1212+ meta = with lib; {
1313 homepage = https://www.openpam.org;
1414 description = "An open source PAM library that focuses on simplicity, correctness, and cleanliness";
1515- platforms = lib.platforms.unix;
1616- maintainers = with lib.maintainers; [ matthewbauer ];
1515+ platforms = platforms.unix;
1616+ maintainers = with maintainers; [ matthewbauer ];
1717+ license = licenses.bsd3;
1718 };
1819}
+1
pkgs/development/libraries/openssl/chacha.nix
···7676 description = "A cryptographic library that implements the SSL and TLS protocols";
7777 platforms = [ "x86_64-linux" ];
7878 maintainers = [ stdenv.lib.maintainers.cstrahan ];
7979+ license = licenses.openssl;
7980 priority = 10; # resolves collision with ‘man-pages’
8081 };
8182}
+5-2
pkgs/development/libraries/pangoxsl/default.nix
···1313 pango
1414 ];
15151616- meta = {
1717- platforms = stdenv.lib.platforms.unix;
1616+ meta = with stdenv.lib; {
1717+ description = "Implements several of the inline properties defined by XSL that are not currently implemented by Pango.";
1818+ homepage = https://sourceforge.net/projects/pangopdf;
1919+ platforms = platforms.unix;
2020+ license = licenses.lgpl2;
1821 };
1922}
···11+{ stdenv, fetchFromGitHub, cmake, google-gflags, which
22+, lsb-release, glog, protobuf, cbc, zlib }:
33+44+stdenv.mkDerivation rec {
55+ name = "or-tools-${version}";
66+ version = "v6.9.1";
77+88+ src = fetchFromGitHub {
99+ owner = "google";
1010+ repo = "or-tools";
1111+ rev = version;
1212+ sha256 = "099j1mc7vvry0a2fiz9zvk6divivglzphv48wbw0c6nd5w8hb27c";
1313+ };
1414+1515+ # The original build system uses cmake which does things like pull
1616+ # in dependencies through git and Makefile creation time. We
1717+ # obviously don't want to do this so instead we provide the
1818+ # dependencies straight from nixpkgs and use the make build method.
1919+ configurePhase = ''
2020+ cat <<EOF > Makefile.local
2121+ UNIX_GFLAGS_DIR=${google-gflags}
2222+ UNIX_GLOG_DIR=${glog}
2323+ UNIX_PROTOBUF_DIR=${protobuf}
2424+ UNIX_CBC_DIR=${cbc}
2525+ EOF
2626+ '';
2727+2828+ buildPhase = ''
2929+ make cc
3030+ '';
3131+3232+ installPhase = ''
3333+ make install_cc prefix=$out
3434+ '';
3535+3636+ patches = [
3737+ # In "expected" way of compilation, the glog package is compiled
3838+ # with gflags support which then makes gflags header transitively
3939+ # included through glog. However in nixpkgs we don't compile glog
4040+ # with gflags so we have to include it ourselves. Upstream should
4141+ # always include gflags to support both ways I think.
4242+ #
4343+ # Upstream ticket: https://github.com/google/or-tools/issues/902
4444+ ./gflags-include.patch
4545+ ];
4646+4747+ nativeBuildInputs = [
4848+ cmake lsb-release which zlib
4949+ ];
5050+ propagatedBuildInputs = [
5151+ google-gflags glog protobuf cbc
5252+ ];
5353+5454+ meta = with stdenv.lib; {
5555+ homepage = https://github.com/google/or-tools;
5656+ license = licenses.asl20;
5757+ description = ''
5858+ Google's software suite for combinatorial optimization.
5959+ '';
6060+ maintainers = with maintainers; [ fuuzetsu ];
6161+ platforms = with platforms; linux;
6262+ };
6363+}
···99buildPythonPackage rec {
1010 pname = "ftfy";
11111212- version = "4.4.3";
1212+ version = "5.3.0";
1313 # ftfy v5 only supports python3. Since at the moment the only
1414 # packages that use ftfy are spacy and textacy which both support
1515 # python 2 and 3, they have pinned ftfy to the v4 branch.
···18181919 src = fetchPypi {
2020 inherit pname version;
2121- sha256 = "152xdb56rhs1q4r0ck1n557sbphw7zq18r75a7kkd159ckdnc01w";
2121+ sha256 = "0zybd0ypxhb83bgdbwzi120n02328v4j0ndm6bgkb6wg2gah59qb";
2222 };
23232424 propagatedBuildInputs = [ html5lib wcwidth ];
···2233buildPythonApplication rec {
44 pname = "pyprof2calltree";
55- version = "1.4.3";
55+ version = "1.4.4";
6677 # Fetch from GitHub because the PyPi packaged version does not
88 # include all test files.
···1010 owner = "pwaller";
1111 repo = "pyprof2calltree";
1212 rev = "v" + version;
1313- sha256 = "0i0a895zal193cpvzbv68fch606g4ik27rvzbby3vxk61zlxfqy5";
1313+ sha256 = "1vrip41ib7nmkwa8rjny1na1wyp7nvvgvm0h9bd21i262kbm4nqx";
1414 };
15151616 meta = with lib; {