6d4aeb4377
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
38 lines
812 B
Nix
38 lines
812 B
Nix
{ lib, stdenv, fetchFromGitHub, meson, ninja }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "janet";
|
|
version = "1.26.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "janet-lang";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-o5+gVRYJCkzoEejJoPwkNRawj2BO6fjdBloy2D1kHb4=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|