Files
nixpkgs/pkgs/by-name/al/alan/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

61 lines
1.4 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
cgreen,
openjdk,
pkg-config,
which,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "alan";
version = "3.0beta8";
src = fetchFromGitHub {
owner = "alan-if";
repo = "alan";
tag = "v${finalAttrs.version}";
sha256 = "sha256-9F99rr7tdkaGPHtD92ecmUxO6xrjQDRhGtSTVbMLz30=";
};
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 = ''
runHook preInstall
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
runHook postInstall
'';
nativeBuildInputs = [
cgreen
openjdk
pkg-config
which
];
meta = {
homepage = "https://www.alanif.se/";
description = "Alan interactive fiction language";
license = lib.licenses.artistic2;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ neilmayhew ];
};
})