Merge pull request #164982 from neilmayhew/alan-if
alan: init at 3.0beta8
This commit is contained in:
commit
1f9ec1477d
5 changed files with 95 additions and 0 deletions
|
@ -8850,6 +8850,12 @@
|
|||
githubId = 3747396;
|
||||
name = "Nathan Isom";
|
||||
};
|
||||
neilmayhew = {
|
||||
email = "nix@neil.mayhew.name";
|
||||
github = "neilmayhew";
|
||||
githubId = 166791;
|
||||
name = "Neil Mayhew";
|
||||
};
|
||||
nelsonjeppesen = {
|
||||
email = "nix@jeppesen.io";
|
||||
github = "NelsonJeppesen";
|
||||
|
|
31
pkgs/development/compilers/alan/2.nix
Normal file
31
pkgs/development/compilers/alan/2.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ stdenv, lib, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "alan2";
|
||||
version = "2.8.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alan-if";
|
||||
repo = "alan";
|
||||
rev = "71f23ec79f7f5d66aa5ae9fd3f9b8dae41a89f15";
|
||||
sha256 = "066jknqz1v6sismvfxjfffl35h14v8qwgcq99ibhp08dy2fwraln";
|
||||
};
|
||||
|
||||
makefile = "Makefile.unix";
|
||||
|
||||
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 = "The Alan interactive fiction language (legacy version)";
|
||||
license = licenses.artistic2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ neilmayhew ];
|
||||
};
|
||||
}
|
48
pkgs/development/compilers/alan/default.nix
Normal file
48
pkgs/development/compilers/alan/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ stdenv, lib, fetchFromGitHub
|
||||
, cgreen, openjdk, pkg-config, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "alan";
|
||||
version = "3.0beta8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alan-if";
|
||||
repo = "alan";
|
||||
rev = "v${version}";
|
||||
sha256 = "0zfg1frmb4yl39hk8h733bmlwk4rkikzfhvv7j34cxpdpsp7spzl";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs --build bin
|
||||
# The Makefiles have complex CFLAGS that don't allow separate control of optimization
|
||||
sed -i 's/-O0/-O2/g' compiler/Makefile.common
|
||||
sed -i 's/-Og/-O2/g' interpreter/Makefile.common
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/alan/examples
|
||||
# Build the release tarball
|
||||
make package
|
||||
# The release tarball isn't split up into subdirectories
|
||||
tar -xf alan*.tgz --strip-components=1 -C $out/share/alan
|
||||
mv $out/share/alan/*.alan $out/share/alan/examples
|
||||
chmod a-x $out/share/alan/examples/*.alan
|
||||
mv $out/share/alan/{alan,arun} $out/bin
|
||||
# a2a3 isn't included in the release tarball
|
||||
cp bin/a2a3 $out/bin
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cgreen
|
||||
openjdk pkg-config which
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.alanif.se/";
|
||||
description = "The Alan interactive fiction language";
|
||||
license = licenses.artistic2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ neilmayhew ];
|
||||
};
|
||||
}
|
|
@ -11,6 +11,12 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "sha256-aQrfsiPuNrEMscZrOoONiN665KlNmnOiYj9ZIyzW304=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
for F in tools/discoverer_acceptance_tests.c tools/discoverer.c; do
|
||||
substituteInPlace "$F" --replace "/usr/bin/nm" "nm"
|
||||
done
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -12126,6 +12126,10 @@ with pkgs;
|
|||
jdk = jdk8;
|
||||
};
|
||||
|
||||
alan = callPackage ../development/compilers/alan { };
|
||||
|
||||
alan_2 = callPackage ../development/compilers/alan/2.nix { };
|
||||
|
||||
algol68g = callPackage ../development/compilers/algol68g { };
|
||||
|
||||
armips = callPackage ../development/compilers/armips {
|
||||
|
|
Loading…
Reference in a new issue