Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
{
|
|
buildFHSEnv,
|
|
lib,
|
|
requireFile,
|
|
runCommand,
|
|
stdenv,
|
|
unzip,
|
|
}:
|
|
let
|
|
pname = "jai";
|
|
minor = "2";
|
|
patch = "017";
|
|
version = "0.${minor}.${patch}";
|
|
zipName = "jai-beta-${minor}-${patch}.zip";
|
|
jai = stdenv.mkDerivation {
|
|
name = "jai";
|
|
src = requireFile {
|
|
message = ''
|
|
The language is not yet public. If you are in the closed beta, download the zip file and run the following command:
|
|
nix-store --add-fixed sha256 ${zipName}
|
|
'';
|
|
name = zipName;
|
|
sha256 = "sha256-qVBF71qpFXfBkke9vCs7Wq/+P7ZQIgg4l1iLw8NmQhA=";
|
|
};
|
|
nativeBuildInputs = [ unzip ];
|
|
buildCommand = "unzip $src -d $out";
|
|
};
|
|
meta = {
|
|
description = "Powerful language to write efficient reliable software in simple ways";
|
|
license = lib.licenses.unfree;
|
|
mainProgram = "jai";
|
|
maintainers = with lib.maintainers; [ samestep ];
|
|
platforms = [
|
|
"x86_64-linux"
|
|
"x86_64-darwin"
|
|
"aarch64-darwin"
|
|
];
|
|
};
|
|
in
|
|
if stdenv.hostPlatform.isLinux then
|
|
buildFHSEnv {
|
|
inherit meta pname version;
|
|
targetPkgs = pkgs: [ pkgs.zlib ];
|
|
runScript = "${jai}/jai/bin/jai-linux";
|
|
}
|
|
else
|
|
runCommand "jai" { inherit meta pname version; } ''
|
|
mkdir -p $out/bin
|
|
ln -s ${jai}/jai/bin/jai-macos $out/bin/jai
|
|
''
|