about summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/bats/default.nix30
-rw-r--r--pkgs/development/interpreters/guile/default.nix3
-rw-r--r--pkgs/development/interpreters/wasmer/default.nix6
3 files changed, 27 insertions, 12 deletions
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;
   };
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 [
diff --git a/pkgs/development/interpreters/wasmer/default.nix b/pkgs/development/interpreters/wasmer/default.nix
index 7b390c547163..60ce4d89f19c 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; {