2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, meson, ninja }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "janet";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "1.21.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "janet-lang";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-wJwlGliXoj0XmC9qb6SCo8mUy4aqHvJtFiigUB7PFLE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
# This release fails the test suite on darwin, remove when debugged.
|
|
|
|
# See https://github.com/NixOS/nixpkgs/pull/150618 for discussion.
|
|
|
|
patches = lib.optionals stdenv.isDarwin ./darwin-remove-net-test.patch;
|
2021-07-14 22:03:04 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
postPatch = ''
|
2021-07-14 22:03:04 +00:00
|
|
|
substituteInPlace janet.1 \
|
2022-02-20 05:27:41 +00:00
|
|
|
--replace /usr/local/ $out/
|
2021-07-14 22:03:04 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ meson ninja ];
|
2021-07-14 22:03:04 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mesonFlags = [ "-Dgit_hash=release" ];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Janet programming language";
|
|
|
|
homepage = "https://janet-lang.org/";
|
|
|
|
license = licenses.mit;
|
2021-07-14 22:03:04 +00:00
|
|
|
maintainers = with maintainers; [ andrewchambers peterhoeg ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
2022-02-20 05:27:41 +00:00
|
|
|
# Marked as broken when patch is applied, see comment above patch.
|
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|