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

39 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, meson, ninja }:
2019-03-30 15:47:14 +00:00
stdenv.mkDerivation rec {
pname = "janet";
version = "1.20.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}";
sha256 = "sha256-mCeOaTbOQej4Uza9fg+xop77z31SQ3sO09dZK8SVAyU=";
2019-03-30 15:47:14 +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;
postPatch = ''
substituteInPlace janet.1 \
--replace /usr/local/ $out/
'';
nativeBuildInputs = [ meson ninja ];
2019-09-22 05:47:11 +00:00
mesonFlags = [ "-Dgit_hash=release" ];
2019-03-30 15:47:14 +00:00
doCheck = true;
meta = with lib; {
2019-03-30 15:47:14 +00:00
description = "Janet programming language";
2020-04-01 13:24:36 +00: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;
# Marked as broken when patch is applied, see comment above patch.
broken = stdenv.isDarwin;
2019-03-30 15:47:14 +00:00
};
}