Unverified Commit a0206d56 authored by Winter's avatar Winter Committed by GitHub
Browse files

jai: init at 0.2.010 (#403469)

parents a7eef26e 5c28ddb1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -21641,6 +21641,12 @@
    github = "samemrecebi";
    githubId = 64419750;
  };
  samestep = {
    name = "Sam Estep";
    email = "sam@samestep.com";
    github = "samestep";
    githubId = 8246041;
  };
  samfundev = {
    name = "samfundev";
    github = "samfundev";
+50 −0
Original line number Diff line number Diff line
{
  buildFHSEnv,
  lib,
  requireFile,
  runCommand,
  stdenv,
  unzip,
}:
let
  pname = "jai";
  minor = "2";
  patch = "010";
  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-7S0DFvmiKEvmCT12ukwLu+SSitk4y6BuS6WWCImeOhc=";
    };
    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.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
  ''