summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Siraphob <bensiraphob@gmail.com>2021-07-24 20:08:44 +0700
committerBen Siraphob <bensiraphob@gmail.com>2021-07-24 20:08:44 +0700
commita29e03164324aec5bf527a1b4272b13500973bf7 (patch)
treecaea9ef1bcc90eab0cf169308971fefa5629997f
parent8cb9eabf96f1ff44d48d232accaac98ea6ff3a1e (diff)
downloadnixpkgs-a29e03164324aec5bf527a1b4272b13500973bf7.tar
nixpkgs-a29e03164324aec5bf527a1b4272b13500973bf7.tar.gz
nixpkgs-a29e03164324aec5bf527a1b4272b13500973bf7.tar.bz2
nixpkgs-a29e03164324aec5bf527a1b4272b13500973bf7.tar.lz
nixpkgs-a29e03164324aec5bf527a1b4272b13500973bf7.tar.xz
nixpkgs-a29e03164324aec5bf527a1b4272b13500973bf7.tar.zst
nixpkgs-a29e03164324aec5bf527a1b4272b13500973bf7.zip
s9fes: init at 20181205
-rw-r--r--pkgs/development/interpreters/s9fes/default.nix34
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/s9fes/default.nix b/pkgs/development/interpreters/s9fes/default.nix
new file mode 100644
index 00000000000..7423e9f5f48
--- /dev/null
+++ b/pkgs/development/interpreters/s9fes/default.nix
@@ -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;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 066abf31ea4..1f69d5837bb 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -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 { };