alan_2: unbreak on gcc 14, modernize; alan: modernize (#400242)

Changed files
+60 -50
pkgs
by-name
al
alan
alan_2
development
compilers
alan
top-level
+48
pkgs/by-name/al/alan_2/package.nix
···
+
{
+
stdenv,
+
lib,
+
fetchFromGitHub,
+
}:
+
+
stdenv.mkDerivation {
+
pname = "alan2";
+
version = "2.8.7";
+
+
src = fetchFromGitHub {
+
owner = "alan-if";
+
repo = "alan";
+
rev = "71f23ec79f7f5d66aa5ae9fd3f9b8dae41a89f15";
+
hash = "sha256-lqrMnfANgQtXTAmzxzHaJMAyqHNOdrerjtrs8LGd0hg=";
+
};
+
+
makefile = "Makefile.unix";
+
+
env.NIX_CFLAGS_COMPILE = toString [
+
# Add a workaround for -fno-common toolchains like upstream gcc-10.
+
# alan-3 is already fixed, but the backport is nontrivial.
+
"-fcommon"
+
# smScSema.c:142:11: error: assignment to 'unsigned char *' from incompatible pointer type 'unsigned char **' [-Wincompatible-pointer-types]
+
"-Wno-error=incompatible-pointer-types"
+
# smScSema.c:183:10: error: implicit declaration of function 'read'; did you mean 'fread'? [-Wimplicit-function-declaration]
+
"-Wno-error=implicit-function-declaration"
+
];
+
+
installPhase = ''
+
runHook preInstall
+
+
mkdir -p $out/bin $out/share/alan2
+
cp compiler/alan $out/bin/alan2
+
cp interpreter/arun $out/bin/arun2
+
cp alan.readme ChangeLog $out/share/alan2
+
+
runHook postInstall
+
'';
+
+
meta = {
+
homepage = "https://www.alanif.se/";
+
description = "Alan interactive fiction language (legacy version)";
+
license = lib.licenses.artistic2;
+
platforms = lib.platforms.linux;
+
maintainers = with lib.maintainers; [ neilmayhew ];
+
};
+
}
-38
pkgs/development/compilers/alan/2.nix
···
-
{
-
stdenv,
-
lib,
-
fetchFromGitHub,
-
}:
-
-
stdenv.mkDerivation {
-
pname = "alan2";
-
version = "2.8.7";
-
-
src = fetchFromGitHub {
-
owner = "alan-if";
-
repo = "alan";
-
rev = "71f23ec79f7f5d66aa5ae9fd3f9b8dae41a89f15";
-
sha256 = "066jknqz1v6sismvfxjfffl35h14v8qwgcq99ibhp08dy2fwraln";
-
};
-
-
makefile = "Makefile.unix";
-
-
# Add a workarounf for -fno-common tollchains like upstream gcc-10.
-
# alan-3 is already fixed, but the backport is nontrivial.
-
env.NIX_CFLAGS_COMPILE = "-fcommon";
-
-
installPhase = ''
-
mkdir -p $out/bin $out/share/alan2
-
cp compiler/alan $out/bin/alan2
-
cp interpreter/arun $out/bin/arun2
-
cp alan.readme ChangeLog $out/share/alan2
-
'';
-
-
meta = with lib; {
-
homepage = "https://www.alanif.se/";
-
description = "Alan interactive fiction language (legacy version)";
-
license = licenses.artistic2;
-
platforms = platforms.linux;
-
maintainers = with maintainers; [ neilmayhew ];
-
};
-
}
+12 -8
pkgs/development/compilers/alan/default.nix pkgs/by-name/al/alan/package.nix
···
which,
}:
-
stdenv.mkDerivation rec {
+
stdenv.mkDerivation (finalAttrs: {
pname = "alan";
version = "3.0beta8";
src = fetchFromGitHub {
owner = "alan-if";
repo = "alan";
-
rev = "v${version}";
-
sha256 = "0zfg1frmb4yl39hk8h733bmlwk4rkikzfhvv7j34cxpdpsp7spzl";
+
rev = "v${finalAttrs.version}";
+
sha256 = "sha256-9F99rr7tdkaGPHtD92ecmUxO6xrjQDRhGtSTVbMLz30=";
};
postPatch = ''
···
'';
installPhase = ''
+
runHook preInstall
+
mkdir -p $out/bin $out/share/alan/examples
# Build the release tarball
make package
···
mv $out/share/alan/{alan,arun} $out/bin
# a2a3 isn't included in the release tarball
cp bin/a2a3 $out/bin
+
+
runHook postInstall
'';
nativeBuildInputs = [
···
which
];
-
meta = with lib; {
+
meta = {
homepage = "https://www.alanif.se/";
description = "Alan interactive fiction language";
-
license = licenses.artistic2;
-
platforms = platforms.linux;
-
maintainers = with maintainers; [ neilmayhew ];
+
license = lib.licenses.artistic2;
+
platforms = lib.platforms.linux;
+
maintainers = with lib.maintainers; [ neilmayhew ];
};
-
}
+
})
-4
pkgs/top-level/all-packages.nix
···
jdk = jdk8;
};
-
alan = callPackage ../development/compilers/alan { };
-
-
alan_2 = callPackage ../development/compilers/alan/2.nix { };
-
armips = callPackage ../development/compilers/armips {
stdenv = gcc10Stdenv;
};