Merge pull request #153601 from willcohen/obb

This commit is contained in:
legendofmiracles 2022-01-05 09:19:08 -06:00 committed by GitHub
commit 190f4640ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,8 @@
, clojure
, git
, jdk
, callPackage
, obb
, fetchFromGitHub
, makeWrapper
, runCommand }:
@ -14,9 +15,11 @@ stdenv.mkDerivation rec {
pname = "obb";
version = "0.0.1";
src = fetchurl {
url = "https://github.com/babashka/${pname}/archive/refs/tags/v${version}.tar.gz";
sha256 = "sha256-ZVd3VCJ7vdQGQ7iY5v2b+gRX/Ni0/03hzqBElqpPvpI=";
src = fetchFromGitHub {
owner = "babashka";
repo = pname;
rev = "v${version}";
sha256 = "sha256-WxQjBg6el6XMiHTurmSo1GgZnTdaJjRmcV3+3X4yohc=";
};
nativeBuildInputs = [ makeWrapper ];
@ -61,11 +64,12 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
[ $($out/bin/obb -e '(+ 1 2)') = '3' ]
'';
passthru.tests = {
simple = runCommand "${pname}-test" {} ''
[ $(${obb}/bin/obb -e '(+ 1 2)') = '3' ]
touch $out
'';
};
meta = with lib; {
description = "Ad-hoc ClojureScript scripting of Mac applications via Apple's Open Scripting Architecture";