From 5cf2869118b1db3ae86e6e234462eadd4e1d098d Mon Sep 17 00:00:00 2001 From: Simon Rainerson Date: Wed, 9 Sep 2020 10:16:52 +0200 Subject: wasmer: enable cranelift backend Since wasmer 0.17 no backends are enabled by default. Backends are now detected using the [makefile](https://github.com/wasmerio/wasmer/blob/master/Makefile). This change enables cranelift as this used to be the old default. At least one backend is needed for the `run` subcommand to work. If we want to replicate the actual logic in the makefile, we would probably want to enable the singlepass and llvm backend as well. However enabling llvm backend introduces a dependency on openssl, so we opted for replicating the old default behavior. --- pkgs/development/interpreters/wasmer/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkgs/development') diff --git a/pkgs/development/interpreters/wasmer/default.nix b/pkgs/development/interpreters/wasmer/default.nix index c620b1686ea6..c036b0808909 100644 --- a/pkgs/development/interpreters/wasmer/default.nix +++ b/pkgs/development/interpreters/wasmer/default.nix @@ -22,6 +22,12 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ cmake pkg-config ]; + # Since wasmer 0.17 no backends are enabled by default. Backends are now detected + # using the [makefile](https://github.com/wasmerio/wasmer/blob/master/Makefile). + # Enabling cranelift as this used to be the old default. At least one backend is + # needed for the run subcommand to work. + cargoBuildFlags = [ "--features 'backend-cranelift'" ]; + LIBCLANG_PATH = "${llvmPackages.libclang}/lib"; meta = with lib; { -- cgit v1.2.3 From 0601f34356dadc32a3fa82a2c8f694838f8d25a8 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Tue, 21 Jul 2020 11:02:37 +0000 Subject: R: remove qtbase.patch and fix few CRAN packages --- pkgs/development/r-modules/default.nix | 14 +++++++++++++- pkgs/development/r-modules/patches/qtbase.patch | 13 ------------- 2 files changed, 13 insertions(+), 14 deletions(-) delete mode 100644 pkgs/development/r-modules/patches/qtbase.patch (limited to 'pkgs/development') diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index dad01337f4a4..ad214d63f7b4 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -279,6 +279,7 @@ let mwaved = [ pkgs.fftw.dev ]; ncdf4 = [ pkgs.netcdf ]; nloptr = [ pkgs.nlopt pkgs.pkgconfig ]; + n1qn1 = [ pkgs.gfortran ]; odbc = [ pkgs.unixODBC ]; pander = [ pkgs.pandoc pkgs.which ]; pbdMPI = [ pkgs.openmpi ]; @@ -412,6 +413,11 @@ let systemfonts = [ pkgs.pkgconfig ]; tesseract = [ pkgs.pkgconfig ]; Cairo = [ pkgs.pkgconfig ]; + CLVTools = [ pkgs.gsl ]; + JMcmprsk = [ pkgs.gsl ]; + mashr = [ pkgs.gsl ]; + hadron = [ pkgs.gsl ]; + AMOUNTAIN = [ pkgs.gsl ]; Rsymphony = [ pkgs.pkgconfig pkgs.doxygen pkgs.graphviz pkgs.subversion ]; tcltk2 = [ pkgs.tcl pkgs.tk ]; tikzDevice = [ pkgs.which pkgs.texlive.combined.scheme-medium ]; @@ -799,7 +805,7 @@ let openssl = old.openssl.overrideDerivation (attrs: { preConfigure = '' patchShebangs configure - ''; + ''; PKGCONFIG_CFLAGS = "-I${pkgs.openssl.dev}/include"; PKGCONFIG_LIBS = "-Wl,-rpath,${pkgs.openssl.out}/lib -L${pkgs.openssl.out}/lib -lssl -lcrypto"; }); @@ -854,6 +860,12 @@ let ''; }); + libgeos = old.libgeos.overrideDerivation (attrs: { + preConfigure = '' + patchShebangs configure + ''; + }); + protolite = old.protolite.overrideDerivation (attrs: { preConfigure = '' patchShebangs configure diff --git a/pkgs/development/r-modules/patches/qtbase.patch b/pkgs/development/r-modules/patches/qtbase.patch deleted file mode 100644 index 14427b72630e..000000000000 --- a/pkgs/development/r-modules/patches/qtbase.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ru -x '*~' qtbase_orig/src/Makefile qtbase/src/Makefile ---- qtbase_orig/src/Makefile 2012-03-03 03:57:47.000000000 +0900 -+++ qtbase/src/Makefile 2014-11-01 23:06:51.383876323 +0900 -@@ -10,6 +10,9 @@ - -DR_INCLUDES=${R_INCLUDE_DIR} \ - -DCMAKE_INSTALL_PREFIX=../src; \ - make install -+# I could not control RPATH via CMake. HELP WANTED! -+ patchelf --set-rpath ${CMAKE_LIBRARY_PATH} qtbase.so -+ find ../inst/local/ -executable -type f -print0 | xargs -0 patchelf --set-rpath ${CMAKE_LIBRARY_PATH} - - clean: - rm -rf ../kdebindings-build -- cgit v1.2.3 From 86732c47f836e9d6aa6c5e367f2f7ca22469f5a9 Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Sat, 14 Nov 2020 23:10:14 +0100 Subject: llvm_11: Disable checks on musl libc hosts --- pkgs/development/compilers/llvm/11/llvm.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/development') diff --git a/pkgs/development/compilers/llvm/11/llvm.nix b/pkgs/development/compilers/llvm/11/llvm.nix index c2b70a149bf5..e78b6e6f7f7d 100644 --- a/pkgs/development/compilers/llvm/11/llvm.nix +++ b/pkgs/development/compilers/llvm/11/llvm.nix @@ -152,7 +152,7 @@ in stdenv.mkDerivation (rec { ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib ''; - doCheck = stdenv.isLinux && (!stdenv.isx86_32); + doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl); checkTarget = "check-all"; -- cgit v1.2.3 From 8864ea69c80a58118923e5cf49cd994cf352f40c Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 23 Nov 2020 14:22:06 -0500 Subject: python3Packages.nibabel: remove `platforms` from `meta` since Aarch64 is now supported - see https://github.com/nipy/nibabel/issues/861 --- pkgs/development/python-modules/nibabel/default.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'pkgs/development') diff --git a/pkgs/development/python-modules/nibabel/default.nix b/pkgs/development/python-modules/nibabel/default.nix index dc56bf956b74..bcf9bff1d932 100644 --- a/pkgs/development/python-modules/nibabel/default.nix +++ b/pkgs/development/python-modules/nibabel/default.nix @@ -34,6 +34,5 @@ buildPythonPackage rec { description = "Access a multitude of neuroimaging data formats"; license = licenses.mit; maintainers = with maintainers; [ ashgillman ]; - platforms = platforms.x86_64; # https://github.com/nipy/nibabel/issues/861 }; } -- cgit v1.2.3 From ba978ed6f0e2f8b8b4dbe672c8fdde939632dd85 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 10 Dec 2020 01:16:16 +0000 Subject: python37Packages.alerta-server: 8.1.0 -> 8.2.0 --- pkgs/development/python-modules/alerta-server/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/python-modules/alerta-server/default.nix b/pkgs/development/python-modules/alerta-server/default.nix index f8a3b9684805..f0d6f99917ce 100644 --- a/pkgs/development/python-modules/alerta-server/default.nix +++ b/pkgs/development/python-modules/alerta-server/default.nix @@ -4,11 +4,11 @@ buildPythonPackage rec { pname = "alerta-server"; - version = "8.1.0"; + version = "8.2.0"; src = fetchPypi { inherit pname version; - sha256 = "32a97eee95aea5527f6efa844c18b727fe4a6d61356ea3c0769a29a163ddcb7e"; + sha256 = "ee06d0f828b679402847989de9013a1271db282af377f5dce776347623dde345"; }; propagatedBuildInputs = [ -- cgit v1.2.3 From 4499917302c901a2b7a3b003d64322ac6ffdfeb4 Mon Sep 17 00:00:00 2001 From: Philipp Kern Date: Sat, 12 Dec 2020 00:13:19 +0100 Subject: libinfinity: 0.7.1 -> 0.7.2 --- pkgs/development/libraries/libinfinity/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/libraries/libinfinity/default.nix b/pkgs/development/libraries/libinfinity/default.nix index e018c1a9f5ea..15d9b05ebd48 100644 --- a/pkgs/development/libraries/libinfinity/default.nix +++ b/pkgs/development/libraries/libinfinity/default.nix @@ -13,10 +13,10 @@ let self = stdenv.mkDerivation rec { pname = "libinfinity"; - version = "0.7.1"; + version = "0.7.2"; src = fetchurl { - url = "http://releases.0x539.de/libinfinity/${pname}-${version}.tar.gz"; - sha256 = "1jw2fhrcbpyz99bij07iyhy9ffyqdn87vl8cb1qz897y3f2f0vk2"; + url = "https://github.com/gobby/${pname}/releases/download/${version}/${pname}-${version}.tar.gz"; + sha256 = "17i3g61hxz9pzl3ryd1yr15142r25m06jfzjrpdy7ic1b8vjjw3f"; }; outputs = [ "bin" "out" "dev" "man" "devdoc" ]; @@ -43,7 +43,7 @@ let }; meta = { - homepage = "http://gobby.0x539.de/"; + homepage = "https://gobby.github.io/"; description = "An implementation of the Infinote protocol written in GObject-based C"; license = stdenv.lib.licenses.lgpl2Plus; maintainers = [ stdenv.lib.maintainers.phreedom ]; -- cgit v1.2.3 From 25a193907e2646ac0c1486702c9231de126f4934 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 14 Dec 2020 04:36:41 +0000 Subject: python37Packages.cx_oracle: 8.0.1 -> 8.1.0 --- pkgs/development/python-modules/cx_oracle/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/python-modules/cx_oracle/default.nix b/pkgs/development/python-modules/cx_oracle/default.nix index 440e43cf81c8..d9dddf899c0c 100644 --- a/pkgs/development/python-modules/cx_oracle/default.nix +++ b/pkgs/development/python-modules/cx_oracle/default.nix @@ -2,13 +2,13 @@ buildPythonPackage rec { pname = "cx_Oracle"; - version = "8.0.1"; + version = "8.1.0"; buildInputs = [ odpic ]; src = fetchPypi { inherit pname version; - sha256 = "f10ada7f821a325c6befdd6fef1cac44ebc830736d0b75dda7b8ac9f851087b2"; + sha256 = "e1698c5522ee1355e552b30bfa0a58e6e772475b882c5d69d158bd7e6aed45de"; }; preConfigure = '' -- cgit v1.2.3 From 58fc2fb27d36227f796dc27c04daf61227082a79 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 15 Dec 2020 06:35:28 +0000 Subject: python37Packages.mongoengine: 0.21.0 -> 0.22.0 --- pkgs/development/python-modules/mongoengine/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/python-modules/mongoengine/default.nix b/pkgs/development/python-modules/mongoengine/default.nix index 3ac24f7430d9..c8969d9e2d4d 100644 --- a/pkgs/development/python-modules/mongoengine/default.nix +++ b/pkgs/development/python-modules/mongoengine/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "mongoengine"; - version = "0.21.0"; + version = "0.22.0"; disabled = isPy27; src = fetchFromGitHub { owner = "MongoEngine"; repo = pname; rev = "v${version}"; - sha256 = "02amfdirdw3nc0kgiyax7yndk5b65g83kbjvwwxbgnlcrb9vjzcd"; + sha256 = "14n9rl8w3i1fq96f3jzsg7gy331d7fmrapva6m38ih53rnf38bdf"; }; propagatedBuildInputs = [ -- cgit v1.2.3 From 371062f8ea87cc88d09b80d8981e19dbafacc901 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Fri, 18 Dec 2020 14:43:42 +0100 Subject: fcft: 2.3.1 -> 2.3.2 --- pkgs/development/libraries/fcft/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/libraries/fcft/default.nix b/pkgs/development/libraries/fcft/default.nix index 1ce09b63cbed..cbcef07de32b 100644 --- a/pkgs/development/libraries/fcft/default.nix +++ b/pkgs/development/libraries/fcft/default.nix @@ -3,12 +3,12 @@ stdenv.mkDerivation rec { pname = "fcft"; - version = "2.3.1"; + version = "2.3.2"; src = fetchgit { url = "https://codeberg.org/dnkl/fcft.git"; rev = version; - sha256 = "sha256-FD3KfaQbSEA1XdmS6YxH+c5fSsra9Ro/KKslb7Brv7U="; + sha256 = "0k2i57rakm4g86f7hbhkby8af0vv7v63a70lk3m58mkycpy5q2rm"; }; nativeBuildInputs = [ pkg-config meson ninja scdoc ]; -- cgit v1.2.3 From 507369bf2731319771a46eb60d9eb5861d154df3 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Sat, 28 Nov 2020 00:00:00 -0500 Subject: guile: fix static build --- pkgs/development/interpreters/guile/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkgs/development') diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix index 52a3488d0515..238e1c7b7adc 100644 --- a/pkgs/development/interpreters/guile/default.nix +++ b/pkgs/development/interpreters/guile/default.nix @@ -58,7 +58,8 @@ # "libgcc_s.so.1 must be installed for pthread_cancel to work". # don't have "libgcc_s.so.1" on darwin - LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; + LDFLAGS = stdenv.lib.optionalString + (!stdenv.isDarwin && !stdenv.hostPlatform.isStatic) "-lgcc_s"; configureFlags = [ "--with-libreadline-prefix=${readline.dev}" ] ++ stdenv.lib.optionals stdenv.isSunOS [ -- cgit v1.2.3 From eab35e481d7cf9af1fb0d8f6028c75b070ab43db Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Fri, 18 Dec 2020 14:47:35 +0100 Subject: fcft: allow to enable and disable text shaping feature May be interesting to get rid of the HarfBuzz dependency. --- pkgs/development/libraries/fcft/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/libraries/fcft/default.nix b/pkgs/development/libraries/fcft/default.nix index cbcef07de32b..fd6f26c9789f 100644 --- a/pkgs/development/libraries/fcft/default.nix +++ b/pkgs/development/libraries/fcft/default.nix @@ -1,5 +1,8 @@ { stdenv, lib, fetchgit, pkg-config, meson, ninja, scdoc -,freetype, fontconfig, harfbuzz, pixman, tllist, check }: +, freetype, fontconfig, pixman, tllist, check +, withHarfBuzz ? true +, harfbuzz +}: stdenv.mkDerivation rec { pname = "fcft"; @@ -12,10 +15,14 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config meson ninja scdoc ]; - buildInputs = [ freetype fontconfig pixman tllist harfbuzz ]; + buildInputs = [ freetype fontconfig pixman tllist ] + ++ lib.optional withHarfBuzz harfbuzz; checkInputs = [ check ]; - mesonFlags = [ "--buildtype=release" ]; + mesonFlags = [ + "--buildtype=release" + "-Dtext-shaping=${if withHarfBuzz then "enabled" else "disabled"}" + ]; doCheck = true; -- cgit v1.2.3 From 90438281efbb174d118c87386fd196883d7033b4 Mon Sep 17 00:00:00 2001 From: "Travis A. Everett" Date: Mon, 11 Jan 2021 19:29:36 -0600 Subject: bats: 1.2.0 -> 1.2.1 --- pkgs/development/interpreters/bats/default.nix | 30 ++++++++++++++++---------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/interpreters/bats/default.nix b/pkgs/development/interpreters/bats/default.nix index bbc38e515424..aa3abc655343 100644 --- a/pkgs/development/interpreters/bats/default.nix +++ b/pkgs/development/interpreters/bats/default.nix @@ -1,29 +1,37 @@ -{ stdenv, fetchzip, coreutils, gnugrep }: +{ stdenv, lib, fetchzip, bash, makeWrapper, coreutils, gnugrep, doCheck ? true }: stdenv.mkDerivation rec { pname = "bats"; - version = "1.2.0"; + version = "1.2.1"; src = fetchzip { url = "https://github.com/bats-core/bats-core/archive/v${version}.tar.gz"; - sha256 = "0f59zh4d4pa1a7ybs5zl6h0csbqqv11lbnq0jl1dgwm1s6p49bsq"; + hash = "sha256-grB/rJaDU0fuw4Hm3/9nI2px8KZnSWqRjTJPd7Mmb7s="; }; + nativeBuildInputs = [ makeWrapper ]; + patchPhase = '' - patchShebangs ./install.sh + patchShebangs . + ''; - substituteInPlace ./libexec/bats-core/bats \ - --replace 'type -p greadlink readlink' 'type -p ${coreutils}/bin/readlink' - substituteInPlace ./libexec/bats-core/bats-format-tap-stream \ - --replace grep ${gnugrep}/bin/grep + installPhase = '' + ./install.sh $out + wrapProgram $out/bin/bats --suffix PATH : "${lib.makeBinPath [ bash coreutils gnugrep ]}" ''; - installPhase = "./install.sh $out"; + inherit doCheck; + checkPhase = '' + # test generates file with absolute shebang dynamically + substituteInPlace test/install.bats --replace \ + "/usr/bin/env bash" "${bash}/bin/bash" + bin/bats test + ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/bats-core/bats-core"; description = "Bash Automated Testing System"; - maintainers = [ maintainers.lnl7 ]; + maintainers = with maintainers; [ abathur ]; license = licenses.mit; platforms = platforms.unix; }; -- cgit v1.2.3 From a14aa84dd78a152a0bdd3579b954cccd0e8dd9c4 Mon Sep 17 00:00:00 2001 From: "Travis A. Everett" Date: Sat, 16 Jan 2021 19:26:46 -0600 Subject: resholve: update README --- pkgs/development/misc/resholve/README.md | 192 +++++++++++++++++-------------- 1 file changed, 106 insertions(+), 86 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/misc/resholve/README.md b/pkgs/development/misc/resholve/README.md index ddba7fc14934..6b99aebb5979 100644 --- a/pkgs/development/misc/resholve/README.md +++ b/pkgs/development/misc/resholve/README.md @@ -6,9 +6,28 @@ until then I'll outline how to use the `resholvePackage` function. > Fair warning: resholve does *not* aspire to resolving all valid Shell > scripts. It depends on the OSH/Oil parser, which aims to support most (but -> not all) Bash, and aims to be a ~90% sort of solution. +> not all) Bash. resholve aims to be a ~90% sort of solution. -Let's start with a simple example from one of my own projects: +## API Concepts + +The main difference between `resholvePackage` and other builder functions +is the `solutions` attrset, which describes which scripts to resolve and how. +Each "solution" (k=v pair) in this attrset describes one resholve invocation. + +> NOTE: For most shell packages, one invocation will probably be enough: +> - Packages with a single script will only need one solution. +> - Packages with multiple scripts can still use one solution if the scripts +> don't require conflicting directives. +> - Packages with scripts that require conflicting directives can use multiple +> solutions to resolve the scripts separately, but produce a single package. + +## Basic Example + +Here's a simple example from one of my own projects, with annotations: + ```nix { stdenv, lib, resholvePackage, fetchFromGitHub, bashup-events44, bashInteractive_5, doCheck ? true, shellcheck }: @@ -22,10 +41,20 @@ resholvePackage rec { }; solutions = { + # Give each solution a short name. This is what you'd use to + # override its settings, and it shows in (some) error messages. profile = { - # the only *required* arguments + # the only *required* arguments are the 3 below + + # Specify 1 or more $out-relative script paths. Unlike many + # builders, resholvePackage modifies the output files during + # fixup (to correctly resolve in-package sourcing). scripts = [ "bin/shellswain.bash" ]; + + # "none" for no shebang, "${bash}/bin/bash" for bash, etc. interpreter = "none"; + + # packages resholve should resolve executables from inputs = [ bashup-events44 ]; }; }; @@ -39,100 +68,91 @@ resholvePackage rec { } ``` -I'll focus on the `solutions` attribute, since this is the only part -that differs from other derivations. - -Each "solution" (k=v pair) -describes one resholve invocation. For most shell packages, one -invocation will probably be enough. resholve will make you be very -explicit about your script's dependencies, and it may also need your -help sorting out some references or problems that it can't safely -handle on its own. - -If you have more than one script, and your scripts need conflicting -directives, you can specify more than one solution to resolve the -scripts separately, but still produce a single package. - -Let's take a closer look: - -```nix - solutions = { - # each solution has a short name; this is what you'd use to - # override the settings of this solution, and it may also show up - # in (some) error messages. - profile = { - # specify one or more $out-relative script paths (unlike many - # builders, resholve will modify the output files during fixup - # to correctly resolve scripts that source within the package) - scripts = [ "bin/shellswain.bash" ]; - # "none" for no shebang, "${bash}/bin/bash" for bash, etc. - interpreter = "none"; - # packages resholve should resolve executables from - inputs = [ bashup-events44 ]; - }; - }; -``` - -resholve has a (growing) number of options for handling more complex -scripts. I won't cover these in excruciating detail here. You can find -more information about these in `man resholve` via `nixpkgs.resholve`. - -Instead, we'll look at the general form of the solutions attrset: - -```nix -solutions = { - shortname = { - # required - # $out-relative paths to try resolving - scripts = [ "bin/shunit2" ]; - # packages to resolve executables from - inputs = [ coreutils gnused gnugrep findutils ]; - # path for shebang, or 'none' to omit shebang - interpreter = "${bash}/bin/bash"; - - # optional - fake = { fake directives }; - fix = { fix directives }; - keep = { keep directives }; - # file to inject before first code-line of script - prologue = file; - # file to inject after last code-line of script - epilogue = file; - # extra command-line flags passed to resholve; generally this API - # should align with what resholve supports, but flags may help if - # you need to override the version of resholve. - flags = [ ]; - }; -}; -``` - -The main way you'll adjust how resholve handles your scripts are the -fake, fix, and keep directives. The manpage covers their purpose and -how to format them on the command-line, so I'll focus on how you'll -need to translate them into Nix types. +## Options + +`resholvePackage` maps Nix types/idioms into the flags and environment variables +that the `resholve` CLI expects. Here's an overview: + +| Option | Type | Containing | +| ------------- | ------- | ----------------------------------------------------- | +| scripts | list | $out-relative string paths to resolve | +| inputs | list | packages to resolve executables from | +| interpreter | string | 'none' or abspath for shebang | +| prologue | file | text to insert before the first code-line | +| epilogue | file | text to isnert after the last code-line | +| flags | list | strings to pass as flags | +| fake | attrset | [directives](#controlling-resolution-with-directives) | +| fix | attrset | [directives](#controlling-resolution-with-directives) | +| keep | attrset | [directives](#controlling-resolution-with-directives) | + +## Controlling resolution with directives + +In order to resolve a script, resholve will make you disambiguate how it should +handle any potential problems it encounters with directives. There are currently +3 types: +1. `fake` directives tell resholve to pretend it knows about an identifier + such as a function, builtin, external command, etc. if there's a good reason + it doesn't already know about it. Common examples: + - builtins for a non-bash shell + - loadable builtins + - platform-specific external commands in cross-platform conditionals +2. `fix` directives give resholve permission to fix something that it can't + safely fix automatically. Common examples: + - resolving commands in aliases (this is appropriate for standalone scripts + that use aliases non-interactively--but it would prevent profile/rc + scripts from using the latest current-system symlinks.) + - resolve commands in a variable definition + - resolve an absolute command path from inputs as if it were a bare reference +3. `keep` directives tell resholve not to raise an error (i.e., ignore) + something it would usually object to. Common examples: + - variables used as/within the first word of a command + - pre-existing absolute or user-relative (~) command paths + - dynamic (variable) arguments to commands known to accept/run other commands + +> NOTE: resholve has a (growing) number of directives detailed in `man resholve` +> via `nixpkgs.resholve`. + +Each of these 3 types is represented by its own attrset, where you can think +of the key as a scope. The value should be: +- `true` for any directives that the resholve CLI accepts as a single word +- a list of strings for all other options + + +This will hopefully make more sense when you see it. Here are CLI examples +from the manpage, and the Nix equivalents: ```nix # --fake 'f:setUp;tearDown builtin:setopt source:/etc/bashrc' fake = { - function = [ "setUp" "tearDown" ]; - builtin = [ "setopt" ]; - source = [ "/etc/bashrc" ]; + # fake accepts the initial of valid identifier types as a CLI convienience. + # Use full names in the Nix API. + function = [ "setUp" "tearDown" ]; + builtin = [ "setopt" ]; + source = [ "/etc/bashrc" ]; }; # --fix 'aliases xargs:ls $GIT:gix' fix = { - # all single-word directives use `true` as value - aliases = true; - xargs = [ "ls" ]; - "$GIT" = [ "gix" ]; + # all single-word directives use `true` as value + aliases = true; + xargs = [ "ls" ]; + "$GIT" = [ "gix" ]; }; # --keep 'which:git;ls .:$HOME $LS:exa /etc/bashrc ~/.bashrc' keep = { - which = [ "git" "ls" ]; - "." = [ "$HOME" ]; - "$LS" = [ "exa" ]; - "/etc/bashrc" = true; - "~/.bashrc" = true; + which = [ "git" "ls" ]; + "." = [ "$HOME" ]; + "$LS" = [ "exa" ]; + "/etc/bashrc" = true; + "~/.bashrc" = true; }; ``` -- cgit v1.2.3 From e0b02ce141b37f78609cc88079a20e4f92cda003 Mon Sep 17 00:00:00 2001 From: Christoph Neidahl Date: Mon, 18 Jan 2021 14:35:24 +0100 Subject: acme: 120 -> unstable-2020-12-27 --- pkgs/development/compilers/acme/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/compilers/acme/default.nix b/pkgs/development/compilers/acme/default.nix index 89c5620f5fce..f2f2c9cf8aa6 100644 --- a/pkgs/development/compilers/acme/default.nix +++ b/pkgs/development/compilers/acme/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "acme"; - version = "120"; + version = "unstable-2020-12-27"; src = fetchsvn { url = "svn://svn.code.sf.net/p/acme-crossass/code-0/trunk"; - rev = version; - sha256 = "0w17b8f8bis22m6l5bg8qg8nniy20f8yg2xmzjipblmc39vpv6s2"; + rev = "314"; + sha256 = "08zg26rh19nlif7id91nv0syx5n243ssxhfw0nk2r2bhjm5jrjz1"; }; sourceRoot = "code-0-r${src.rev}/src"; -- cgit v1.2.3 From 2bb75a03c28d33126572585e5a07c3e4e3a1b65d Mon Sep 17 00:00:00 2001 From: Benjamin Esham Date: Mon, 18 Jan 2021 11:46:58 -0500 Subject: swiftformat: 0.44.9 -> 0.47.10 --- pkgs/development/tools/swiftformat/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/tools/swiftformat/default.nix b/pkgs/development/tools/swiftformat/default.nix index cb3ed5217f08..823496693f25 100644 --- a/pkgs/development/tools/swiftformat/default.nix +++ b/pkgs/development/tools/swiftformat/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "swiftformat"; - version = "0.44.9"; + version = "0.47.10"; src = fetchFromGitHub { owner = "nicklockwood"; repo = "SwiftFormat"; rev = version; - sha256 = "0zajvbaf3r02k53lv5zdxf13apc6chnjmj69zkyac48lpnpbcxq6"; + sha256 = "1gqxpymbhpmap0i2blg9akarlql4mkzv45l4i212gsxcs991b939"; }; preConfigure = "LD=$CC"; -- cgit v1.2.3 From 28f68fd831ed06c13c85f5519f05bd164b5cc696 Mon Sep 17 00:00:00 2001 From: "Travis A. Everett" Date: Wed, 16 Dec 2020 00:08:43 -0600 Subject: bashup-events: init at it's-complicated --- pkgs/development/libraries/bashup-events/3.2.nix | 26 +++++++ pkgs/development/libraries/bashup-events/4.4.nix | 20 ++++++ .../libraries/bashup-events/default.nix | 6 ++ .../libraries/bashup-events/generic.nix | 83 ++++++++++++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 pkgs/development/libraries/bashup-events/3.2.nix create mode 100644 pkgs/development/libraries/bashup-events/4.4.nix create mode 100644 pkgs/development/libraries/bashup-events/default.nix create mode 100644 pkgs/development/libraries/bashup-events/generic.nix (limited to 'pkgs/development') diff --git a/pkgs/development/libraries/bashup-events/3.2.nix b/pkgs/development/libraries/bashup-events/3.2.nix new file mode 100644 index 000000000000..f7e88c382511 --- /dev/null +++ b/pkgs/development/libraries/bashup-events/3.2.nix @@ -0,0 +1,26 @@ +{ callPackage, fetchFromGitHub }: + +callPackage ./generic.nix { + variant = "3.2"; + version = "2019-07-27"; + branch = "master"; + src = fetchFromGitHub { + owner = "bashup"; + repo = "events"; + rev = "83744c21bf720afb8325343674c62ab46a8f3d94"; + hash = "sha256-0VDjd+1T1JBmSDGovWOOecUZmNztlwG32UcstfdigbI="; + }; + fake = { + # Note: __ev.encode is actually defined, but it happens in a + # quoted arg to eval, which resholve currently doesn't (and may + # never) parse into. See abathur/resholve/issues/2. + function = [ "__ev.encode" ]; + }; + keep = { + # allow vars in eval + eval = [ "e" "f" "q" "r" ]; + # allow vars executed as commands + "$f" = true; + "$n" = true; + }; +} diff --git a/pkgs/development/libraries/bashup-events/4.4.nix b/pkgs/development/libraries/bashup-events/4.4.nix new file mode 100644 index 000000000000..f880009ea71a --- /dev/null +++ b/pkgs/development/libraries/bashup-events/4.4.nix @@ -0,0 +1,20 @@ +{ callPackage, fetchFromGitHub }: + +callPackage ./generic.nix { + variant = "4.4"; + version = "2020-04-04"; + branch = "bash44"; + src = fetchFromGitHub { + owner = "bashup"; + repo = "events"; + rev = "e97654f5602fc4e31083b27afa18dcc89b3e8296"; + hash = "sha256-51OSIod3mEg3MKs4rrMgRcOimDGC+3UIr4Bl/cTRyGM="; + }; + keep = { + # allow vars in eval + eval = [ "e" "bashup_ev" "n" ]; + # allow vars executed as commands + "$f" = true; + "$n" = true; + }; +} diff --git a/pkgs/development/libraries/bashup-events/default.nix b/pkgs/development/libraries/bashup-events/default.nix new file mode 100644 index 000000000000..bcefdd0fcacf --- /dev/null +++ b/pkgs/development/libraries/bashup-events/default.nix @@ -0,0 +1,6 @@ +{ callPackage }: + +{ + bashup-events32 = callPackage ./3.2.nix { }; + bashup-events44 = callPackage ./4.4.nix { }; +} diff --git a/pkgs/development/libraries/bashup-events/generic.nix b/pkgs/development/libraries/bashup-events/generic.nix new file mode 100644 index 000000000000..78ef4c2f3369 --- /dev/null +++ b/pkgs/development/libraries/bashup-events/generic.nix @@ -0,0 +1,83 @@ +{ + # general + lib +, callPackage +, runCommand +, resholvePackage +, bash +, shellcheck +, doCheck ? true +, doInstallCheck ? true + # variant-specific +, variant +, version +, branch +, src +, fake ? false +, keep +}: +let + # extracting this so that it's trivial to test in other shells + installCheck = shell: + '' + echo "testing bashup.events in ${shell}" + ${shell} <<'EOF' + source $out/bin/bashup.events + neat(){ + echo $0: Hi from event \'test event\'. I can have both $1 and $2 arguments. + exit 0 + } + event on "test event" @2 neat curried + echo event registered + event emit "test event" runtime + exit 1 # fail if emitting event didn't exit clean + EOF + ''; + +in +resholvePackage rec { + # bashup.events doesn't version yet but it has two variants with + # differing features/performance characteristics: + # - branch master: a variant for bash 3.2+ + # - branch bash44: a variant for bash 4.4+ + pname = "bashup-events${variant}-unstable"; + # should be YYYY-MM-DD + inherit version; + inherit src; + + installPhase = '' + install -Dt $out/bin bashup.events + ''; + + inherit doCheck; + checkInputs = [ shellcheck bash ]; + + # check based on https://github.com/bashup/events/blob/master/.dkrc + checkPhase = '' + SHELLCHECK_OPTS='-e SC2016,SC2145' ${shellcheck}/bin/shellcheck ./bashup.events + ${bash}/bin/bash -n ./bashup.events + ${bash}/bin/bash ./bashup.events + ''; + + solutions = { + events = { + inputs = [ ]; + interpreter = "none"; + scripts = [ "bin/bashup.events" ]; + inherit keep; + } // lib.optionalAttrs (lib.isAttrs fake) { inherit fake; }; + }; + + inherit doInstallCheck; + installCheckInputs = [ bash ]; + installCheckPhase = installCheck "${bash}/bin/bash"; + + meta = with lib; { + inherit branch; + description = "An event listener/callback API for creating extensible bash programs"; + homepage = "https://github.com/bashup/events"; + license = licenses.cc0; + maintainers = with maintainers; [ abathur ]; + platforms = platforms.all; + }; +} -- cgit v1.2.3 From feff6a69266aac9d75c5da52f835275cc11c5462 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 18 Jan 2021 18:51:55 +0000 Subject: fly: 6.7.2 -> 6.7.3 --- pkgs/development/tools/continuous-integration/fly/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/tools/continuous-integration/fly/default.nix b/pkgs/development/tools/continuous-integration/fly/default.nix index f993faf544d7..855fd879a8e2 100644 --- a/pkgs/development/tools/continuous-integration/fly/default.nix +++ b/pkgs/development/tools/continuous-integration/fly/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "fly"; - version = "6.7.2"; + version = "6.7.3"; src = fetchFromGitHub { owner = "concourse"; repo = "concourse"; rev = "v${version}"; - sha256 = "0c5alf2a0088i25mglla9dl4m3wr5y8pnl5cczgn06sz8qp9a0s0"; + sha256 = "sha256-XaoM/1YuHBl8ndPz3EByW1X0CzTuvJ5ju11mStbJnEU="; }; - vendorSha256 = "1fxbxkg7disndlmb065abnfn7sn79qclkcbizmrq49f064w1ijr4"; + vendorSha256 = "sha256-xeptlcJLj+R1BdC8Rdi3hsJVxdrmvfeTMsrhMNGrXi8="; doCheck = false; -- cgit v1.2.3 From 2beb9146fed035e1ab4e425d0a52f65ce10c7ed0 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 18 Jan 2021 19:01:50 +0000 Subject: flyctl: 0.0.154 -> 0.0.161 --- pkgs/development/web/flyctl/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/web/flyctl/default.nix b/pkgs/development/web/flyctl/default.nix index 63d60547bec0..96893870fa9c 100644 --- a/pkgs/development/web/flyctl/default.nix +++ b/pkgs/development/web/flyctl/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "flyctl"; - version = "0.0.154"; + version = "0.0.161"; src = fetchFromGitHub { owner = "superfly"; repo = "flyctl"; rev = "v${version}"; - sha256 = "0hf33jm0ph4a79jg9irz0ynvdyah942cm5hb6j04hmg24x1037jm"; + sha256 = "sha256-mM+jo1zKfA8u0IxtruQp4va0f7PldJQJV1/ypF1K0fI="; }; preBuild = '' @@ -17,7 +17,7 @@ buildGoModule rec { subPackages = [ "." ]; - vendorSha256 = "0fmbwk0j2aayvi3cx8cfp4b3h89v88qm4kslbmhlj8mny9rd7lys"; + vendorSha256 = "sha256-8rzXltsAXF9qIX1BrBwwi+145nQcXjrEBdIXgSgVYRw="; doCheck = false; -- cgit v1.2.3 From 21160da284c235adb6c5d3c0f76aa0e2de6b292b Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Mon, 18 Jan 2021 12:21:24 -0700 Subject: python3Packages.py3status: add file as runtime dependancy (#106926) This helps to resolve issues: - https://github.com/ultrabug/py3status/issues/1945 - https://github.com/ultrabug/py3status/issues/1961 --- pkgs/development/python-modules/py3status/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/python-modules/py3status/default.nix b/pkgs/development/python-modules/py3status/default.nix index a2aeaceef6dd..71314a08eebc 100644 --- a/pkgs/development/python-modules/py3status/default.nix +++ b/pkgs/development/python-modules/py3status/default.nix @@ -33,9 +33,8 @@ buildPythonPackage rec { doCheck = false; propagatedBuildInputs = [ - pytz requests tzlocal i3ipc pydbus pygobject3 pyserial setuptools dbus-python + pytz requests tzlocal i3ipc pydbus pygobject3 pyserial setuptools dbus-python file ]; - buildInputs = [ file ]; prePatch = '' sed -i -e "s|'file|'${file}/bin/file|" py3status/parse_config.py sed -i -e "s|\[\"acpi\"|\[\"${acpi}/bin/acpi\"|" py3status/modules/battery_level.py -- cgit v1.2.3 From 34d0facd77eadbbfc36bae731b1ca815d8b7d6a7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 18 Jan 2021 20:23:48 +0100 Subject: python3Packages.waqiasync: init at 1.0.0 --- .../python-modules/waqiasync/default.nix | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/waqiasync/default.nix (limited to 'pkgs/development') diff --git a/pkgs/development/python-modules/waqiasync/default.nix b/pkgs/development/python-modules/waqiasync/default.nix new file mode 100644 index 000000000000..3b8dfce61146 --- /dev/null +++ b/pkgs/development/python-modules/waqiasync/default.nix @@ -0,0 +1,32 @@ +{ lib +, aiohttp +, async-timeout +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "waqiasync"; + version = "1.0.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1yxls7ywfg954c3vxgnp98qa1b8dsq9b2fld11fb9sx1k4mjc29d"; + }; + + propagatedBuildInputs = [ + aiohttp + async-timeout + ]; + + # Project has no tests + doCheck = false; + pythonImportsCheck = [ "waqiasync" ]; + + meta = with lib; { + description = "Python library for http://aqicn.org"; + homepage = "https://github.com/andrey-git/waqi-async"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} -- cgit v1.2.3 From 0bc72a58b29c4ee766edc6eebda3b4f8600e7cc5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 18 Jan 2021 20:43:31 +0100 Subject: python3Packages.aresponses: 2.1.0 -> 2.1.2 --- pkgs/development/python-modules/aresponses/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/python-modules/aresponses/default.nix b/pkgs/development/python-modules/aresponses/default.nix index 2407adefd5ce..53353a137886 100644 --- a/pkgs/development/python-modules/aresponses/default.nix +++ b/pkgs/development/python-modules/aresponses/default.nix @@ -5,12 +5,13 @@ , isPy3k , pytest , pytest-asyncio +, pytest-cov , pytestCheckHook }: buildPythonPackage rec { pname = "aresponses"; - version = "2.1.0"; + version = "2.1.2"; disabled = !isPy3k; @@ -18,7 +19,7 @@ buildPythonPackage rec { owner = "CircleUp"; repo = pname; rev = version; - sha256 = "0dc1y4s6kpmr0ar63kkyghvisgbmb8qq5wglmjclrpzd5180mjcl"; + sha256 = "007wrk4wdy97a81imgzxd6sm5dly9v7abmxh9fyfi0vp1p7s75bw"; }; propagatedBuildInputs = [ @@ -32,8 +33,9 @@ buildPythonPackage rec { checkInputs = [ aiohttp - pytestCheckHook pytest-asyncio + pytest-cov + pytestCheckHook ]; # Disable tests which requires network access @@ -42,6 +44,8 @@ buildPythonPackage rec { "test_passthrough" ]; + __darwinAllowLocalNetworking = true; + pythonImportsCheck = [ "aresponses" ]; meta = with lib; { -- cgit v1.2.3 From dea94c23963711157f0209a7fa566a0cf02c711a Mon Sep 17 00:00:00 2001 From: nickfraser Date: Mon, 18 Jan 2021 20:28:31 +0000 Subject: poly2tri-c: updated github repo source location to another mirror (#109812) --- pkgs/development/libraries/poly2tri-c/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/development') diff --git a/pkgs/development/libraries/poly2tri-c/default.nix b/pkgs/development/libraries/poly2tri-c/default.nix index a3e42b3ae4b2..5799410fe1d6 100644 --- a/pkgs/development/libraries/poly2tri-c/default.nix +++ b/pkgs/development/libraries/poly2tri-c/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { outputs = [ "bin" "out" "dev" ]; src = fetchFromGitHub { - owner = "Paul-Browne"; + owner = "Mattey40"; repo = "poly2tri-c"; rev = "p2tc-${version}"; sha256 = "158vm3wqfxs22b74kqc4prlvjny38qqm3kz5wrgasmx0qciwh0g8"; -- cgit v1.2.3 From b6eab73c2e9161212a25b5d1fa4291465338e9b9 Mon Sep 17 00:00:00 2001 From: Denys Pavlov Date: Mon, 18 Jan 2021 16:14:58 -0500 Subject: python37Packages.sqlite-utils: 3.2 -> 3.3 Re-enable tests that were fixed in sqlite-utils v3.1.1. --- pkgs/development/python-modules/sqlite-utils/default.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/python-modules/sqlite-utils/default.nix b/pkgs/development/python-modules/sqlite-utils/default.nix index 99a6369de559..2bb700f67557 100644 --- a/pkgs/development/python-modules/sqlite-utils/default.nix +++ b/pkgs/development/python-modules/sqlite-utils/default.nix @@ -15,12 +15,12 @@ buildPythonPackage rec { pname = "sqlite-utils"; - version = "3.2"; + version = "3.3"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "83d60e0f0de5e4a367e2ad414dc008c0602e2af35325b09e41c7b2c69808dcc1"; + sha256 = "1linla3za1gb3w0n0k6h3q8in62qhipizff259p14gzmyr95rjjv"; }; propagatedBuildInputs = [ @@ -37,11 +37,6 @@ buildPythonPackage rec { hypothesis ]; - # disabled until upstream updates tests - disabledTests = lib.optionals (lib.versionAtLeast sqlite.version "3.34.0") [ - "test_optimize" - ]; - meta = with lib; { description = "Python CLI utility and library for manipulating SQLite databases"; homepage = "https://github.com/simonw/sqlite-utils"; -- cgit v1.2.3 From 8a733ce415a09de1c5894480f9ca22afe97eac90 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 18 Jan 2021 21:29:40 +0000 Subject: git-quick-stats: 2.1.4 -> 2.1.5 --- pkgs/development/tools/git-quick-stats/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/tools/git-quick-stats/default.nix b/pkgs/development/tools/git-quick-stats/default.nix index 500c9a55c1d8..2b775de4e43d 100644 --- a/pkgs/development/tools/git-quick-stats/default.nix +++ b/pkgs/development/tools/git-quick-stats/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "git-quick-stats"; - version = "2.1.4"; + version = "2.1.5"; src = fetchFromGitHub { repo = "git-quick-stats"; owner = "arzzen"; rev = version; - sha256 = "0fg0fijghcz7hvbc9y8dfksz0qmsz700kc2mfb03y90kja99v68y"; + sha256 = "sha256-d5B+SSUXtOD4x+dChQsUCkiHuHcW3lOrL4QhQekY7cA="; }; nativeBuildInputs = [ makeWrapper ]; -- cgit v1.2.3