depot/third_party/nixpkgs/pkgs/development/interpreters/janet/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

38 lines
812 B
Nix

{ lib, stdenv, fetchFromGitHub, meson, ninja }:
stdenv.mkDerivation rec {
pname = "janet";
version = "1.25.1";
src = fetchFromGitHub {
owner = "janet-lang";
repo = pname;
rev = "v${version}";
sha256 = "sha256-TWKiSE8mqXz5i4vd32WylTsyxMXXKGmVl3U2q2sMwDQ=";
};
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;
};
}