Unverified Commit e8800369 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

ats2: fix darwin build; move to by-name (#353745)

parents b3f23f76 6bd632f1
Loading
Loading
Loading
Loading
+21 −13
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, gmp
, withEmacsSupport ? true
, withContrib ? true }:
{
  lib,
  stdenv,
  fetchurl,
  gmp,
  withEmacsSupport ? true,
  withContrib ? true,
}:

let
  versionPkg = "0.4.2";
@@ -10,15 +15,13 @@ let
    hash = "sha256-m0hfBLsaNiLaIktcioK+ZtWUsWht3IDSJ6CzgJmS06c=";
  };

  postInstallContrib = lib.optionalString withContrib
  ''
  postInstallContrib = lib.optionalString withContrib ''
    local contribDir=$out/lib/ats2-postiats-*/ ;
    mkdir -p $contribDir ;
    tar -xzf "${contrib}" --strip-components 1 -C $contribDir ;
  '';

  postInstallEmacs = lib.optionalString withEmacsSupport
  ''
  postInstallEmacs = lib.optionalString withEmacsSupport ''
    local siteLispDir=$out/share/emacs/site-lisp/ats2 ;
    mkdir -p $siteLispDir ;
    install -m 0644 -v ./utils/emacs/*.el $siteLispDir ;
@@ -49,12 +52,13 @@ stdenv.mkDerivation rec {
    "CCOMP=${stdenv.cc.targetPrefix}cc"
  ];

  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration";

  setupHook =
    let
      hookFiles = [ ./setup-hook.sh ] ++ lib.optional withContrib ./setup-contrib-hook.sh;
    in
      builtins.toFile "setupHook.sh"
      (lib.concatMapStringsSep "\n" builtins.readFile hookFiles);
    builtins.toFile "setupHook.sh" (lib.concatMapStringsSep "\n" builtins.readFile hookFiles);

  postInstall = postInstallContrib + postInstallEmacs;

@@ -63,6 +67,10 @@ stdenv.mkDerivation rec {
    homepage = "http://www.ats-lang.org";
    license = licenses.gpl3Plus;
    platforms = platforms.unix;
    maintainers = with maintainers; [ thoughtpolice ttuegel bbarker ];
    maintainers = with maintainers; [
      thoughtpolice
      ttuegel
      bbarker
    ];
  };
}
+0 −1
Original line number Diff line number Diff line
@@ -14166,7 +14166,6 @@ with pkgs;
  aspectj = callPackage ../development/compilers/aspectj { };
  ats = callPackage ../development/compilers/ats { };
  ats2 = callPackage ../development/compilers/ats2 { };
  ats-acc = callPackage ../development/tools/ats-acc { };