Merge pull request #131338 from siraben/s9fes-init

This commit is contained in:
Ben Siraphob 2021-07-24 23:50:55 +07:00 committed by GitHub
commit ca4051be6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,34 @@
{ stdenv, lib, fetchurl, ncurses, buildPackages }:
let
isCrossCompiling = stdenv.hostPlatform != stdenv.buildPlatform;
in
stdenv.mkDerivation rec {
pname = "s9fes";
version = "20181205";
src = fetchurl {
url = "http://www.t3x.org/s9fes/s9fes-${version}.tgz";
sha256 = "sha256-Lp/akaDy3q4FmIE6x0fj9ae/SOD7tdsmzy2xdcCh13o=";
};
# Fix cross-compilation
postPatch = ''
substituteInPlace Makefile --replace 'ar q' '${stdenv.cc.targetPrefix}ar q'
substituteInPlace Makefile --replace 'strip' '${stdenv.cc.targetPrefix}strip'
${lib.optionalString isCrossCompiling "substituteInPlace Makefile --replace ./s9 '${buildPackages.s9fes}/bin/s9'"}
'';
buildInputs = [ ncurses ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "PREFIX=$(out)" ];
enableParallelBuilding = true;
meta = with lib; {
description = "Scheme 9 From Empty Space, an interpreter for R4RS Scheme";
homepage = "http://www.t3x.org/s9fes/index.html";
license = licenses.publicDomain;
maintainers = with maintainers; [ siraben ];
platforms = platforms.unix;
};
}

View file

@ -4429,6 +4429,8 @@ in
rar2fs = callPackage ../tools/filesystems/rar2fs { };
s9fes = callPackage ../development/interpreters/s9fes { };
s-tar = callPackage ../tools/archivers/s-tar {};
sonota = callPackage ../tools/misc/sonota { };