1 { lib, stdenv, fetchFromGitHub, janet }:
5 aarch64-darwin = "macos_config.janet";
6 aarch64-linux = "linux_config.janet";
7 x86_64-darwin = "macos_config.janet";
8 x86_64-linux = "linux_config.janet";
11 platformFile = platformFiles.${stdenv.hostPlatform.system};
14 stdenv.mkDerivation rec {
18 src = fetchFromGitHub {
22 sha256 = "sha256-lPB4jew6RkJlDp8xOQ4YA9MkgLBImaBHcvv4WF/sLRc=";
25 # `auto-shebangs true` gives us a shebang line that points to janet inside the
28 substituteInPlace configs/${platformFile} \
29 --replace 'auto-shebang true' 'auto-shebang false' \
30 --replace /usr/local $out
35 buildInputs = [ janet ];
42 mkdir -p $out/{lib/janet,share/man/man1}
44 janet bootstrap.janet configs/${platformFile}
49 doInstallCheck = true;
51 installCheckPhase = ''
55 meta = janet.meta // {
56 description = "Janet Project Manager for the Janet programming language";
58 platforms = lib.attrNames platformFiles;