depot/third_party/nixpkgs/pkgs/development/interpreters/janet/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

38 lines
812 B
Nix

{ lib, stdenv, fetchFromGitHub, meson, ninja }:
stdenv.mkDerivation rec {
pname = "janet";
version = "1.28.0";
src = fetchFromGitHub {
owner = "janet-lang";
repo = pname;
rev = "v${version}";
sha256 = "sha256-QfW17BDP+xa+Qy9FuIioe8UY6BBGsvbSyyz6GFODg5g=";
};
postPatch = ''
substituteInPlace janet.1 \
--replace /usr/local/ $out/
'';
nativeBuildInputs = [ meson ninja ];
mesonFlags = [ "-Dgit_hash=release" ];
doCheck = true;
doInstallCheck = true;
installCheckPhase = ''
$out/bin/janet -e '(+ 1 2 3)'
'';
meta = with lib; {
description = "Janet programming language";
homepage = "https://janet-lang.org/";
license = licenses.mit;
maintainers = with maintainers; [ andrewchambers peterhoeg ];
platforms = platforms.all;
};
}