nixpkgs/pkgs/development/interpreters/janet/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
840 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, meson, ninja }:
2019-03-30 15:47:14 +00:00
stdenv.mkDerivation rec {
pname = "janet";
2023-09-22 21:49:23 +01:00
version = "1.31.0";
2019-03-30 15:47:14 +00:00
src = fetchFromGitHub {
owner = "janet-lang";
repo = pname;
2019-03-30 15:47:14 +00:00
rev = "v${version}";
2023-09-22 21:49:23 +01:00
hash = "sha256-Dj2fj1dsdAMl/H0vNKTf9qjPB4GVRpgWPVR+PuZWZMc=";
2019-03-30 15:47:14 +00:00
};
postPatch = ''
substituteInPlace janet.1 \
--replace /usr/local/ $out/
'';
nativeBuildInputs = [ meson ninja ];
2023-08-17 08:23:00 +01:00
mesonBuildType = "release";
2019-09-22 06:47:11 +01:00
mesonFlags = [ "-Dgit_hash=release" ];
2019-03-30 15:47:14 +00:00
doCheck = true;
2022-07-04 11:50:58 +01:00
doInstallCheck = true;
installCheckPhase = ''
2022-09-18 01:34:15 +01:00
$out/bin/janet -e '(+ 1 2 3)'
2022-07-04 11:50:58 +01:00
'';
meta = with lib; {
2019-03-30 15:47:14 +00:00
description = "Janet programming language";
2020-04-01 14:24:36 +01:00
homepage = "https://janet-lang.org/";
license = licenses.mit;
maintainers = with maintainers; [ andrewchambers peterhoeg ];
2019-03-30 15:47:14 +00:00
platforms = platforms.all;
};
}