Skip to content

Commit

Permalink
Add package instant-scala
Browse files Browse the repository at this point in the history
  • Loading branch information
jatcwang committed Sep 16, 2024
1 parent af8995a commit 06fb967
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9452,6 +9452,12 @@
githubId = 6789916;
name = "Jason Odoom";
};
jatcwang = {
email = "[email protected]";
github = "jatcwang";
githubId = 4957161;
name = "Jacob Wang";
};
javaes = {
email = "[email protected]";
github = "javaes";
Expand Down
37 changes: 37 additions & 0 deletions pkgs/by-name/in/instant-scala/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchFromGitHub,
scala-cli,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "instant-scala";
version = "0.1.0";

src = fetchFromGitHub {
owner = "jatcwang";
repo = "instant-scala";
rev = "/refs/tags/v${finalAttrs.version}";
sha256 = "jqSvKTL8NzqjwqDj/+55YWecx2bnzuArP8RdfH5q/1U=";
};

buildInputs = [
scala-cli
];

installPhase = ''
mkdir -p $out/bin
cp instant-scala $out/bin/instant-scala
chmod +x $out/bin/instant-scala
'';

meta = {
description = "Write Scala scripts that starts instantly using scala-cli and GraalVM";
homepage = "https://github.com/jatcwang/instant-scala";
license = lib.licenses.asl20;
maintainers = [ lib.maintainer.jatcwang ];
mainProgram = "instant-scala";
platforms = lib.platforms.unix;
};
})

0 comments on commit 06fb967

Please sign in to comment.