···4849## Managing plugins with Vim packages
5051-To store you plugins in Vim packages the following example can be used:
5253```
54vim_configurable.customize {
···56 # loaded on launch
57 start = [ youcompleteme fugitive ];
58 # manually loadable by calling `:packadd $plugin-name`
0059 opt = [ phpCompletion elm-vim ];
60 # To automatically load a plugin when opening a filetype, add vimrc lines like:
61 # autocmd FileType php :packadd phpCompletion
···63}
64```
65066For Neovim the syntax is:
6768```
···74 packages.myVimPackage = with pkgs.vimPlugins; {
75 # see examples below how to use custom packages
76 start = [ ];
0077 opt = [ ];
78 };
79 };
···4849## Managing plugins with Vim packages
5051+To store you plugins in Vim packages (the native vim plugin manager, see `:help packages`) the following example can be used:
5253```
54vim_configurable.customize {
···56 # loaded on launch
57 start = [ youcompleteme fugitive ];
58 # manually loadable by calling `:packadd $plugin-name`
59+ # however, if a vim plugin has a dependency that is not explicitly listed in
60+ # opt that dependency will always be added to start to avoid confusion.
61 opt = [ phpCompletion elm-vim ];
62 # To automatically load a plugin when opening a filetype, add vimrc lines like:
63 # autocmd FileType php :packadd phpCompletion
···65}
66```
6768+`myVimPackage` is an arbitrary name for the generated package. You can choose any name you like.
69For Neovim the syntax is:
7071```
···77 packages.myVimPackage = with pkgs.vimPlugins; {
78 # see examples below how to use custom packages
79 start = [ ];
80+ # If a vim plugin has a dependency that is not explicitly listed in
81+ # opt that dependency will always be added to start to avoid confusion.
82 opt = [ ];
83 };
84 };
-113
lib/composable-derivation.nix
···1-{lib, pkgs}:
2-let inherit (lib) nvs; in
3-{
4-5- # composableDerivation basically mixes these features:
6- # - fix function
7- # - mergeAttrBy
8- # - provides shortcuts for "options" such as "--enable-foo" and adding
9- # buildInputs, see php example
10- #
11- # It predates styles which are common today, such as
12- # * the config attr
13- # * mkDerivation.override feature
14- # * overrideDerivation (lib/customization.nix)
15- #
16- # Some of the most more important usage examples (which could be rewritten if it was important):
17- # * php
18- # * postgis
19- # * vim_configurable
20- #
21- # A minimal example illustrating most features would look like this:
22- # let base = composableDerivation { (fixed: let inherit (fixed.fixed) name in {
23- # src = fetchurl {
24- # }
25- # buildInputs = [A];
26- # preConfigre = "echo ${name}";
27- # # attention, "name" attr is missing, thus you cannot instantiate "base".
28- # }
29- # in {
30- # # These all add name attribute, thus you can instantiate those:
31- # v1 = base.merge ({ name = "foo-add-B"; buildInputs = [B]; }); // B gets merged into buildInputs
32- # v2 = base.merge ({ name = "mix-in-pre-configure-lines" preConfigre = ""; });
33- # v3 = base.replace ({ name = "foo-no-A-only-B;" buildInputs = [B]; });
34- # }
35- #
36- # So yes, you can think about it being something like nixos modules, and
37- # you'd be merging "features" in one at a time using .merge or .replace
38- # Thanks Shea for telling me that I rethink the documentation ..
39- #
40- # issues:
41- # * its complicated to understand
42- # * some "features" such as exact merge behaviour are buried in mergeAttrBy
43- # and defaultOverridableDelayableArgs assuming the default behaviour does
44- # the right thing in the common case
45- # * Eelco once said using such fix style functions are slow to evaluate
46- # * Too quick & dirty. Hard to understand for others. The benefit was that
47- # you were able to create a kernel builder like base derivation and replace
48- # / add patches the way you want without having to declare function arguments
49- #
50- # nice features:
51- # declaring "optional features" is modular. For instance:
52- # flags.curl = {
53- # configureFlags = ["--with-curl=${curl.dev}" "--with-curlwrappers"];
54- # buildInputs = [curl openssl];
55- # };
56- # flags.other = { .. }
57- # (Example taken from PHP)
58- #
59- # alternative styles / related features:
60- # * Eg see function supporting building the kernel
61- # * versionedDerivation (discussion about this is still going on - or ended)
62- # * composedArgsAndFun
63- # * mkDerivation.override
64- # * overrideDerivation
65- # * using { .., *Support ? false }: like configurable options.
66- # To find those examples use grep
67- #
68- # To sum up: It exists for historical reasons - and for most commonly used
69- # tasks the alternatives should be used
70- #
71- # If you have questions about this code ping Marc Weber.
72- composableDerivation = {
73- mkDerivation ? pkgs.stdenv.mkDerivation,
74-75- # list of functions to be applied before defaultOverridableDelayableArgs removes removeAttrs names
76- # prepareDerivationArgs handles derivation configurations
77- applyPreTidy ? [ lib.prepareDerivationArgs ],
78-79- # consider adding addtional elements by derivation.merge { removeAttrs = ["elem"]; };
80- removeAttrs ? ["cfg" "flags"]
81-82- }: (lib.defaultOverridableDelayableArgs ( a: mkDerivation a)
83- {
84- inherit applyPreTidy removeAttrs;
85- }).merge;
86-87- # some utility functions
88- # use this function to generate flag attrs for prepareDerivationArgs
89- # E nable D isable F eature
90- edf = {name, feat ? name, enable ? {}, disable ? {} , value ? ""}:
91- nvs name {
92- set = {
93- configureFlags = ["--enable-${feat}${if value == "" then "" else "="}${value}"];
94- } // enable;
95- unset = {
96- configureFlags = ["--disable-${feat}"];
97- } // disable;
98- };
99-100- # same for --with and --without-
101- # W ith or W ithout F eature
102- wwf = {name, feat ? name, enable ? {}, disable ? {}, value ? ""}:
103- nvs name {
104- set = enable // {
105- configureFlags = ["--with-${feat}${if value == "" then "" else "="}${value}"]
106- ++ lib.maybeAttr "configureFlags" [] enable;
107- };
108- unset = disable // {
109- configureFlags = ["--without-${feat}"]
110- ++ lib.maybeAttr "configureFlags" [] disable;
111- };
112- };
113-}
···35 withStdOverrides;
363738- # predecessors: proposed replacement for applyAndFun (which has a bug cause it merges twice)
39- # the naming "overridableDelayableArgs" tries to express that you can
40- # - override attr values which have been supplied earlier
41- # - use attr values before they have been supplied by accessing the fix point
42- # name "fixed"
43- # f: the (delayed overridden) arguments are applied to this
44- #
45- # initial: initial attrs arguments and settings. see defaultOverridableDelayableArgs
46- #
47- # returns: f applied to the arguments // special attributes attrs
48- # a) merge: merge applied args with new args. Wether an argument is overridden depends on the merge settings
49- # b) replace: this let's you replace and remove names no matter which merge function has been set
50- #
51- # examples: see test cases "res" below;
52- overridableDelayableArgs =
53- f: # the function applied to the arguments
54- initial: # you pass attrs, the functions below are passing a function taking the fix argument
55- let
56- takeFixed = if lib.isFunction initial then initial else (fixed : initial); # transform initial to an expression always taking the fixed argument
57- tidy = args:
58- let # apply all functions given in "applyPreTidy" in sequence
59- applyPreTidyFun = fold ( n: a: x: n ( a x ) ) lib.id (maybeAttr "applyPreTidy" [] args);
60- in removeAttrs (applyPreTidyFun args) ( ["applyPreTidy"] ++ (maybeAttr "removeAttrs" [] args) ); # tidy up args before applying them
61- fun = n: x:
62- let newArgs = fixed:
63- let args = takeFixed fixed;
64- mergeFun = args.${n};
65- in if isAttrs x then (mergeFun args x)
66- else assert lib.isFunction x;
67- mergeFun args (x ( args // { inherit fixed; }));
68- in overridableDelayableArgs f newArgs;
69- in
70- (f (tidy (lib.fix takeFixed))) // {
71- merge = fun "mergeFun";
72- replace = fun "keepFun";
73- };
74- defaultOverridableDelayableArgs = f:
75- let defaults = {
76- mergeFun = mergeAttrByFunc; # default merge function. merge strategie (concatenate lists, strings) is given by mergeAttrBy
77- keepFun = a: b: { inherit (a) removeAttrs mergeFun keepFun mergeAttrBy; } // b; # even when using replace preserve these values
78- applyPreTidy = []; # list of functions applied to args before args are tidied up (usage case : prepareDerivationArgs)
79- mergeAttrBy = mergeAttrBy // {
80- applyPreTidy = a: b: a ++ b;
81- removeAttrs = a: b: a ++ b;
82- };
83- removeAttrs = ["mergeFun" "keepFun" "mergeAttrBy" "removeAttrs" "fixed" ]; # before applying the arguments to the function make sure these names are gone
84- };
85- in (overridableDelayableArgs f defaults).merge;
86-87-88-89- # rec { # an example of how composedArgsAndFun can be used
90- # a = composedArgsAndFun (x: x) { a = ["2"]; meta = { d = "bar";}; };
91- # # meta.d will be lost ! It's your task to preserve it (eg using a merge function)
92- # b = a.passthru.function { a = [ "3" ]; meta = { d2 = "bar2";}; };
93- # # instead of passing/ overriding values you can use a merge function:
94- # c = b.passthru.function ( x: { a = x.a ++ ["4"]; }); # consider using (maybeAttr "a" [] x)
95- # }
96- # result:
97- # {
98- # a = { a = ["2"]; meta = { d = "bar"; }; passthru = { function = .. }; };
99- # b = { a = ["3"]; meta = { d2 = "bar2"; }; passthru = { function = .. }; };
100- # c = { a = ["3" "4"]; meta = { d2 = "bar2"; }; passthru = { function = .. }; };
101- # # c2 is equal to c
102- # }
103- composedArgsAndFun = f: foldArgs defaultMerge f {};
104-105-106 # shortcut for attrByPath ["name"] default attrs
107 maybeAttrNullable = maybeAttr;
108···285 # };
286 # will result in
287 # { mergeAttrsBy = [...]; buildInputs = [ a b c d ]; }
288- # is used by prepareDerivationArgs, defaultOverridableDelayableArgs and can be used when composing using
289 # foldArgs, composedArgsAndFun or applyAndFun. Example: composableDerivation in all-packages.nix
290 mergeAttrByFunc = x: y:
291 let
···317 // listToAttrs (map (n: nameValuePair n lib.mergeAttrs) [ "passthru" "meta" "cfg" "flags" ])
318 // listToAttrs (map (n: nameValuePair n (a: b: "${a}\n${b}") ) [ "preConfigure" "postInstall" ])
319 ;
320-321- # prepareDerivationArgs tries to make writing configurable derivations easier
322- # example:
323- # prepareDerivationArgs {
324- # mergeAttrBy = {
325- # myScript = x: y: x ++ "\n" ++ y;
326- # };
327- # cfg = {
328- # readlineSupport = true;
329- # };
330- # flags = {
331- # readline = {
332- # set = {
333- # configureFlags = [ "--with-compiler=${compiler}" ];
334- # buildInputs = [ compiler ];
335- # pass = { inherit compiler; READLINE=1; };
336- # assertion = compiler.dllSupport;
337- # myScript = "foo";
338- # };
339- # unset = { configureFlags = ["--without-compiler"]; };
340- # };
341- # };
342- # src = ...
343- # buildPhase = '' ... '';
344- # name = ...
345- # myScript = "bar";
346- # };
347- # if you don't have need for unset you can omit the surrounding set = { .. } attr
348- # all attrs except flags cfg and mergeAttrBy will be merged with the
349- # additional data from flags depending on config settings
350- # It's used in composableDerivation in all-packages.nix. It's also used
351- # heavily in the new python and libs implementation
352- #
353- # should we check for misspelled cfg options?
354- # TODO use args.mergeFun here as well?
355- prepareDerivationArgs = args:
356- let args2 = { cfg = {}; flags = {}; } // args;
357- flagName = name: "${name}Support";
358- cfgWithDefaults = (listToAttrs (map (n: nameValuePair (flagName n) false) (attrNames args2.flags)))
359- // args2.cfg;
360- opts = attrValues (mapAttrs (a: v:
361- let v2 = if v ? set || v ? unset then v else { set = v; };
362- n = if cfgWithDefaults.${flagName a} then "set" else "unset";
363- attr = maybeAttr n {} v2; in
364- if (maybeAttr "assertion" true attr)
365- then attr
366- else throw "assertion of flag ${a} of derivation ${args.name} failed"
367- ) args2.flags );
368- in removeAttrs
369- (mergeAttrsByFuncDefaults ([args] ++ opts ++ [{ passthru = cfgWithDefaults; }]))
370- ["flags" "cfg" "mergeAttrBy" ];
371-372373 nixType = x:
374 if isAttrs x then
···35 withStdOverrides;
36370000000000000000000000000000000000000000000000000000000000000000000038 # shortcut for attrByPath ["name"] default attrs
39 maybeAttrNullable = maybeAttr;
40···217 # };
218 # will result in
219 # { mergeAttrsBy = [...]; buildInputs = [ a b c d ]; }
220+ # is used by defaultOverridableDelayableArgs and can be used when composing using
221 # foldArgs, composedArgsAndFun or applyAndFun. Example: composableDerivation in all-packages.nix
222 mergeAttrByFunc = x: y:
223 let
···249 // listToAttrs (map (n: nameValuePair n lib.mergeAttrs) [ "passthru" "meta" "cfg" "flags" ])
250 // listToAttrs (map (n: nameValuePair n (a: b: "${a}\n${b}") ) [ "preConfigure" "postInstall" ])
251 ;
0000000000000000000000000000000000000000000000000000252253 nixType = x:
254 if isAttrs x then
-38
lib/tests/misc.nix
···401 expected = "«foo»";
402 };
403404-405-# MISC
406-407- testOverridableDelayableArgsTest = {
408- expr =
409- let res1 = defaultOverridableDelayableArgs id {};
410- res2 = defaultOverridableDelayableArgs id { a = 7; };
411- res3 = let x = defaultOverridableDelayableArgs id { a = 7; };
412- in (x.merge) { b = 10; };
413- res4 = let x = defaultOverridableDelayableArgs id { a = 7; };
414- in (x.merge) ( x: { b = 10; });
415- res5 = let x = defaultOverridableDelayableArgs id { a = 7; };
416- in (x.merge) ( x: { a = builtins.add x.a 3; });
417- res6 = let x = defaultOverridableDelayableArgs id { a = 7; mergeAttrBy = { a = builtins.add; }; };
418- y = x.merge {};
419- in (y.merge) { a = 10; };
420-421- resRem7 = res6.replace (a: removeAttrs a ["a"]);
422-423- # fixed tests (delayed args): (when using them add some comments, please)
424- resFixed1 =
425- let x = defaultOverridableDelayableArgs id ( x: { a = 7; c = x.fixed.b; });
426- y = x.merge (x: { name = "name-${builtins.toString x.fixed.c}"; });
427- in (y.merge) { b = 10; };
428- strip = attrs: removeAttrs attrs ["merge" "replace"];
429- in all id
430- [ ((strip res1) == { })
431- ((strip res2) == { a = 7; })
432- ((strip res3) == { a = 7; b = 10; })
433- ((strip res4) == { a = 7; b = 10; })
434- ((strip res5) == { a = 10; })
435- ((strip res6) == { a = 17; })
436- ((strip resRem7) == {})
437- ((strip resFixed1) == { a = 7; b = 10; c =10; name = "name-10"; })
438- ];
439- expected = true;
440- };
441-442}
···343 <literal><![CDATA[security.pam.services.<name?>.text]]></literal>.
344 </para>
345 </listitem>
0000000346 </itemizedlist>
347 </section>
348···359 The <option>services.matomo</option> module gained the option
360 <option>services.matomo.package</option> which determines the used
361 Matomo version.
000000362 </para>
363 </listitem>
364 <listitem>
···343 <literal><![CDATA[security.pam.services.<name?>.text]]></literal>.
344 </para>
345 </listitem>
346+ <listitem>
347+ <para>
348+ <literal>fish</literal> has been upgraded to 3.0.
349+ It comes with a number of improvements and backwards incompatible changes.
350+ See the <literal>fish</literal> <link xlink:href="https://github.com/fish-shell/fish-shell/releases/tag/3.0.0">release notes</link> for more information.
351+ </para>
352+ </listitem>
353 </itemizedlist>
354 </section>
355···366 The <option>services.matomo</option> module gained the option
367 <option>services.matomo.package</option> which determines the used
368 Matomo version.
369+ </para>
370+ </listitem>
371+ <listitem>
372+ <para>
373+ <literal>composableDerivation</literal> along with supporting library functions
374+ has been removed.
375 </para>
376 </listitem>
377 <listitem>
···25 DESTDIR=$(out)
26 '';
2728- propagatedBuildInputs = with python3Packages; [ pyqt5 ];
2930 postInstall = ''
31 # replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise
···25 DESTDIR=$(out)
26 '';
2728+ propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit ];
2930 postInstall = ''
31 # replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise
···3940 #doCheck = false;
41000042 meta = with stdenv.lib; {
43 description = "A 3D editor with support for procedural editing";
44 homepage = http://www.k-3d.org/;
···3940 #doCheck = false;
4142+ NIX_CFLAGS_COMPILE = [
43+ "-Wno-deprecated-declarations"
44+ ];
45+46 meta = with stdenv.lib; {
47 description = "A 3D editor with support for procedural editing";
48 homepage = http://www.k-3d.org/;
+2-2
pkgs/applications/misc/calibre/default.nix
···23 ] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
2425 prePatch = ''
26- sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5}/share/sip/PyQt5':" \
27 setup/build_environment.py
2829 # Remove unneeded files and libs
···42 fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook
43 ] ++ (with python2Packages; [
44 apsw cssselect cssutils dateutil dnspython html5-parser lxml mechanize netifaces pillow
45- python pyqt5 sip
46 regex msgpack
47 # the following are distributed with calibre, but we use upstream instead
48 odfpy
···23 ] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
2425 prePatch = ''
26+ sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5_with_qtwebkit}/share/sip/PyQt5':" \
27 setup/build_environment.py
2829 # Remove unneeded files and libs
···42 fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils wrapGAppsHook
43 ] ++ (with python2Packages; [
44 apsw cssselect cssutils dateutil dnspython html5-parser lxml mechanize netifaces pillow
45+ python pyqt5_with_qtwebkit sip
46 regex msgpack
47 # the following are distributed with calibre, but we use upstream instead
48 odfpy
···7# Dropbox client to bootstrap installation.
8# The client is self-updating, so the actual version may be newer.
9let
10- version = "55.4.171";
1112 arch = {
13 "x86_64-linux" = "x86_64";
···7# Dropbox client to bootstrap installation.
8# The client is self-updating, so the actual version may be newer.
9let
10+ version = "63.4.107";
1112 arch = {
13 "x86_64-linux" = "x86_64";
···1-From 92f4dca367c3a6f0536a1e0f3fbb44bb6ed4da62 Mon Sep 17 00:00:00 2001
2-From: Manuel Nickschas <sputnick@quassel-irc.org>
3-Date: Thu, 3 May 2018 23:19:34 +0200
4-Subject: [PATCH] cmake: Fix build with Qt 5.11
5-6-Qt 5.11 removes the qt5_use_modules function, so add a copy. If
7-present, the Qt-provided function will be used instead.
8-9-Closes GH-355.
10----
11- cmake/QuasselMacros.cmake | 38 ++++++++++++++++++++++++++++++++++++++
12- 1 file changed, 38 insertions(+)
13-14-diff --git a/cmake/QuasselMacros.cmake b/cmake/QuasselMacros.cmake
15-index 652c0042..d77ba1cf 100644
16---- a/cmake/QuasselMacros.cmake
17-+++ b/cmake/QuasselMacros.cmake
18-@@ -5,6 +5,9 @@
19- # The qt4_use_modules function was taken from CMake's Qt4Macros.cmake:
20- # (C) 2005-2009 Kitware, Inc.
21- #
22-+# The qt5_use_modules function was taken from Qt 5.10.1 (and modified):
23-+# (C) 2005-2011 Kitware, Inc.
24-+#
25- # Redistribution and use is allowed according to the terms of the BSD license.
26- # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
27-28-@@ -43,6 +46,41 @@ function(qt4_use_modules _target _link_type)
29- endforeach()
30- endfunction()
31-32-+# Qt 5.11 removed the qt5_use_modules function, so we need to provide it until we can switch to a modern CMake version.
33-+# If present, the Qt-provided version will be used automatically instead.
34-+function(qt5_use_modules _target _link_type)
35-+ if (NOT TARGET ${_target})
36-+ message(FATAL_ERROR "The first argument to qt5_use_modules must be an existing target.")
37-+ endif()
38-+ if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE" )
39-+ set(_qt5_modules ${ARGN})
40-+ set(_qt5_link_type ${_link_type})
41-+ else()
42-+ set(_qt5_modules ${_link_type} ${ARGN})
43-+ endif()
44-+
45-+ if ("${_qt5_modules}" STREQUAL "")
46-+ message(FATAL_ERROR "qt5_use_modules requires at least one Qt module to use.")
47-+ endif()
48-+ foreach(_module ${_qt5_modules})
49-+ if (NOT Qt5${_module}_FOUND)
50-+ find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH)
51-+ if (NOT Qt5${_module}_FOUND)
52-+ message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.")
53-+ endif()
54-+ endif()
55-+ target_link_libraries(${_target} ${_qt5_link_type} ${Qt5${_module}_LIBRARIES})
56-+ set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_module}_INCLUDE_DIRS})
57-+ set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_module}_COMPILE_DEFINITIONS})
58-+ if (Qt5_POSITION_INDEPENDENT_CODE
59-+ AND (CMAKE_VERSION VERSION_LESS 2.8.12
60-+ AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
61-+ OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)))
62-+ set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
63-+ endif()
64-+ endforeach()
65-+endfunction()
66-+
67- # Some wrappers for simplifying dual-Qt support
68-69- function(qt_use_modules)
70---
71-2.16.2
72-
···77 singular
78 giac
79 palp
80+ # needs to be rWrapper since the default `R` doesn't include R's default libraries
81 rWrapper
82 gfan
83 cddlib
+5-25
pkgs/applications/science/math/sage/sage-src.nix
···9# all get the same sources with the same patches applied.
1011stdenv.mkDerivation rec {
12- version = "8.4";
13 name = "sage-src-${version}";
1415 src = fetchFromGitHub {
16 owner = "sagemath";
17 repo = "sage";
18 rev = version;
19- sha256 = "0gips1hagiz9m7s21bg5as8hrrm2x5k47h1bsq0pc46iplfwmv2d";
20 };
2122 # Patches needed because of particularities of nix or the way this is packaged.
···46 # tests) are also run. That is necessary to test dochtml individually. See
47 # https://trac.sagemath.org/ticket/26110 for an upstream discussion.
48 ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
0049 ];
5051 # Patches needed because of package updates. We could just pin the versions of
···68 );
69 in [
70 # New glpk version has new warnings, filter those out until upstream sage has found a solution
071 # https://trac.sagemath.org/ticket/24824
72 ./patches/pari-stackwarn.patch # not actually necessary since the pari upgrade, but necessary for the glpk patch to apply
73 (fetchpatch {
···76 stripLen = 1;
77 })
7879- # https://trac.sagemath.org/ticket/25260
80- ./patches/numpy-1.15.1.patch
81-82 # https://trac.sagemath.org/ticket/26315
83 ./patches/giac-1.5.0.patch
84-85- # needed for ntl update
86- # https://trac.sagemath.org/ticket/25532
87- (fetchpatch {
88- name = "lcalc-c++11.patch";
89- url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa";
90- sha256 = "0p5wnvbx65i7cp0bjyaqgp4rly8xgnk12pqwaq3dqby0j2bk6ijb";
91- })
92-93- (fetchpatch {
94- name = "cython-0.29.patch";
95- url = "https://git.sagemath.org/sage.git/patch/?h=f77de1d0e7f90ee12761140500cb8cbbb789ab20";
96- sha256 = "14wrpy8jgbnpza1j8a2nx8y2r946y82pll1fv3cn6gpfmm6640l3";
97- })
98- # https://trac.sagemath.org/ticket/26360
99- (fetchpatch {
100- name = "arb-2.15.1.patch";
101- url = "https://git.sagemath.org/sage.git/patch/?id=30cc778d46579bd0c7537ed33e8d7a4f40fd5c31";
102- sha256 = "13vc2q799dh745sm59xjjabllfj0sfjzcacf8k59kwj04x755d30";
103- })
104105 # https://trac.sagemath.org/ticket/26326
106 # needs to be split because there is a merge commit in between
···9# all get the same sources with the same patches applied.
1011stdenv.mkDerivation rec {
12+ version = "8.5";
13 name = "sage-src-${version}";
1415 src = fetchFromGitHub {
16 owner = "sagemath";
17 repo = "sage";
18 rev = version;
19+ sha256 = "08mb9626phsls2phdzqxsnp2df5pn5qr72m0mm4nncby26pwn19c";
20 };
2122 # Patches needed because of particularities of nix or the way this is packaged.
···46 # tests) are also run. That is necessary to test dochtml individually. See
47 # https://trac.sagemath.org/ticket/26110 for an upstream discussion.
48 ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
49+50+ ./patches/dont-test-guess-gaproot.patch
51 ];
5253 # Patches needed because of package updates. We could just pin the versions of
···70 );
71 in [
72 # New glpk version has new warnings, filter those out until upstream sage has found a solution
73+ # Should be fixed with glpk > 4.65.
74 # https://trac.sagemath.org/ticket/24824
75 ./patches/pari-stackwarn.patch # not actually necessary since the pari upgrade, but necessary for the glpk patch to apply
76 (fetchpatch {
···79 stripLen = 1;
80 })
8100082 # https://trac.sagemath.org/ticket/26315
83 ./patches/giac-1.5.0.patch
000000000000000000008485 # https://trac.sagemath.org/ticket/26326
86 # needs to be split because there is a merge commit in between
···3, sage-with-env
4, makeWrapper
5, files ? null # "null" means run all tests
6-, longTests ? true # run tests marked as "long time"
000007}:
89# for a quick test of some source files:
···14 runAllTests = files == null;
15 testArgs = if runAllTests then "--all" else testFileList;
16 patienceSpecifier = if longTests then "--long" else "";
017 relpathToArg = relpath: lib.escapeShellArg "${src}/${relpath}"; # paths need to be absolute
18 testFileList = lib.concatStringsSep " " (map relpathToArg files);
19in
···45 export HOME="$TMPDIR/sage-home"
46 mkdir -p "$HOME"
4748- # "--long" tests are in the order of 1h, without "--long" its 1/2h
49- "sage" -t --timeout=0 --nthreads "$NIX_BUILD_CORES" --optional=sage ${patienceSpecifier} ${testArgs}
50 '';
51}
···3, sage-with-env
4, makeWrapper
5, files ? null # "null" means run all tests
6+, longTests ? true # run tests marked as "long time" (roughly doubles runtime)
7+# Run as many tests as possible in approximately n seconds. This will give each
8+# file to test a "time budget" and stop tests if it is exceeded. 300 is the
9+# upstream default value.
10+# https://trac.sagemath.org/ticket/25270 for details.
11+, timeLimit ? null
12}:
1314# for a quick test of some source files:
···19 runAllTests = files == null;
20 testArgs = if runAllTests then "--all" else testFileList;
21 patienceSpecifier = if longTests then "--long" else "";
22+ timeSpecifier = if timeLimit == null then "" else "--short ${toString timeLimit}";
23 relpathToArg = relpath: lib.escapeShellArg "${src}/${relpath}"; # paths need to be absolute
24 testFileList = lib.concatStringsSep " " (map relpathToArg files);
25in
···51 export HOME="$TMPDIR/sage-home"
52 mkdir -p "$HOME"
5354+ echo "Running sage tests with arguments ${timeSpecifier} ${patienceSpecifier} ${testArgs}"
55+ "sage" -t --nthreads "$NIX_BUILD_CORES" --optional=sage ${timeSpecifier} ${patienceSpecifier} ${testArgs}
56 '';
57}
···176 ];
177 };
178 };
179+180+ # 12. example of running something as root on top of a parent image
181+ # Regression test related to PR #52109
182+ runAsRootParentImage = buildImage {
183+ name = "runAsRootParentImage";
184+ tag = "latest";
185+ runAsRoot = "touch /example-file";
186+ fromImage = bash;
187+ };
188}
···2223 meta = {
24 homepage = "http://goodies.xfce.org/projects/panel-plugins/${p_name}";
25+ description = "A simple XFCE panel plugin that lets the user run an alarm at a specified time or at the end of a specified countdown period";
26 platforms = platforms.linux;
27 license = licenses.gpl2;
28 maintainers = [ ];
···4}:
56let
7- version = "0.7.1";
8 # Build a sort of "union package" with all the native dependencies we
9 # have: Lua (or LuaJIT), readline, etc. Then, we can depend on this
10 # and refer to ${urn-rt} instead of ${lua}, ${readline}, etc.
···27 owner = "urn";
28 repo = "urn";
29 rev = "v${version}";
30- sha256 = "1vw0sljrczbwl7fl5d3frbpklb0larzyp7s7mwwprkb07b027sd5";
31 };
3233 buildInputs = [ makeWrapper ];
···4}:
56let
7+ version = "0.7.2";
8 # Build a sort of "union package" with all the native dependencies we
9 # have: Lua (or LuaJIT), readline, etc. Then, we can depend on this
10 # and refer to ${urn-rt} instead of ${lua}, ${readline}, etc.
···27 owner = "urn";
28 repo = "urn";
29 rev = "v${version}";
30+ sha256 = "0nclr3d8ap0y5cg36i7g4ggdqci6m5q27y9f26b57km8p266kcpy";
31 };
3233 buildInputs = [ makeWrapper ];
···15 preConfigure = "sh bootstrap.sh";
1617 meta = {
18+ description = "Abandoned library. Alternative lightweight Matroska muxer written for HandBrake";
19+ longDescription = ''
20+ Library was meant to be an alternative to the official libmatroska library.
21+ It is written in plain C, and intended to be very portable.
22+ '';
23 homepage = https://github.com/saintdev/libmkv;
24 license = stdenv.lib.licenses.gpl2;
25 maintainers = [ stdenv.lib.maintainers.wmertens ];
···11 outputs = [ "out" "dev" "doc" ];
1213 meta = with stdenv.lib; {
14+ description = "Media container library to manipulate Ogg files";
15+ longDescription = ''
16+ Library to work with Ogg multimedia container format.
17+ Ogg is flexible file storage and streaming format that supports
18+ plethora of codecs. Open format free for anyone to use.
19+ '';
20 homepage = https://xiph.org/ogg/;
21 license = licenses.bsd3;
22 maintainers = [ maintainers.ehmry ];
···23stdenv.mkDerivation rec {
4 name = "matomo-${version}";
5- version = "3.6.1";
67 src = fetchurl {
8 # TODO: As soon as the tarballs are renamed as well on future releases, this should be enabled again
9 # url = "https://builds.matomo.org/${name}.tar.gz";
10 url = "https://builds.matomo.org/piwik-${version}.tar.gz";
11- sha256 = "0hddj1gyyriwgsh1mghihck2i7rj6gvb1i0b2ripcdfjnxcs47hz";
12 };
1314 nativeBuildInputs = [ makeWrapper ];
···23stdenv.mkDerivation rec {
4 name = "matomo-${version}";
5+ version = "3.7.0";
67 src = fetchurl {
8 # TODO: As soon as the tarballs are renamed as well on future releases, this should be enabled again
9 # url = "https://builds.matomo.org/${name}.tar.gz";
10 url = "https://builds.matomo.org/piwik-${version}.tar.gz";
11+ sha256 = "17ihsmwdfrx1c1v8cp5pc3swx3h0i0l9pjrc8jyww08kavfbfly6";
12 };
1314 nativeBuildInputs = [ makeWrapper ];
+12-12
pkgs/shells/fish/default.nix
···1{ stdenv, fetchurl, coreutils, utillinux,
2- nettools, bc, which, gnused, gnugrep,
3 groff, man-db, getent, libiconv, pcre2,
4- gettext, ncurses, python3
056 , writeText
7···8889 fish = stdenv.mkDerivation rec {
90 name = "fish-${version}";
91- version = "2.7.1";
9293 etcConfigAppendix = builtins.toFile "etc-config.appendix.fish" etcConfigAppendixText;
94···96 # There are differences between the release tarball and the tarball github packages from the tag
97 # Hence we cannot use fetchFromGithub
98 url = "https://github.com/fish-shell/fish-shell/releases/download/${version}/${name}.tar.gz";
99- sha256 = "0nhc3yc5lnnan7zmxqqxm07rdpwjww5ijy45ll2njdc6fnfb2az4";
100 };
1010102 buildInputs = [ ncurses libiconv pcre2 ];
103- configureFlags = [ "--without-included-pcre2" ];
0000104105 # Required binaries during execution
106 # Python: Autocompletion generated from manpages and config editing
107 propagatedBuildInputs = [
108- coreutils gnugrep gnused bc
109 python3 groff gettext
110 ] ++ optional (!stdenv.isDarwin) man-db;
111112 postInstall = ''
113 sed -r "s|command grep|command ${gnugrep}/bin/grep|" \
114 -i "$out/share/fish/functions/grep.fish"
115- sed -e "s|bc|${bc}/bin/bc|" \
116- -e "s|/usr/bin/seq|${coreutils}/bin/seq|" \
117- -i "$out/share/fish/functions/seq.fish" \
118- "$out/share/fish/functions/math.fish"
119 sed -i "s|which |${which}/bin/which |" \
120 "$out/share/fish/functions/type.fish"
121 sed -e "s|\|cut|\|${coreutils}/bin/cut|" \
···147 done
148149 '' + optionalString (!stdenv.isDarwin) ''
150- sed -i "s|(hostname\||(${nettools}/bin/hostname\||" \
151- "$out/share/fish/functions/fish_prompt.fish"
152 sed -i "s|Popen(\['manpath'|Popen(\['${man-db}/bin/manpath'|" \
153 "$out/share/fish/tools/create_manpage_completions.py"
154 sed -i "s|command manpath|command ${man-db}/bin/manpath|" \
···1{ stdenv, fetchurl, coreutils, utillinux,
2+ which, gnused, gnugrep,
3 groff, man-db, getent, libiconv, pcre2,
4+ gettext, ncurses, python3,
5+ cmake
67 , writeText
8···8990 fish = stdenv.mkDerivation rec {
91 name = "fish-${version}";
92+ version = "3.0.0";
9394 etcConfigAppendix = builtins.toFile "etc-config.appendix.fish" etcConfigAppendixText;
95···97 # There are differences between the release tarball and the tarball github packages from the tag
98 # Hence we cannot use fetchFromGithub
99 url = "https://github.com/fish-shell/fish-shell/releases/download/${version}/${name}.tar.gz";
100+ sha256 = "1kzjd0n0sfslkd36lzrvvvgy3qwkd9y466bkrqlnhd5h9dhx77ga";
101 };
102103+ nativeBuildInputs = [ cmake ];
104 buildInputs = [ ncurses libiconv pcre2 ];
105+ cmakeFlags = [ "-DINTERNAL_WCWIDTH=OFF" ];
106+107+ preConfigure = ''
108+ patchShebangs ./build_tools/git_version_gen.sh
109+ '';
110111 # Required binaries during execution
112 # Python: Autocompletion generated from manpages and config editing
113 propagatedBuildInputs = [
114+ coreutils gnugrep gnused
115 python3 groff gettext
116 ] ++ optional (!stdenv.isDarwin) man-db;
117118 postInstall = ''
119 sed -r "s|command grep|command ${gnugrep}/bin/grep|" \
120 -i "$out/share/fish/functions/grep.fish"
0000121 sed -i "s|which |${which}/bin/which |" \
122 "$out/share/fish/functions/type.fish"
123 sed -e "s|\|cut|\|${coreutils}/bin/cut|" \
···149 done
150151 '' + optionalString (!stdenv.isDarwin) ''
00152 sed -i "s|Popen(\['manpath'|Popen(\['${man-db}/bin/manpath'|" \
153 "$out/share/fish/tools/create_manpage_completions.py"
154 sed -i "s|command manpath|command ${man-db}/bin/manpath|" \