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

40 lines
1,007 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, meson, ninja }:
2019-03-30 16:47:14 +01:00
stdenv.mkDerivation rec {
pname = "janet";
2021-06-16 08:50:30 +02:00
version = "1.16.1";
2019-03-30 16:47:14 +01:00
src = fetchFromGitHub {
owner = "janet-lang";
repo = pname;
2019-03-30 16:47:14 +01:00
rev = "v${version}";
2021-06-16 08:50:30 +02:00
sha256 = "sha256-TzJbHmHIySlf3asQ02HOdehMR+s0KkPifBiaQ4FvFCg=";
2019-03-30 16:47:14 +01:00
};
# we don't have /usr/bin/env in the sandbox, so substitute for a proper,
# absolute path to janet
postPatch = ''
substituteInPlace jpm \
--replace '/usr/bin/env janet' $out/bin/janet \
--replace /usr/local/lib/janet $out/lib \
--replace /usr/local $out
substituteInPlace janet.1 \
--replace /usr/local/lib/janet $out/lib
'';
nativeBuildInputs = [ meson ninja ];
2019-09-22 07:47:11 +02:00
mesonFlags = [ "-Dgit_hash=release" ];
2019-03-30 16:47:14 +01:00
doCheck = true;
meta = with lib; {
2019-03-30 16:47:14 +01:00
description = "Janet programming language";
2020-04-01 15:24:36 +02:00
homepage = "https://janet-lang.org/";
license = licenses.mit;
maintainers = with maintainers; [ andrewchambers peterhoeg ];
2019-03-30 16:47:14 +01:00
platforms = platforms.all;
};
}