Skip to content

Commit

Permalink
Merge pull request #153601 from willcohen/obb
Browse files Browse the repository at this point in the history
  • Loading branch information
legendofmiracles authored Jan 5, 2022
2 parents b8850e6 + 3dd7698 commit 190f464
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions pkgs/development/interpreters/clojure/obb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@
, clojure
, git
, jdk
, callPackage
, obb
, fetchFromGitHub
, makeWrapper
, runCommand }:

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 ];
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit 190f464

Please sign in to comment.