···1213 <para>
14 Some extensions (plugins) might require OCaml and sometimes other OCaml
15- packages. The <literal>coq.ocamlPackages</literal> attribute can be used
16- to depend on the same package set Coq was built against.
17 </para>
1819 <para>
···1213 <para>
14 Some extensions (plugins) might require OCaml and sometimes other OCaml
15+ packages. The <literal>coq.ocamlPackages</literal> attribute can be used to
16+ depend on the same package set Coq was built against.
17 </para>
1819 <para>
+4
doc/languages-frameworks/vim.section.md
···2324```
25vim_configurable.customize {
026 name = "vim-with-plugins";
2728 vimrcConfig.customRC = ''
···30 '';
31}
32```
003334For Neovim the `configure` argument can be overridden to achieve the same:
35···83{
84 packageOverrides = pkgs: with pkgs; {
85 myVim = vim_configurable.customize {
086 name = "vim-with-plugins";
87 # add here code from the example section
88 };
···2324```
25vim_configurable.customize {
26+ # `name` specifies the name of the executable and package
27 name = "vim-with-plugins";
2829 vimrcConfig.customRC = ''
···31 '';
32}
33```
34+35+This configuration is used when vim is invoked with the command specified as name, in this case `vim-with-plugins`.
3637For Neovim the `configure` argument can be overridden to achieve the same:
38···86{
87 packageOverrides = pkgs: with pkgs; {
88 myVim = vim_configurable.customize {
89+ # `name` specifies the name of the executable and package
90 name = "vim-with-plugins";
91 # add here code from the example section
92 };
+30-8
doc/stdenv.xml
···372 They are programs/libraries used at build time that furthermore produce
373 programs/libraries also used at build time. If the dependency doesn't
374 care about the target platform (i.e. isn't a compiler or similar tool),
375- put it in <varname>nativeBuildInputs</varname>instead. The most common
376 use for this <literal>buildPackages.stdenv.cc</literal>, the default C
377 compiler for this role. That example crops up more than one might think
378 in old commonly used C libraries.
···2099 </para>
21002101 <para>
2102- In order to alleviate this burden, the <firstterm>setup
2103- hook></firstterm>mechanism was written, where any package can include a
2104- shell script that [by convention rather than enforcement by Nix], any
2105- downstream reverse-dependency will source as part of its build process. That
2106- allows the downstream dependency to merely specify its dependencies, and
2107- lets those dependencies effectively initialize themselves. No boilerplate
2108- mirroring the list of dependencies is needed.
2109 </para>
21102111 <para>
···2442 use <citerefentry>
2443 <refentrytitle>dlopen</refentrytitle>
2444 <manvolnum>3</manvolnum> </citerefentry> to load libraries at runtime.
00000000000000000000002445 </para>
2446 </listitem>
2447 </varlistentry>
···372 They are programs/libraries used at build time that furthermore produce
373 programs/libraries also used at build time. If the dependency doesn't
374 care about the target platform (i.e. isn't a compiler or similar tool),
375+ put it in <varname>nativeBuildInputs</varname> instead. The most common
376 use for this <literal>buildPackages.stdenv.cc</literal>, the default C
377 compiler for this role. That example crops up more than one might think
378 in old commonly used C libraries.
···2099 </para>
21002101 <para>
2102+ In order to alleviate this burden, the <firstterm>setup hook</firstterm>
2103+ mechanism was written, where any package can include a shell script that [by
2104+ convention rather than enforcement by Nix], any downstream
2105+ reverse-dependency will source as part of its build process. That allows the
2106+ downstream dependency to merely specify its dependencies, and lets those
2107+ dependencies effectively initialize themselves. No boilerplate mirroring the
2108+ list of dependencies is needed.
2109 </para>
21102111 <para>
···2442 use <citerefentry>
2443 <refentrytitle>dlopen</refentrytitle>
2444 <manvolnum>3</manvolnum> </citerefentry> to load libraries at runtime.
2445+ </para>
2446+ </listitem>
2447+ </varlistentry>
2448+ <varlistentry>
2449+ <term>
2450+ breakpointHook
2451+ </term>
2452+ <listitem>
2453+ <para>
2454+ This hook will make a build pause instead of stopping when a failure
2455+ happen. It prevents nix to cleanup the build environment immediatly and
2456+ allows the user to attach to a build environment using the
2457+ <command>cntr</command> command. On build error it will print the
2458+ instruction that are neccessary for <command>cntr</command>. Installing
2459+ cntr and running the command will provide shell access to the build
2460+ sandbox of failed build. At <filename>/var/lib/cntr</filename> the
2461+ sandbox filesystem is mounted. All commands and files of the system are
2462+ still accessible within the shell. To execute commands from the sandbox
2463+ use the cntr exec subcommand. Note that <command>cntr</command> also
2464+ needs to be executed on the machine that is doing the build, which might
2465+ be not the case when remote builders are enabled.
2466+ <command>cntr</command> is only supported on linux based platforms.
2467 </para>
2468 </listitem>
2469 </varlistentry>
···1+{ config, lib, pkgs, ... }:
2+3+with lib;
4+5+let
6+7+ cfg = config.services.eternal-terminal;
8+9+in
10+11+{
12+13+ ###### interface
14+15+ options = {
16+17+ services.eternal-terminal = {
18+19+ enable = mkEnableOption "Eternal Terminal server";
20+21+ port = mkOption {
22+ default = 2022;
23+ type = types.int;
24+ description = ''
25+ The port the server should listen on. Will use the server's default (2022) if not specified.
26+ '';
27+ };
28+29+ verbosity = mkOption {
30+ default = 0;
31+ type = types.enum (lib.range 0 9);
32+ description = ''
33+ The verbosity level (0-9).
34+ '';
35+ };
36+37+ silent = mkOption {
38+ default = false;
39+ type = types.bool;
40+ description = ''
41+ If enabled, disables all logging.
42+ '';
43+ };
44+45+ logSize = mkOption {
46+ default = 20971520;
47+ type = types.int;
48+ description = ''
49+ The maximum log size.
50+ '';
51+ };
52+ };
53+ };
54+55+ ###### implementation
56+57+ config = mkIf cfg.enable {
58+59+ # We need to ensure the et package is fully installed because
60+ # the (remote) et client runs the `etterminal` binary when it
61+ # connects.
62+ environment.systemPackages = [ pkgs.eternal-terminal ];
63+64+ systemd.services = {
65+ eternal-terminal = {
66+ description = "Eternal Terminal server.";
67+ wantedBy = [ "multi-user.target" ];
68+ after = [ "syslog.target" "network.target" ];
69+ serviceConfig = {
70+ Type = "forking";
71+ ExecStart = "${pkgs.eternal-terminal}/bin/etserver --daemon --cfgfile=${pkgs.writeText "et.cfg" ''
72+ ; et.cfg : Config file for Eternal Terminal
73+ ;
74+75+ [Networking]
76+ port = ${toString cfg.port}
77+78+ [Debug]
79+ verbose = ${toString cfg.verbosity}
80+ silent = ${if cfg.silent then "1" else "0"}
81+ logsize = ${toString cfg.logSize}
82+ ''}";
83+ Restart = "on-failure";
84+ KillMode = "process";
85+ };
86+ };
87+ };
88+ };
89+}
+1-1
nixos/modules/services/web-apps/nextcloud.nix
···192 type = types.nullOr types.str;
193 default = null;
194 description = ''
195- Database password. Use <literal>adminpassFile</literal> to avoid this
196 being world-readable in the <literal>/nix/store</literal>.
197 '';
198 };
···192 type = types.nullOr types.str;
193 default = null;
194 description = ''
195+ Admin password. Use <literal>adminpassFile</literal> to avoid this
196 being world-readable in the <literal>/nix/store</literal>.
197 '';
198 };
···50 return false;
51 cur = cur.Append(kPepperFlashBaseDirectory);
52 break;
53-@@ -323,7 +316,7 @@ bool PathProvider(int key, base::FilePath* result) {
54- // We currently need a path here to look up whether the plugin is disabled
55- // and what its permissions are.
56- case chrome::FILE_NACL_PLUGIN:
57-- if (!GetInternalPluginsDirectory(&cur))
58-+ if (!GetInternalPluginsDirectory(&cur, "NACL"))
59- return false;
60- cur = cur.Append(kInternalNaClPluginFileName);
61- break;
62@@ -358,7 +351,7 @@ bool PathProvider(int key, base::FilePath* result) {
63 cur = cur.DirName();
64 }
···1+breakpointHook() {
2+ local red='\033[0;31m'
3+ local no_color='\033[0m'
4+5+ echo -e "${red}build failed in ${curPhase} with exit code ${exitCode}${no_color}"
6+ printf "To attach install cntr and run the following command as root:\n\n"
7+ sh -c "echo ' cntr attach -t command cntr-${out}'; while true; do sleep 99999999; done"
8+}
9+failureHooks+=(breakpointHook)
···56 };
57 in appendPatch super.hadoop-rpc patch;
5859- # Version 1.9.1 needs Cabal 2.4.x or later, so
60- # we use the one from the ghc-8.6.1 package set.
61- stack = markBroken super.stack;
000000000006263}
···56 };
57 in appendPatch super.hadoop-rpc patch;
5859+ # stack-1.9.1 needs Cabal 2.4.x, a recent version of hpack, and a non-recent
60+ # version of yaml. Go figure. We avoid overrideScope here because using it to
61+ # change Cabal would re-compile every single package instead of just those
62+ # that have it as an actual library dependency. The explicit overrides are
63+ # more verbose but friendlier for Hydra.
64+ stack = (doJailbreak super.stack).override {
65+ Cabal = self.Cabal_2_4_0_1;
66+ hpack = self.hpack_0_31_0.override { Cabal = self.Cabal_2_4_0_1; };
67+ yaml = self.yaml_0_11_0_0;
68+ hackage-security = self.hackage-security.override { Cabal = self.Cabal_2_4_0_1; };
69+ };
70+ hpack_0_31_0 = super.hpack_0_31_0.override {
71+ yaml = self.yaml_0_11_0_0;
72+ };
7374}
···245 on hackage. This can be used as a test for the source distribution,
246 assuming the build fails when packaging mistakes are in the cabal file.
247 */
248- buildFromSdist = pkg: lib.overrideDerivation pkg (drv: {
249- unpackPhase = let src = sdistTarball pkg; tarname = "${pkg.pname}-${pkg.version}"; in ''
250- echo "Source tarball is at ${src}/${tarname}.tar.gz"
251- tar xf ${src}/${tarname}.tar.gz
252- cd ${pkg.pname}-*
253- '';
0254 });
255256 /* Build the package in a strict way to uncover potential problems.
···245 on hackage. This can be used as a test for the source distribution,
246 assuming the build fails when packaging mistakes are in the cabal file.
247 */
248+ buildFromSdist = pkg: overrideCabal pkg (drv: {
249+ src = "${sdistTarball pkg}/${pkg.pname}-${pkg.version}.tar.gz";
250+251+ # Revising and jailbreaking the cabal file has been handled in sdistTarball
252+ revision = null;
253+ editedCabalFile = null;
254+ jailbreak = false;
255 });
256257 /* Build the package in a strict way to uncover potential problems.
···13 pango
14 ];
1516+ meta = with stdenv.lib; {
17+ description = "Implements several of the inline properties defined by XSL that are not currently implemented by Pango.";
18+ homepage = https://sourceforge.net/projects/pangopdf;
19+ platforms = platforms.unix;
20+ license = licenses.lgpl2;
21 };
22}
···37 done
38 '';
3940- meta = {
41 homepage = http://podofo.sourceforge.net;
42 description = "A library to work with the PDF file format";
43- platforms = stdenv.lib.platforms.all;
44- maintainers = [ ];
45 };
46}
···37 done
38 '';
3940+ meta = with stdenv.lib; {
41 homepage = http://podofo.sourceforge.net;
42 description = "A library to work with the PDF file format";
43+ platforms = platforms.all;
44+ license = with licenses; [ gpl2 lgpl2 ];
45 };
46}
+4-3
pkgs/development/libraries/polkit-qt-1/qt-4.nix
···25 done
26 '';
2728- meta = {
29 description = "A Qt wrapper around PolKit";
30- maintainers = with stdenv.lib.maintainers; [ ttuegel ];
31- platforms = with stdenv.lib.platforms; linux;
032 };
33}
···25 done
26 '';
2728+ meta = with stdenv.lib; {
29 description = "A Qt wrapper around PolKit";
30+ maintainers = [ maintainers.ttuegel ];
31+ platforms = platforms.linux;
32+ license = licenses.lgpl21;
33 };
34}
···1+{ stdenv, fetchFromGitHub, cmake, google-gflags, which
2+, lsb-release, glog, protobuf, cbc, zlib }:
3+4+stdenv.mkDerivation rec {
5+ name = "or-tools-${version}";
6+ version = "v6.9.1";
7+8+ src = fetchFromGitHub {
9+ owner = "google";
10+ repo = "or-tools";
11+ rev = version;
12+ sha256 = "099j1mc7vvry0a2fiz9zvk6divivglzphv48wbw0c6nd5w8hb27c";
13+ };
14+15+ # The original build system uses cmake which does things like pull
16+ # in dependencies through git and Makefile creation time. We
17+ # obviously don't want to do this so instead we provide the
18+ # dependencies straight from nixpkgs and use the make build method.
19+ configurePhase = ''
20+ cat <<EOF > Makefile.local
21+ UNIX_GFLAGS_DIR=${google-gflags}
22+ UNIX_GLOG_DIR=${glog}
23+ UNIX_PROTOBUF_DIR=${protobuf}
24+ UNIX_CBC_DIR=${cbc}
25+ EOF
26+ '';
27+28+ buildPhase = ''
29+ make cc
30+ '';
31+32+ installPhase = ''
33+ make install_cc prefix=$out
34+ '';
35+36+ patches = [
37+ # In "expected" way of compilation, the glog package is compiled
38+ # with gflags support which then makes gflags header transitively
39+ # included through glog. However in nixpkgs we don't compile glog
40+ # with gflags so we have to include it ourselves. Upstream should
41+ # always include gflags to support both ways I think.
42+ #
43+ # Upstream ticket: https://github.com/google/or-tools/issues/902
44+ ./gflags-include.patch
45+ ];
46+47+ nativeBuildInputs = [
48+ cmake lsb-release which zlib
49+ ];
50+ propagatedBuildInputs = [
51+ google-gflags glog protobuf cbc
52+ ];
53+54+ meta = with stdenv.lib; {
55+ homepage = https://github.com/google/or-tools;
56+ license = licenses.asl20;
57+ description = ''
58+ Google's software suite for combinatorial optimization.
59+ '';
60+ maintainers = with maintainers; [ fuuzetsu ];
61+ platforms = with platforms; linux;
62+ };
63+}
···9buildPythonPackage rec {
10 pname = "ftfy";
1112- version = "4.4.3";
13 # ftfy v5 only supports python3. Since at the moment the only
14 # packages that use ftfy are spacy and textacy which both support
15 # python 2 and 3, they have pinned ftfy to the v4 branch.
···1819 src = fetchPypi {
20 inherit pname version;
21- sha256 = "152xdb56rhs1q4r0ck1n557sbphw7zq18r75a7kkd159ckdnc01w";
22 };
2324 propagatedBuildInputs = [ html5lib wcwidth ];
···9buildPythonPackage rec {
10 pname = "ftfy";
1112+ version = "5.3.0";
13 # ftfy v5 only supports python3. Since at the moment the only
14 # packages that use ftfy are spacy and textacy which both support
15 # python 2 and 3, they have pinned ftfy to the v4 branch.
···1819 src = fetchPypi {
20 inherit pname version;
21+ sha256 = "0zybd0ypxhb83bgdbwzi120n02328v4j0ndm6bgkb6wg2gah59qb";
22 };
2324 propagatedBuildInputs = [ html5lib wcwidth ];
···23buildPythonApplication rec {
4 pname = "pyprof2calltree";
5- version = "1.4.3";
67 # Fetch from GitHub because the PyPi packaged version does not
8 # include all test files.
···10 owner = "pwaller";
11 repo = "pyprof2calltree";
12 rev = "v" + version;
13- sha256 = "0i0a895zal193cpvzbv68fch606g4ik27rvzbby3vxk61zlxfqy5";
14 };
1516 meta = with lib; {
···23buildPythonApplication rec {
4 pname = "pyprof2calltree";
5+ version = "1.4.4";
67 # Fetch from GitHub because the PyPi packaged version does not
8 # include all test files.
···10 owner = "pwaller";
11 repo = "pyprof2calltree";
12 rev = "v" + version;
13+ sha256 = "1vrip41ib7nmkwa8rjny1na1wyp7nvvgvm0h9bd21i262kbm4nqx";
14 };
1516 meta = with lib; {