Unverified Commit ddb79bdd authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

hugs: Fix build failure (#443281)

parents 9946b890 4e3eb5a4
Loading
Loading
Loading
Loading
+12 −14
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  fetchFromGitHub,
  bison,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation {
  pname = "hugs98";
  version = "2006-09";

  src = fetchurl {
    url = "https://www.haskell.org/hugs/downloads/${version}/hugs98-Sep2006.tar.gz";
    sha256 = "1dj65c39zpy6qqvvrwns2hzj6ipnd4ih655xj7kgyk2nfdvd5x1w";
  src = fetchFromGitHub {
    owner = "augustss";
    repo = "hugs98-plus-Sep2006";
    rev = "1f7b60e05b12df00d715d535bb01c189bc1b9b3c";
    hash = "sha256-g6/4kmdWKGDIu5PXVfP8O6Fl3v4bstXWAVkoxZiS6qo=";
  };

  patches = [
    (fetchurl {
      url = "https://aur.archlinux.org/cgit/aur.git/plain/hsbase_inline.patch?h=hugs";
      name = "hsbase_inline.patch";
      sha256 = "1h0sp16d17hlm6gj7zdbgwrjwi2l4q02m8p0wd60dp4gn9i9js0v";
    })
  ];

  nativeBuildInputs = [ bison ];

  NIX_CFLAGS_COMPILE = [
    "-Wno-error=implicit-int"
    "-Wno-error=implicit-function-declaration"
  ];

  postUnpack = "find -type f -exec sed -i 's@/bin/cp@cp@' {} +";

  preConfigure = "unset STRIP";
@@ -45,7 +44,6 @@ stdenv.mkDerivation rec {
  ];

  meta = with lib; {
    broken = stdenv.hostPlatform.isDarwin;
    mainProgram = "hugs";
    homepage = "https://www.haskell.org/hugs";
    description = "Haskell interpreter";