mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
commit
41f37d934f
|
@ -12677,6 +12677,12 @@
|
|||
email = "tim.williams.public@gmail.com";
|
||||
name = "Tim Philip Williams";
|
||||
};
|
||||
willcohen = {
|
||||
email = "willcohen@users.noreply.github.com";
|
||||
github = "willcohen";
|
||||
githubId = 5185341;
|
||||
name = "Will Cohen";
|
||||
};
|
||||
winden = {
|
||||
email = "windenntw@gmail.com";
|
||||
name = "Antonio Vargas Gonzalez";
|
||||
|
|
79
pkgs/development/interpreters/clojure/obb.nix
Normal file
79
pkgs/development/interpreters/clojure/obb.nix
Normal file
|
@ -0,0 +1,79 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, babashka
|
||||
, cacert
|
||||
, clojure
|
||||
, git
|
||||
, jdk
|
||||
, callPackage
|
||||
, 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=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildInputs = [ babashka cacert git jdk ];
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
mkdir -p .m2
|
||||
substituteInPlace deps.edn --replace ':paths' ':mvn/local-repo "./.m2" :paths'
|
||||
substituteInPlace bb.edn --replace ':paths' ':mvn/local-repo "./.m2" :paths'
|
||||
echo deps.edn
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
export DEPS_CLJ_TOOLS_DIR=${clojure}
|
||||
export DEPS_CLJ_TOOLS_VERSION=${clojure.version}
|
||||
mkdir -p .gitlibs
|
||||
mkdir -p .cpcache
|
||||
export GITLIBS=.gitlibs
|
||||
export CLJ_CACHE=.cpcache
|
||||
|
||||
bb build
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
ln -s /usr/bin/osascript $out/bin/osascript
|
||||
|
||||
install -Dm755 "out/bin/obb" "$out/bin/obb"
|
||||
wrapProgram $out/bin/obb --prefix PATH : $out/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
[ $($out/bin/obb -e '(+ 1 2)') = '3' ]
|
||||
'';
|
||||
|
||||
|
||||
meta = with lib; {
|
||||
description = "Ad-hoc ClojureScript scripting of Mac applications via Apple's Open Scripting Architecture";
|
||||
homepage = "https://github.com/babashka/obb";
|
||||
license = licenses.epl10;
|
||||
maintainers = with maintainers; [
|
||||
willcohen
|
||||
];
|
||||
platforms = platforms.darwin;
|
||||
};
|
||||
}
|
|
@ -13578,6 +13578,8 @@ with pkgs;
|
|||
|
||||
ngn-k = callPackage ../development/interpreters/ngn-k { };
|
||||
|
||||
obb = callPackage ../development/interpreters/clojure/obb.nix { };
|
||||
|
||||
octave = callPackage ../development/interpreters/octave {
|
||||
python = python3;
|
||||
mkDerivation = stdenv.mkDerivation;
|
||||
|
|
Loading…
Reference in a new issue