Commit fbaa9906 authored by Weijia Wang's avatar Weijia Wang
Browse files

bwbasic: fix build

parent b69b2060
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
{
  lib,
  gccStdenv,
  stdenv,
  dos2unix,
  fetchurl,
  unzip,
}:

gccStdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation (finalAttrs: {
  pname = "bwbasic";
  version = "3.40";

@@ -20,16 +20,18 @@ gccStdenv.mkDerivation (finalAttrs: {
    unzip
  ];

  unpackPhase = ''
    unzip $src
  '';
  sourceRoot = ".";

  postPatch = ''
    dos2unix configure
    patchShebangs configure
    chmod +x configure
    substituteInPlace bwbasic.h \
      --replace-fail "extern int putenv (const char *buffer)" "extern int putenv (char *buffer)"
  '';

  env.NIX_CFLAGS_COMPILE = "-std=c89";

  hardeningDisable = [ "format" ];

  preInstall = ''