sbt: Replace VM test with installCheckPhase
This commit is contained in:
parent
2962d51b90
commit
af2e9e5046
|
@ -343,7 +343,6 @@ in
|
||||||
samba = handleTest ./samba.nix {};
|
samba = handleTest ./samba.nix {};
|
||||||
samba-wsdd = handleTest ./samba-wsdd.nix {};
|
samba-wsdd = handleTest ./samba-wsdd.nix {};
|
||||||
sanoid = handleTest ./sanoid.nix {};
|
sanoid = handleTest ./sanoid.nix {};
|
||||||
sbt = handleTest ./sbt.nix {};
|
|
||||||
sddm = handleTest ./sddm.nix {};
|
sddm = handleTest ./sddm.nix {};
|
||||||
searx = handleTest ./searx.nix {};
|
searx = handleTest ./searx.nix {};
|
||||||
service-runner = handleTest ./service-runner.nix {};
|
service-runner = handleTest ./service-runner.nix {};
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
|
||||||
name = "sbt";
|
|
||||||
meta = with pkgs.lib.maintainers; {
|
|
||||||
maintainers = [ nequissimus ];
|
|
||||||
};
|
|
||||||
|
|
||||||
machine = { pkgs, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = [ pkgs.sbt ];
|
|
||||||
};
|
|
||||||
|
|
||||||
testScript =
|
|
||||||
''
|
|
||||||
machine.succeed(
|
|
||||||
"(sbt --offline --version 2>&1 || true) | grep 'getting org.scala-sbt sbt ${pkgs.sbt.version} (this may take some time)'"
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
})
|
|
|
@ -1,5 +1,18 @@
|
||||||
{ lib, stdenv, fetchurl, jre, autoPatchelfHook, zlib, writeScript
|
{ lib
|
||||||
, common-updater-scripts, git, nixfmt, nix, coreutils, gnused, nixosTests }:
|
, stdenv
|
||||||
|
, fetchurl
|
||||||
|
, jre
|
||||||
|
, autoPatchelfHook
|
||||||
|
, zlib
|
||||||
|
, writeScript
|
||||||
|
, common-updater-scripts
|
||||||
|
, git
|
||||||
|
, nixfmt
|
||||||
|
, nix
|
||||||
|
, coreutils
|
||||||
|
, gnused
|
||||||
|
, nixosTests
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "sbt";
|
pname = "sbt";
|
||||||
|
@ -28,6 +41,11 @@ stdenv.mkDerivation rec {
|
||||||
} $out/bin/sbtn
|
} $out/bin/sbtn
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
installCheckPhase = ''
|
||||||
|
($out/bin/sbt --offline --version 2>&1 || true) | grep 'getting org.scala-sbt sbt ${version} (this may take some time)'
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.scala-sbt.org/";
|
homepage = "https://www.scala-sbt.org/";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
|
@ -36,10 +54,7 @@ stdenv.mkDerivation rec {
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru = {
|
passthru.updateScript = writeScript "update.sh" ''
|
||||||
tests = { inherit (nixosTests) sbt; };
|
|
||||||
|
|
||||||
updateScript = writeScript "update.sh" ''
|
|
||||||
#!${stdenv.shell}
|
#!${stdenv.shell}
|
||||||
set -o errexit
|
set -o errexit
|
||||||
PATH=${
|
PATH=${
|
||||||
|
@ -65,5 +80,4 @@ stdenv.mkDerivation rec {
|
||||||
echo "sbt is already up-to-date"
|
echo "sbt is already up-to-date"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue