uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,154 @@
From d0136f350b82ae845d56029db43d153c91d5e494 Mon Sep 17 00:00:00 2001
From: Keshav Kini <keshav.kini@gmail.com>
Date: Sat, 30 May 2020 21:27:47 -0700
Subject: [PATCH] Fix some paths for Nix build
---
books/build/features.sh | 1 +
.../ipasir/load-ipasir-sharedlib-raw.lsp | 6 +--
books/projects/smtlink/config.lisp | 2 +-
books/projects/smtlink/examples/examples.lisp | 4 +-
books/projects/smtlink/smtlink-config | 2 +-
.../cl+ssl-20200610-git/src/reload.lisp | 53 +------------------
6 files changed, 8 insertions(+), 60 deletions(-)
diff --git a/books/build/features.sh b/books/build/features.sh
index d45a7aa61..27256b7cd 100755
--- a/books/build/features.sh
+++ b/books/build/features.sh
@@ -122,6 +122,7 @@ EOF
fi
echo "Determining whether an ipasir shared library is installed" 1>&2
+IPASIR_SHARED_LIBRARY=${IPASIR_SHARED_LIBRARY:-@libipasir@}
if check_ipasir; then
cat >> Makefile-features <<EOF
export OS_HAS_IPASIR ?= 1
diff --git a/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp b/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp
index 762e4ad4c..c9802cb58 100644
--- a/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp
+++ b/books/centaur/ipasir/load-ipasir-sharedlib-raw.lsp
@@ -30,11 +30,7 @@
(er-let* ((libname (acl2::getenv$ "IPASIR_SHARED_LIBRARY" acl2::*the-live-state*)))
(handler-case
- (cffi::load-foreign-library
- (or libname
- (cw "WARNING: $IPASIR_SHARED_LIBRARY not specified, ~
- defaulting to \"libipasirglucose4.so\"")
- "libipasirglucose4.so"))
+ (cffi::load-foreign-library (or libname "@libipasir@"))
(error () (er hard? 'load-ipasir-shardlib-raw
"Couldn't load ipasir shared library from ~s0."
libname))))
diff --git a/books/projects/smtlink/config.lisp b/books/projects/smtlink/config.lisp
index c74073174..8d92355f7 100644
--- a/books/projects/smtlink/config.lisp
+++ b/books/projects/smtlink/config.lisp
@@ -51,7 +51,7 @@ where the system books are."))
(make-smtlink-config :interface-dir interface-dir
:smt-module "ACL2_to_Z3"
:smt-class "ACL22SMT"
- :smt-cmd "/usr/bin/env python"
+ :smt-cmd "python"
:pythonpath "")))
;; -----------------------------------------------------------------
diff --git a/books/projects/smtlink/examples/examples.lisp b/books/projects/smtlink/examples/examples.lisp
index 90534892f..4ab98b2f0 100644
--- a/books/projects/smtlink/examples/examples.lisp
+++ b/books/projects/smtlink/examples/examples.lisp
@@ -75,7 +75,7 @@ Subgoal 2
Subgoal 2.2
Subgoal 2.2'
Using default SMT-trusted-cp...
-; SMT solver: `/usr/bin/env python /tmp/py_file/smtlink.w59zR`: 0.52 sec, 7,904 bytes
+; SMT solver: `python /tmp/py_file/smtlink.w59zR`: 0.52 sec, 7,904 bytes
Proved!
Subgoal 2.2''
Subgoal 2.1
@@ -139,7 +139,7 @@ read back into ACL2. Below are the outputs from this clause processor called
@({
Using default SMT-trusted-cp...
-; SMT solver: `/usr/bin/env python /tmp/py_file/smtlink.w59zR`: 0.52 sec, 7,904 bytes
+; SMT solver: `python /tmp/py_file/smtlink.w59zR`: 0.52 sec, 7,904 bytes
Proved!
})
diff --git a/books/projects/smtlink/smtlink-config b/books/projects/smtlink/smtlink-config
index 0d2703545..0f58904ea 100644
--- a/books/projects/smtlink/smtlink-config
+++ b/books/projects/smtlink/smtlink-config
@@ -1 +1 @@
-smt-cmd=/usr/bin/env python
+smt-cmd=python
diff --git a/books/quicklisp/bundle/software/cl+ssl-20200610-git/src/reload.lisp b/books/quicklisp/bundle/software/cl+ssl-20200610-git/src/reload.lisp
index e5db28645..65eb818a1 100644
--- a/books/quicklisp/bundle/software/cl+ssl-20200610-git/src/reload.lisp
+++ b/books/quicklisp/bundle/software/cl+ssl-20200610-git/src/reload.lisp
@@ -37,59 +37,10 @@
;; These are 32-bit only.
(cffi:define-foreign-library libcrypto
- (:windows (:or #+(and windows x86-64) "libcrypto-1_1-x64.dll"
- #+(and windows x86) "libcrypto-1_1.dll"
- "libeay32.dll"))
- (:openbsd "libcrypto.so")
- (:darwin (:or "/opt/local/lib/libcrypto.dylib" ;; MacPorts
- "/sw/lib/libcrypto.dylib" ;; Fink
- "/usr/local/opt/openssl/lib/libcrypto.dylib" ;; Homebrew
- "/usr/local/lib/libcrypto.dylib" ;; personalized install
- "libcrypto.dylib" ;; default system libcrypto, which may have insufficient crypto
- "/usr/lib/libcrypto.dylib"))
- (:cygwin (:or "cygcrypto-1.1.dll" "cygcrypto-1.0.0.dll")))
+ (t "@libcrypto@"))
(cffi:define-foreign-library libssl
- (:windows (:or #+(and windows x86-64) "libssl-1_1-x64.dll"
- #+(and windows x86) "libssl-1_1.dll"
- "libssl32.dll"
- "ssleay32.dll"))
- ;; The default OS-X libssl seems have had insufficient crypto algos
- ;; (missing TLSv1_[1,2]_XXX methods,
- ;; see https://github.com/cl-plus-ssl/cl-plus-ssl/issues/56)
- ;; so first try to load possible custom installations of libssl
- (:darwin (:or "/opt/local/lib/libssl.dylib" ;; MacPorts
- "/sw/lib/libssl.dylib" ;; Fink
- "/usr/local/opt/openssl/lib/libssl.dylib" ;; Homebrew
- "/usr/local/lib/libssl.dylib" ;; personalized install
- "libssl.dylib" ;; default system libssl, which may have insufficient crypto
- "/usr/lib/libssl.dylib"))
- (:solaris (:or "/lib/64/libssl.so"
- "libssl.so.0.9.8" "libssl.so" "libssl.so.4"))
- ;; Unlike some other systems, OpenBSD linker,
- ;; when passed library name without versions at the end,
- ;; will locate the library with highest macro.minor version,
- ;; so we can just use just "libssl.so".
- ;; More info at https://github.com/cl-plus-ssl/cl-plus-ssl/pull/2.
- (:openbsd "libssl.so")
- ((and :unix (not :cygwin)) (:or "libssl.so.1.1"
- "libssl.so.1.0.2m"
- "libssl.so.1.0.2k"
- "libssl.so.1.0.2"
- "libssl.so.1.0.1l"
- "libssl.so.1.0.1j"
- "libssl.so.1.0.1f"
- "libssl.so.1.0.1e"
- "libssl.so.1.0.1"
- "libssl.so.1.0.0q"
- "libssl.so.1.0.0"
- "libssl.so.0.9.8ze"
- "libssl.so.0.9.8"
- "libssl.so.10"
- "libssl.so.4"
- "libssl.so"))
- (:cygwin (:or "cygssl-1.1.dll" "cygssl-1.0.0.dll"))
- (t (:default "libssl3")))
+ (t "@libssl@"))
(unless (member :cl+ssl-foreign-libs-already-loaded
*features*)
--
2.31.1

View file

@ -0,0 +1,146 @@
{ lib, stdenv, callPackage, fetchFromGitHub, runCommandLocal, makeWrapper, substituteAll
, sbcl, bash, which, perl, hostname
, openssl, glucose, minisat, abc-verifier, z3, python2
, certifyBooks ? true
} @ args:
let
# Disable immobile space so we don't run out of memory on large books, and
# supply 2GB of dynamic space to avoid exhausting the heap while building the
# ACL2 system itself; see
# https://www.cs.utexas.edu/users/moore/acl2/current/HTML/installation/requirements.html#Obtaining-SBCL
sbcl' = args.sbcl.override { disableImmobileSpace = true; };
sbcl = runCommandLocal args.sbcl.name { buildInputs = [ makeWrapper ]; } ''
makeWrapper ${sbcl'}/bin/sbcl $out/bin/sbcl \
--add-flags "--dynamic-space-size 2000"
'';
in stdenv.mkDerivation rec {
pname = "acl2";
version = "8.4";
src = fetchFromGitHub {
owner = "acl2-devel";
repo = "acl2-devel";
rev = version;
sha256 = "16rr9zqmd3y1sd6zxff2f9gdd84l99pr7mdp1sjwmh427h661c68";
};
# You can swap this out with any other IPASIR implementation at
# build time by using overrideAttrs (make sure the derivation you
# use has a "libname" attribute so we can plug it into the patch
# below). Or, you can override it at runtime by setting the
# $IPASIR_SHARED_LIBRARY environment variable.
libipasir = callPackage ./libipasirglucose4 { };
patches = [(substituteAll {
src = ./0001-Fix-some-paths-for-Nix-build.patch;
libipasir = "${libipasir}/lib/${libipasir.libname}";
libssl = "${lib.getLib openssl}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}";
libcrypto = "${lib.getLib openssl}/lib/libcrypto${stdenv.hostPlatform.extensions.sharedLibrary}";
})];
buildInputs = [
# ACL2 itself only needs a Common Lisp compiler/interpreter:
sbcl
] ++ lib.optionals certifyBooks [
# To build community books, we need Perl and a couple of utilities:
which perl hostname makeWrapper
# Some of the books require one or more of these external tools:
glucose minisat abc-verifier libipasir
z3 (python2.withPackages (ps: [ ps.z3 ]))
];
# NOTE: Parallel building can be memory-intensive depending on the number of
# concurrent jobs. For example, this build has been seen to use >120GB of
# RAM on an 85 core machine.
enableParallelBuilding = true;
preConfigure = ''
# When certifying books, ACL2 doesn't like $HOME not existing.
export HOME=$(pwd)/fake-home
'' + lib.optionalString certifyBooks ''
# Some books also care about $USER being nonempty.
export USER=nobody
'';
postConfigure = ''
# ACL2 and its books need to be built in place in the out directory because
# the proof artifacts are not relocatable. Since ACL2 mostly expects
# everything to exist in the original source tree layout, we put it in
# $out/share/${pname} and create symlinks in $out/bin as necessary.
mkdir -p $out/share/${pname}
cp -pR . $out/share/${pname}
cd $out/share/${pname}
'';
preBuild = "mkdir -p $HOME";
makeFlags = "LISP=${sbcl}/bin/sbcl ACL2_MAKE_LOG=NONE";
doCheck = true;
checkTarget = "mini-proveall";
installPhase = ''
mkdir -p $out/bin
ln -s $out/share/${pname}/saved_acl2 $out/bin/${pname}
'' + lib.optionalString certifyBooks ''
ln -s $out/share/${pname}/books/build/cert.pl $out/bin/${pname}-cert
ln -s $out/share/${pname}/books/build/clean.pl $out/bin/${pname}-clean
'';
preDistPhases = [ (if certifyBooks then "certifyBooksPhase" else "removeBooksPhase") ];
certifyBooksPhase = ''
# Certify the community books
pushd $out/share/${pname}/books
makeFlags="ACL2=$out/share/${pname}/saved_acl2"
buildFlags="all"
buildPhase
# Clean up some stuff to save space
find -name '*@useless-runes.lsp' -execdir rm {} + # saves ~1GB of space
find -name '*.cert.out' -execdir gzip {} + # saves ~400MB of space
popd
'';
removeBooksPhase = ''
# Delete the community books
rm -rf $out/share/${pname}/books
'';
meta = with lib; {
description = "An interpreter and a prover for a Lisp dialect";
longDescription = ''
ACL2 is a logic and programming language in which you can model computer
systems, together with a tool to help you prove properties of those
models. "ACL2" denotes "A Computational Logic for Applicative Common
Lisp".
ACL2 is part of the Boyer-Moore family of provers, for which its authors
have received the 2005 ACM Software System Award.
This package installs the main ACL2 executable ${pname}, as well as the
build tools cert.pl and clean.pl, renamed to ${pname}-cert and
${pname}-clean.
'' + (if certifyBooks then ''
The community books are also included and certified with the `make
everything` target.
'' else ''
The community books are not included in this package.
'');
homepage = "https://www.cs.utexas.edu/users/moore/acl2/";
downloadPage = "https://github.com/acl2-devel/acl2-devel/releases";
license = with licenses; [
# ACL2 itself is bsd3
bsd3
] ++ optionals certifyBooks [
# The community books are mostly bsd3 or mit but with a few
# other things thrown in.
mit gpl2 llgpl21 cc0 publicDomain unfreeRedistributable
];
maintainers = with maintainers; [ kini raskin ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,46 @@
From 0f48e046f44624f4d4d8255ac5bd26397a38f16c Mon Sep 17 00:00:00 2001
From: Keshav Kini <keshav.kini@gmail.com>
Date: Sun, 23 Feb 2020 14:09:30 -0800
Subject: [PATCH] Support shared library build
Patch taken from [the ACL2 Books documentation][1].
- Add " -fPIC" to the CXXFLAGS to build position-independent code,
required for shared libraries.
- Add the line "export CXXFLAGS" below the setting of CXXFLAGS, so that
those flags apply to the recursive make of the core solver library.
- Fix a typo: replace the occurrence of "CXXLAGS" with "CXXFLAGS".
[1]: http://www.cs.utexas.edu/users/moore/acl2/v8-2/combined-manual/index.html?topic=IPASIR____BUILDING-AN-IPASIR-SOLVER-LIBRARY
---
makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/makefile b/makefile
index 07121de..4e85c4b 100755
--- a/makefile
+++ b/makefile
@@ -29,7 +29,8 @@ TARGET=libipasir$(SIG).a
CXX=g++
-CXXFLAGS= -g -std=c++11 -Wall -DNDEBUG -O3
+CXXFLAGS= -g -std=c++11 -Wall -DNDEBUG -O3 -fPIC
+export CXXFLAGS
#-----------------------------------------------------------------------#
#- REQUIRED TOP RULES --------------------------------------------------#
@@ -67,7 +68,7 @@ libipasir$(SIG).a: .FORCE
#-----------------------------------------------------------------------#
ipasir$(NAME)glue.o: ipasir$(NAME)glue.cc ipasir.h makefile
- $(CXX) -g -std=c++11 $(CXXLAGS) \
+ $(CXX) -g -std=c++11 $(CXXFLAGS) \
-DVERSION=\"$(VERSION)\" \
-I$(DIR) -I$(DIR)/core -c ipasir$(NAME)glue.cc
--
2.23.1

View file

@ -0,0 +1,41 @@
{ lib, stdenv, fetchurl, zlib, unzip }:
stdenv.mkDerivation rec {
pname = "libipasirglucose4";
# This library has no version number AFAICT (beyond generally being based on
# Glucose 4.x), but it was submitted to the 2017 SAT competition so let's use
# that as the version number, I guess.
version = "2017";
libname = pname + stdenv.targetPlatform.extensions.sharedLibrary;
src = fetchurl {
url = "https://baldur.iti.kit.edu/sat-competition-2017/solvers/incremental/glucose-ipasir.zip";
sha256 = "0xchgady9vwdh8frmc8swz6va53igp2wj1y9sshd0g7549n87wdj";
};
nativeBuildInputs = [ unzip ];
buildInputs = [ zlib ];
sourceRoot = "sat/glucose4";
patches = [ ./0001-Support-shared-library-build.patch ];
makeFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ];
postBuild = ''
$CXX -shared -o ${libname} \
${if stdenv.cc.isClang then "" else "-Wl,-soname,${libname}"} \
ipasirglucoseglue.o libipasirglucose4.a
'';
installPhase = ''
install -D ${libname} $out/lib/${libname}
'';
meta = with lib; {
description = "Shared library providing IPASIR interface to the Glucose SAT solver";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ kini ];
};
}

View file

@ -0,0 +1,40 @@
{ lib, stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
pname = "alda";
version = "2.2.3";
src_alda = fetchurl {
url = "https://alda-releases.nyc3.digitaloceanspaces.com/${version}/client/linux-amd64/alda";
hash = "sha256-cyOAXQ3ITIgy4QusjdYBNmNIzB6BzfbQEypvJbkbvWo=";
};
src_player = fetchurl {
url = "https://alda-releases.nyc3.digitaloceanspaces.com/${version}/player/non-windows/alda-player";
hash = "sha256-HsX0mNWrusL2FaK2oK8xhmr/ai+3ZiMmrJk7oS3b93g=";
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase =
let
binPath = lib.makeBinPath [ jre ];
in
''
install -D $src_alda $out/bin/alda
install -D $src_player $out/bin/alda-player
wrapProgram $out/bin/alda --prefix PATH : $out/bin:${binPath}
wrapProgram $out/bin/alda-player --prefix PATH : $out/bin:${binPath}
'';
meta = with lib; {
description = "A music programming language for musicians";
homepage = "https://alda.io";
license = licenses.epl10;
maintainers = [ maintainers.ericdallo ];
platforms = jre.meta.platforms;
};
}

View file

@ -0,0 +1,35 @@
{ lib, stdenv, fetchurl, unzip }:
stdenv.mkDerivation rec {
pname = "angelscript";
version = "2.22.2";
nativeBuildInputs = [ unzip ];
src = fetchurl {
url = "http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
sha256 = "sha256-gzR96GSZJNV+bei3OPqlx7aw+WBv8XRpHGh8u+go6N4=";
};
preConfigure = ''
cd angelscript/projects/gnuc
sed -i makefile -e "s@LOCAL = .*@LOCAL = $out@"
export SHARED=1
export VERSION="${version}"
mkdir -p "$out/lib" "$out/bin" "$out/share" "$out/include"
'';
postBuild = ''
rm ../../lib/*
'';
postInstall = ''
mkdir -p "$out/share/docs/angelscript"
cp -r ../../../docs/* "$out/share/docs/angelscript"
'';
meta = with lib; {
description = "Light-weight scripting library";
license = licenses.zlib;
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
badPlatforms = [ "aarch64-linux" ];
downloadPage = "http://www.angelcode.com/angelscript/downloads.html";
homepage = "http://www.angelcode.com/angelscript/";
};
}

View file

@ -0,0 +1,39 @@
{ lib
, stdenv
, fetchurl
, unzip
, cmake
}:
stdenv.mkDerivation rec {
pname = "angelscript";
version = "2.35.1";
src = fetchurl {
url = "https://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
sha256 = "12x12fs2bjkbh73n2w84wnqhg6xn6mnp6g79gbkwfl6gssv9c42w";
};
nativeBuildInputs = [ unzip cmake ];
preConfigure = ''
export ROOT=$PWD
cd angelscript/projects/cmake
'';
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
postInstall = ''
mkdir -p "$out/share/docs/angelscript"
cp -r $ROOT/docs/* "$out/share/docs/angelscript"
'';
meta = with lib; {
description = "Light-weight scripting library";
license = licenses.zlib;
maintainers = with maintainers; [ raskin ];
platforms = platforms.all;
downloadPage = "https://www.angelcode.com/angelscript/downloads.html";
homepage = "https://www.angelcode.com/angelscript/";
};
}

View file

@ -0,0 +1,3 @@
source 'https://rubygems.org' do
gem 'asmrepl'
end

View file

@ -0,0 +1,18 @@
GEM
specs:
GEM
remote: https://rubygems.org/
specs:
asmrepl (1.0.3)
fisk (~> 2)
fisk (2.3.0)
PLATFORMS
ruby
DEPENDENCIES
asmrepl!
BUNDLED WITH
2.2.24

View file

@ -0,0 +1,17 @@
{ lib, bundlerApp, bundlerUpdateScript }:
bundlerApp {
pname = "asmrepl";
gemdir = ./.;
exes = [ "asmrepl" ];
passthru.updateScript = bundlerUpdateScript "asmrepl";
meta = with lib; {
description = "A REPL for x86-64 assembly language";
homepage = "https://github.com/tenderlove/asmrepl";
license = licenses.asl20;
maintainers = with maintainers; [ lom ];
platforms = platforms.x86_64;
};
}

View file

@ -0,0 +1,23 @@
{
asmrepl = {
dependencies = ["fisk"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "10d0zvkhk3ja48vvx28hfsqfrzfl66vdpmk3gcgb5viy174c72v6";
type = "gem";
};
version = "1.0.3";
};
fisk = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1mq2a7hjs9xfg514ci0xw90c33rzq1y58ywpnmhp7w767ll6wldd";
type = "gem";
};
version = "2.3.0";
};
}

View file

@ -0,0 +1,141 @@
{ resholve
, lib
, stdenv
, fetchFromGitHub
, bash
, coreutils
, gnugrep
, ncurses
, findutils
, hostname
, parallel
, flock
, ps
, bats
, lsof
, doInstallCheck ? true
}:
resholve.mkDerivation rec {
pname = "bats";
version = "1.7.0";
src = fetchFromGitHub {
owner = "bats-core";
repo = "bats-core";
rev = "v${version}";
sha256 = "sha256-joNne/dDVCNtzdTQ64rK8GimT+DOWUa7f410hml2s8Q=";
};
patchPhase = ''
patchShebangs .
'';
installPhase = ''
./install.sh $out
'';
solutions = {
bats = {
scripts = [
"bin/bats"
"libexec/bats-core/*"
"lib/bats-core/*"
];
interpreter = "${bash}/bin/bash";
inputs = [
bash
coreutils
gnugrep
ncurses
findutils
hostname
parallel
flock
"lib/bats-core"
"libexec/bats-core"
];
fake = {
external = [
"greadlink"
"shlock"
];
};
fix = {
"$BATS_ROOT" = [ "${placeholder "out"}" ];
"$BATS_LIBEXEC" = [ "${placeholder "out"}/libexec/bats-core" ];
};
keep = {
"${placeholder "out"}/libexec/bats-core/bats" = true;
source = [
"${placeholder "out"}/lib/bats-core/validator.bash"
"${placeholder "out"}/lib/bats-core/preprocessing.bash"
"$BATS_TEST_SOURCE"
"${placeholder "out"}/lib/bats-core/tracing.bash"
"${placeholder "out"}/lib/bats-core/test_functions.bash"
"$library_load_path"
"${placeholder "out"}/lib/bats-core/common.bash"
"${placeholder "out"}/lib/bats-core/semaphore.bash"
"${placeholder "out"}/lib/bats-core/formatter.bash"
"${placeholder "out"}/lib/bats-core/warnings.bash"
"$setup_suite_file" # via cli arg
];
"$report_formatter" = true;
"$formatter" = true;
"$pre_command" = true;
"$BATS_TEST_NAME" = true;
"${placeholder "out"}/libexec/bats-core/bats-exec-test" = true;
};
execer = [
/*
both blatant lies for expedience; these can certainly exec args
they may be safe here, because they may always run things that
are ultimately in libexec?
TODO: handle parallel and flock in binlore/resholve
*/
"cannot:${parallel}/bin/parallel"
"cannot:${flock}/bin/flock"
"cannot:libexec/bats-core/bats-preprocess"
# these do exec, but other internal files
"cannot:libexec/bats-core/bats-exec-file"
"cannot:libexec/bats-core/bats-exec-suite"
];
};
};
passthru.tests.upstream = bats.unresholved.overrideAttrs (old: {
name = "${bats.name}-tests";
dontInstall = true; # just need the build directory
installCheckInputs = [
ncurses
parallel # skips some tests if it can't detect
flock # skips some tests if it can't detect
ps
] ++ lib.optionals stdenv.isDarwin [ lsof ];
inherit doInstallCheck;
installCheckPhase = ''
# TODO: cut if https://github.com/bats-core/bats-core/issues/418 allows
sed -i '/test works even if PATH is reset/a skip "disabled for nix build"' test/bats.bats
# skip tests that assume bats `install.sh` will be in BATS_ROOT
rm test/root.bats
# test generates file with absolute shebang dynamically
substituteInPlace test/install.bats --replace \
"/usr/bin/env bash" "${bash}/bin/bash"
${bats}/bin/bats test
touch $out
'';
});
meta = with lib; {
homepage = "https://github.com/bats-core/bats-core";
description = "Bash Automated Testing System";
maintainers = with maintainers; [ abathur ];
license = licenses.mit;
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,42 @@
{ lib
, stdenv
, fetchFromGitHub
, readline
, autoreconfHook
, autoconf-archive
, gmp
, flex
, bison
}:
stdenv.mkDerivation rec {
pname = "bic";
version = "1.0.0";
src = fetchFromGitHub {
owner = "hexagonal-sun";
repo = pname;
rev = "v${version}";
sha256 = "1ws46h1ngzk14dspmsggj9535yl04v9wh8v4gb234n34rdkdsyyw";
};
buildInputs = [ readline gmp ];
nativeBuildInputs = [
autoreconfHook
autoconf-archive
bison
flex
];
meta = with lib; {
description = "A C interpreter and API explorer";
longDescription = ''
bic This a project that allows developers to explore and test C-APIs using a
read eval print loop, also known as a REPL.
'';
license = with licenses; [ gpl2Plus ];
homepage = "https://github.com/hexagonal-sun/bic";
platforms = platforms.unix;
maintainers = with maintainers; [ hexagonal-sun ];
};
}

View file

@ -0,0 +1,71 @@
{ lib
, stdenv
, fetchFromGitHub
, genBytecode ? false
, bqn-path ? null
, mbqn-source ? null
}:
let
cbqn-bytecode-files = fetchFromGitHub {
name = "cbqn-bytecode-files";
owner = "dzaima";
repo = "CBQN";
rev = "c39653c898531a2cdbf4cc5c764df6e37b1894a4";
hash = "sha256-JCEmkwh5Rv5+NQoxvefSrYnayU892/Wam+gjMgcQmO0=";
};
in
assert genBytecode -> ((bqn-path != null) && (mbqn-source != null));
stdenv.mkDerivation rec {
pname = "cbqn" + lib.optionalString (!genBytecode) "-standalone";
version = "0.pre+date=2022-05-06";
src = fetchFromGitHub {
owner = "dzaima";
repo = "CBQN";
rev = "3496a939b670f8c9ca2a04927378d6b7e9abd68e";
hash = "sha256-P+PoY4XF9oEw7VIpmybvPp+jxWHEo2zt1Lamayf1mHg=";
};
dontConfigure = true;
postPatch = ''
sed -i '/SHELL =.*/ d' makefile
'';
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
];
preBuild = ''
# Purity: avoids git downloading bytecode files
touch src/gen/customRuntime
'' + (if genBytecode then ''
${bqn-path} genRuntime ${mbqn-source}
'' else ''
cp ${cbqn-bytecode-files}/src/gen/{compiles,formatter,runtime0,runtime1,src} src/gen/
'');
installPhase = ''
runHook preInstall
mkdir -p $out/bin/
cp BQN -t $out/bin/
# note guard condition for case-insensitive filesystems
[ -e $out/bin/bqn ] || ln -s $out/bin/BQN $out/bin/bqn
[ -e $out/bin/cbqn ] || ln -s $out/bin/BQN $out/bin/cbqn
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/dzaima/CBQN/";
description = "BQN implementation in C";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ AndersonTorres sternenseemann synthetica shnarazk ];
platforms = platforms.all;
};
}
# TODO: version cbqn-bytecode-files
# TODO: test suite

View file

@ -0,0 +1,72 @@
{ lib
, stdenv
, fetchFromGitHub
, jdk
, makeWrapper
, buildNativeImage ? true
}:
stdenv.mkDerivation rec {
pname = "dbqn" + lib.optionalString buildNativeImage "-native";
version = "0.2.1";
src = fetchFromGitHub {
owner = "dzaima";
repo = "BQN";
rev = "v${version}";
sha256 = "1kxzxz2hrd1871281s4rsi569qk314aqfmng9pkqn8gv9nqhmph0";
};
nativeBuildInputs = [
jdk
makeWrapper
];
dontConfigure = true;
postPatch = ''
patchShebangs --build ./build8
'';
buildPhase = ''
runHook preBuild
./build8
'' + lib.optionalString buildNativeImage ''
native-image --report-unsupported-elements-at-runtime \
-H:CLibraryPath=${lib.getLib jdk}/lib -J-Dfile.encoding=UTF-8 \
-jar BQN.jar dbqn
'' + ''
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
'' + (if buildNativeImage then ''
mv dbqn $out/bin
'' else ''
mkdir -p $out/share/${pname}
mv BQN.jar $out/share/${pname}/
makeWrapper "${lib.getBin jdk}/bin/java" "$out/bin/dbqn" \
--add-flags "-jar $out/share/${pname}/BQN.jar"
'') + ''
ln -s $out/bin/dbqn $out/bin/bqn
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/dzaima/BQN";
description = "A BQN implementation in Java" + lib.optionalString buildNativeImage ", compiled as a native image";
license = licenses.mit;
maintainers = with maintainers; [ AndersonTorres sternenseemann ];
inherit (jdk.meta) platforms;
broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dbqn-native.x86_64-darwin
};
}
# TODO: Processing app
# TODO: minimalistic JDK

View file

@ -0,0 +1,12 @@
diff -Naur source-old/bqn.js source-new/bqn.js
--- source-old/bqn.js 1969-12-31 21:00:01.000000000 -0300
+++ source-new/bqn.js 2021-10-03 01:28:00.268998916 -0300
@@ -4,7 +4,7 @@
let path = require('path');
let fs = require('fs');
-let bqn = require("./docs/bqn.js");
+let bqn = require("@libbqn@");
module.exports = bqn;
let {fmt,fmtErr,sysvals,sysargs,makebqn,makerepl}=bqn;
let {has,list,str,unstr,dynsys,req1str,makens}=bqn.util;

View file

@ -0,0 +1,64 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, makeWrapper
, nodejs
}:
stdenvNoCC.mkDerivation rec {
pname = "bqn";
version = "0.pre+date=2021-12-13";
src = fetchFromGitHub {
owner = "mlochbaum";
repo = "BQN";
rev = "2c2e86e10ff963a6aefa14f76fd8833ce3c9157c";
hash = "sha256-iAlDXGlHTeI6+r/QKFiBHhj5A+FgUy7JFrCpAwpyVQU=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ nodejs ];
patches = [
# Creates a @libbqn@ substitution variable, to be filled in the fixupPhase
./001-libbqn-path.patch
];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/${pname}
cp bqn.js $out/share/${pname}/bqn.js
cp docs/bqn.js $out/share/${pname}/libbqn.js
makeWrapper "${lib.getBin nodejs}/bin/node" "$out/bin/mbqn" \
--add-flags "$out/share/${pname}/bqn.js"
ln -s $out/bin/mbqn $out/bin/bqn
runHook postInstall
'';
fixupPhase = ''
runHook preFixup
substituteInPlace $out/share/${pname}/bqn.js \
--subst-var-by "libbqn" "$out/share/${pname}/libbqn.js"
runHook postFixup
'';
meta = with lib; {
homepage = "https://github.com/mlochbaum/BQN/";
description = "The original BQN implementation in Javascript";
license = licenses.isc;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.all;
};
}
# TODO: install docs and other stuff

View file

@ -0,0 +1,37 @@
{ lib, stdenv, dos2unix, fetchurl, unzip }:
stdenv.mkDerivation rec {
pname = "bwbasic";
version = "3.20";
src = fetchurl {
url = "mirror://sourceforge/project/bwbasic/bwbasic/version%203.20/bwbasic-3.20.zip";
sha256 = "1w9r4cl7z1lh52c1jpjragbspi1qn0zb7jhcsldav4gdnzxfw67f";
};
nativeBuildInputs = [ dos2unix unzip ];
unpackPhase = ''
unzip $src
'';
postPatch = ''
dos2unix configure
patchShebangs configure
chmod +x configure
'';
hardeningDisable = [ "format" ];
preInstall = ''
mkdir -p $out/bin
'';
meta = with lib; {
description = "Bywater BASIC Interpreter";
license = licenses.gpl2Only;
maintainers = with maintainers; [ irenes ];
platforms = platforms.all;
homepage = "https://sourceforge.net/projects/bwbasic/";
};
}

View file

@ -0,0 +1,28 @@
{ lib, stdenv, fetchFromGitHub, mlton }:
stdenv.mkDerivation {
pname = "ceptre";
version = "unstable-2016-11-27";
src = fetchFromGitHub {
owner = "chrisamaphone";
repo = "interactive-lp";
rev = "e436fda2ccd44e9c9d226feced9d204311deacf5";
sha256 = "sha256-COYrE9O/Y1/ZBNHNakBwrUVklCuk144RF9bjwa3rl5w=";
fetchSubmodules = true;
};
nativeBuildInputs = [ mlton ];
installPhase = ''
mkdir -p $out/bin
cp ceptre $out/bin
'';
meta = with lib; {
description = "A linear logic programming language for modeling generative interactive systems";
homepage = "https://github.com/chrisamaphone/interactive-lp";
maintainers = with maintainers; [ pSub ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,37 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper }:
stdenv.mkDerivation rec {
version = "0.10";
pname = "chibi-scheme";
src = fetchFromGitHub {
owner = "ashinn";
repo = "chibi-scheme";
rev = version;
sha256 = "sha256-7vDxcnXhq1wJSLFHGxtwh+H+KWxh6B0JXSMPzSmQFXo=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
make install PREFIX="$out"
'';
fixupPhase = ''
wrapProgram "$out/bin/chibi-scheme" \
--prefix CHIBI_MODULE_PATH : "$out/share/chibi:$out/lib/chibi"
for f in chibi-doc chibi-ffi snow-chibi; do
substituteInPlace "$out/bin/$f" \
--replace "/usr/bin/env chibi-scheme" "$out/bin/chibi-scheme"
done
'';
meta = {
homepage = "https://github.com/ashinn/chibi-scheme";
description = "Small Footprint Scheme for use as a C Extension Language";
platforms = lib.platforms.all;
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.DerGuteMoritz ];
};
}

View file

@ -0,0 +1,104 @@
{ lib, stdenv
, python3
, libffi
, git
, cmake
, zlib
, fetchgit
, makeWrapper
, runCommand
, llvmPackages_5
, glibc
, ncurses
}:
let
unwrapped = stdenv.mkDerivation rec {
pname = "cling-unwrapped";
version = "0.7";
src = fetchgit {
url = "http://root.cern/git/clang.git";
# This commit has the tag cling-0.7 so we use it, even though cpt.py
# tries to use refs/tags/cling-patches-rrelease_50
rev = "354b25b5d915ff3b1946479ad07f3f2768ea1621";
branchName = "cling-patches";
sha256 = "0q8q2nnvjx3v59ng0q3qqqhzmzf4pmfqqiy3rz1f3drx5w3lgyjg";
};
clingSrc = fetchgit {
url = "http://root.cern/git/cling.git";
rev = "70163975eee5a76b45a1ca4016bfafebc9b57e07";
sha256 = "1mv2fhk857kp5rq714bq49iv7gy9fgdwibydj5wy1kq2m3sf3ysi";
};
preConfigure = ''
echo "add_llvm_external_project(cling)" >> tools/CMakeLists.txt
cp -r $clingSrc ./tools/cling
chmod -R a+w ./tools/cling
'';
nativeBuildInputs = [ python3 git cmake llvmPackages_5.llvm.dev ];
buildInputs = [ libffi llvmPackages_5.llvm zlib ncurses ];
strictDeps = true;
cmakeFlags = [
"-DLLVM_TARGETS_TO_BUILD=host;NVPTX"
"-DLLVM_ENABLE_RTTI=ON"
# Setting -DCLING_INCLUDE_TESTS=ON causes the cling/tools targets to be built;
# see cling/tools/CMakeLists.txt
"-DCLING_INCLUDE_TESTS=ON"
];
meta = with lib; {
description = "The Interactive C++ Interpreter";
homepage = "https://root.cern/cling/";
license = with licenses; [ lgpl21 ncsa ];
maintainers = with maintainers; [ thomasjm ];
platforms = platforms.unix;
};
};
# The flags passed to the wrapped cling should
# a) prevent it from searching for system include files and libs, and
# b) provide it with the include files and libs it needs (C and C++ standard library)
# These are also exposed as cling.flags/cling.compilerIncludeFlags because it's handy to be
# able to pass them to tools that wrap Cling, particularly Jupyter kernels such as xeus-cling
# and the built-in jupyter-cling-kernel. Both of these use Cling as a library by linking against
# libclingJupyter.so, so the makeWrapper approach to wrapping the binary doesn't work.
# Thus, if you're packaging a Jupyter kernel, you either need to pass these flags as extra
# args to xcpp (for xeus-cling) or put them in the environment variable CLING_OPTS
# (for jupyter-cling-kernel)
flags = [
"-nostdinc"
"-nostdinc++"
"-isystem" "${lib.getDev stdenv.cc.libc}/include"
"-I" "${lib.getDev unwrapped}/include"
"-I" "${lib.getLib unwrapped}/lib/clang/5.0.2/include"
];
# Autodetect the include paths for the compiler used to build Cling, in the same way Cling does at
# https://github.com/root-project/cling/blob/v0.7/lib/Interpreter/CIFactory.cpp#L107:L111
# Note: it would be nice to just put the compiler in Cling's PATH and let it do this by itself, but
# unfortunately passing -nostdinc/-nostdinc++ disables Cling's autodetection logic.
compilerIncludeFlags = runCommand "compiler-include-flags.txt" {} ''
export LC_ALL=C
${stdenv.cc}/bin/c++ -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.include/,''${' -e '/^ \/.*++/p' -e '}' > tmp
sed -e 's/^/-isystem /' -i tmp
tr '\n' ' ' < tmp > $out
'';
in
runCommand "cling-${unwrapped.version}" {
buildInputs = [ makeWrapper ];
inherit unwrapped flags compilerIncludeFlags;
inherit (unwrapped) meta;
} ''
makeWrapper $unwrapped/bin/cling $out/bin/cling \
--add-flags "$(cat "$compilerIncludeFlags")" \
--add-flags "$flags"
''

View file

@ -0,0 +1,39 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
version = "6.40";
pname = "clips";
src = fetchurl {
url = "mirror://sourceforge/clipsrules/CLIPS/${version}/clips_core_source_${
builtins.replaceStrings [ "." ] [ "" ] version
}.tar.gz";
sha256 = "1pr5l61zxf6kjs8b2b028g2aq45pigavwjmrf4l5mrdmlnk3fq5d";
};
postPatch = ''
substituteInPlace core/makefile --replace 'gcc' '${stdenv.cc.targetPrefix}cc'
'';
makeFlags = [ "-C" "core" ];
installPhase = ''
runHook preInstall
install -D -t $out/bin core/clips
runHook postInstall
'';
meta = with lib; {
description = "A Tool for Building Expert Systems";
homepage = "http://www.clipsrules.net/";
longDescription = ''
Developed at NASA's Johnson Space Center from 1985 to 1996,
CLIPS is a rule-based programming language useful for creating
expert systems and other programs where a heuristic solution is
easier to implement and maintain than an algorithmic solution.
'';
license = licenses.publicDomain;
maintainers = [ maintainers.league ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,12 @@
diff -ru a/modules/bindings/glibc/linux.lisp b/modules/bindings/glibc/linux.lisp
--- a/modules/bindings/glibc/linux.lisp 2008-10-10 16:15:49.000000000 +0300
+++ b/modules/bindings/glibc/linux.lisp 2012-12-04 01:01:35.000000000 +0200
@@ -86,7 +86,7 @@
(def-c-type __key_t) ; int
-(c-lines "#include <bits/ipctypes.h>~%")
+(c-lines "#include <sys/ipc.h>~%")
(def-c-type __ipc_pid_t) ; ushort
; --------------------------- <sys/types.h> -----------------------------------

View file

@ -0,0 +1,108 @@
# there are the following linking sets:
# - boot (not installed): without modules, only used when building clisp
# - base (default): contains readline and i18n, regexp and syscalls modules
# by default
# - full: contains base plus modules in withModules
{ lib, stdenv, fetchurl, libsigsegv, gettext, ncurses, readline, libX11
, libXau, libXt, pcre, zlib, libXpm, xorgproto, libXext
, libffi
, libffcall
, coreutils
# build options
, threadSupport ? stdenv.hostPlatform.isx86
, x11Support ? stdenv.hostPlatform.isx86
, dllSupport ? true
, withModules ? [
"pcre"
"rawsock"
]
++ lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" "wildcard" ]
++ lib.optional x11Support "clx/new-clx"
}:
assert x11Support -> (libX11 != null && libXau != null && libXt != null
&& libXpm != null && xorgproto != null && libXext != null);
stdenv.mkDerivation rec {
version = "2.49";
pname = "clisp";
src = fetchurl {
url = "mirror://gnu/clisp/release/${version}/clisp-${version}.tar.bz2";
sha256 = "8132ff353afaa70e6b19367a25ae3d5a43627279c25647c220641fed00f8e890";
};
inherit libsigsegv gettext coreutils;
ffcallAvailable = stdenv.isLinux && (libffcall != null);
buildInputs = [libsigsegv]
++ lib.optional (gettext != null) gettext
++ lib.optional (ncurses != null) ncurses
++ lib.optional (pcre != null) pcre
++ lib.optional (zlib != null) zlib
++ lib.optional (readline != null) readline
++ lib.optional (ffcallAvailable && (libffi != null)) libffi
++ lib.optional ffcallAvailable libffcall
++ lib.optionals x11Support [
libX11 libXau libXt libXpm xorgproto libXext
];
patches = [
./bits_ipctypes_to_sys_ipc.patch # from Gentoo
# The cfree alias no longer exists since glibc 2.26
./remove-cfree-binding.patch
];
# First, replace port 9090 (rather low, can be used)
# with 64237 (much higher, IANA private area, not
# anything rememberable).
# Also remove reference to a type that disappeared from recent glibc
# (seems the correct thing to do, found no reference to any solution)
postPatch = ''
sed -e 's@9090@64237@g' -i tests/socket.tst
sed -i 's@/bin/pwd@${coreutils}&@' src/clisp-link.in
find . -type f | xargs sed -e 's/-lICE/-lXau &/' -i
substituteInPlace modules/bindings/glibc/linux.lisp --replace "(def-c-type __swblk_t)" ""
'';
configureFlags = [ "builddir" ]
++ lib.optional (!dllSupport) "--without-dynamic-modules"
++ lib.optional (readline != null) "--with-readline"
# --with-dynamic-ffi can only exist with --with-ffcall - foreign.d does not compile otherwise
++ lib.optional (ffcallAvailable && (libffi != null)) "--with-dynamic-ffi"
++ lib.optional ffcallAvailable "--with-ffcall"
++ lib.optional (!ffcallAvailable) "--without-ffcall"
++ builtins.map (x: "--with-module=" + x) withModules
++ lib.optional threadSupport "--with-threads=POSIX_THREADS";
preBuild = ''
sed -e '/avcall.h/a\#include "config.h"' -i src/foreign.d
cd builddir
'';
# Fails to build in parallel due to missing gnulib header dependency used in charstrg.d:
# ../src/charstrg.d:319:10: fatal error: uniwidth.h: No such file or directory
enableParallelBuilding = false;
postInstall =
lib.optionalString (withModules != [])
(''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full''
+ lib.concatMapStrings (x: " " + x) withModules);
NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}";
# TODO : make mod-check fails
doCheck = false;
meta = {
description = "ANSI Common Lisp Implementation";
homepage = "http://clisp.cons.org";
maintainers = with lib.maintainers; [raskin tohl];
platforms = lib.platforms.unix;
# problems on Darwin: https://github.com/NixOS/nixpkgs/issues/20062
broken = stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isAarch64;
license = lib.licenses.gpl2;
};
}

View file

@ -0,0 +1,98 @@
# there are the following linking sets:
# - boot (not installed): without modules, only used when building clisp
# - base (default): contains readline and i18n, regexp and syscalls modules
# by default
# - full: contains base plus modules in withModules
{ lib, stdenv, fetchhg, libsigsegv, gettext, ncurses, readline, libX11
, libXau, libXt, pcre, zlib, libXpm, xorgproto, libXext
, libffi, libffcall, automake
, coreutils
# build options
, threadSupport ? stdenv.hostPlatform.isx86
, x11Support ? stdenv.hostPlatform.isx86
, dllSupport ? true
, withModules ? [
"pcre"
"rawsock"
]
++ lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" ]
++ lib.optional x11Support "clx/new-clx"
}:
assert x11Support -> (libX11 != null && libXau != null && libXt != null
&& libXpm != null && xorgproto != null && libXext != null);
stdenv.mkDerivation rec {
version = "2.50pre20171114";
pname = "clisp";
src = fetchhg {
url = "http://hg.code.sf.net/p/clisp/clisp";
rev = "36df6dc59b8f";
sha256 = "1pidiv1m55lvc4ln8vx0ylnnhlj95y6hrfdq96nrj14f4v8fkvmr";
};
inherit libsigsegv gettext coreutils;
ffcallAvailable = stdenv.isLinux && (libffcall != null);
nativeBuildInputs = [ automake ]; # sometimes fails otherwise
buildInputs = [libsigsegv]
++ lib.optional (gettext != null) gettext
++ lib.optional (ncurses != null) ncurses
++ lib.optional (pcre != null) pcre
++ lib.optional (zlib != null) zlib
++ lib.optional (readline != null) readline
++ lib.optional (ffcallAvailable && (libffi != null)) libffi
++ lib.optional ffcallAvailable libffcall
++ lib.optionals x11Support [
libX11 libXau libXt libXpm xorgproto libXext
];
# First, replace port 9090 (rather low, can be used)
# with 64237 (much higher, IANA private area, not
# anything rememberable).
# Also remove reference to a type that disappeared from recent glibc
# (seems the correct thing to do, found no reference to any solution)
postPatch = ''
sed -e 's@9090@64237@g' -i tests/socket.tst
sed -i 's@/bin/pwd@${coreutils}&@' src/clisp-link.in
find . -type f | xargs sed -e 's/-lICE/-lXau &/' -i
substituteInPlace modules/bindings/glibc/linux.lisp --replace "(def-c-type __swblk_t)" ""
'';
configureFlags = [ "builddir" ]
++ lib.optional (!dllSupport) "--without-dynamic-modules"
++ lib.optional (readline != null) "--with-readline"
# --with-dynamic-ffi can only exist with --with-ffcall - foreign.d does not compile otherwise
++ lib.optional (ffcallAvailable && (libffi != null)) "--with-dynamic-ffi"
++ lib.optional ffcallAvailable "--with-ffcall"
++ lib.optional (!ffcallAvailable) "--without-ffcall"
++ builtins.map (x: " --with-module=" + x) withModules
++ lib.optional threadSupport "--with-threads=POSIX_THREADS";
preBuild = ''
sed -e '/avcall.h/a\#include "config.h"' -i src/foreign.d
sed -i -re '/ cfree /d' -i modules/bindings/glibc/linux.lisp
cd builddir
'';
postInstall =
lib.optionalString (withModules != [])
(''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full''
+ lib.concatMapStrings (x: " " + x) withModules);
NIX_CFLAGS_COMPILE = "-O0 ${lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}";
# TODO : make mod-check fails
doCheck = false;
meta = {
description = "ANSI Common Lisp Implementation";
homepage = "http://clisp.cons.org";
maintainers = with lib.maintainers; [raskin tohl];
# problems on Darwin: https://github.com/NixOS/nixpkgs/issues/20062
platforms = lib.platforms.linux;
};
}

View file

@ -0,0 +1,12 @@
diff --git a/modules/bindings/glibc/linux.lisp b/modules/bindings/glibc/linux.lisp
index c40b4f8..1c8edca 100644
--- a/modules/bindings/glibc/linux.lisp
+++ b/modules/bindings/glibc/linux.lisp
@@ -648,7 +648,6 @@
(def-call-out calloc (:arguments (nmemb size_t) (size size_t))
(:return-type c-pointer))
(def-call-out free (:arguments (ptr c-pointer)) (:return-type nil))
-(def-call-out cfree (:arguments (ptr c-pointer)) (:return-type nil))
(def-call-out valloc (:arguments (size size_t)) (:return-type c-pointer))
(def-call-out abort (:arguments) (:return-type nil))

View file

@ -0,0 +1,79 @@
{ lib, buildGraalvmNativeImage, fetchurl, writeScript }:
buildGraalvmNativeImage rec {
pname = "babashka";
version = "0.8.2";
src = fetchurl {
url = "https://github.com/babashka/${pname}/releases/download/v${version}/${pname}-${version}-standalone.jar";
sha256 = "sha256-rdA/pV2EGYPs1UuuTq4dIuce3i8haJOyyyTDAWpOeR8=";
};
executable = "bb";
extraNativeImageBuildArgs = [
"-H:+ReportExceptionStackTraces"
"--no-fallback"
"--native-image-info"
];
installCheckPhase = ''
$out/bin/bb --version | grep '${version}'
$out/bin/bb '(+ 1 2)' | grep '3'
$out/bin/bb '(vec (dedupe *input*))' <<< '[1 1 1 1 2]' | grep '[1 2]'
'';
passthru.updateScript = writeScript "update-babashka" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts jq
set -euo pipefail
readonly latest_version="$(curl \
''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
-s "https://api.github.com/repos/babashka/babashka/releases/latest" \
| jq -r '.tag_name')"
# v0.6.2 -> 0.6.2
update-source-version babashka "''${latest_version/v/}"
'';
meta = with lib; {
description = "A Clojure babushka for the grey areas of Bash";
longDescription = ''
The main idea behind babashka is to leverage Clojure in places where you
would be using bash otherwise.
As one user described it:
Im quite at home in Bash most of the time, but theres a substantial
grey area of things that are too complicated to be simple in bash, but
too simple to be worth writing a clj/s script for. Babashka really
seems to hit the sweet spot for those cases.
Goals:
- Low latency Clojure scripting alternative to JVM Clojure.
- Easy installation: grab the self-contained binary and run. No JVM needed.
- Familiarity and portability:
- Scripts should be compatible with JVM Clojure as much as possible
- Scripts should be platform-independent as much as possible. Babashka
offers support for linux, macOS and Windows.
- Allow interop with commonly used classes like java.io.File and System
- Multi-threading support (pmap, future, core.async)
- Batteries included (tools.cli, cheshire, ...)
- Library support via popular tools like the clojure CLI
'';
homepage = "https://github.com/babashka/babashka";
changelog = "https://github.com/babashka/babashka/blob/v${version}/CHANGELOG.md";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.epl10;
maintainers = with maintainers; [
bandresen
bhougland
DerGuteMoritz
jlesquembre
thiagokokada
];
};
}

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "clooj";
version = "0.4.4";
jar = fetchurl {
# mirrored as original mediafire.com source does not work without user interaction
url = "https://archive.org/download/clooj-${version}-standalone/clooj-${version}-standalone.jar";
sha256 = "0hbc29bg2a86rm3sx9kvj7h7db9j0kbnrb706wsfiyk3zi3bavnd";
};
nativeBuildInputs = [ makeWrapper ];
dontUnpack = true;
installPhase = ''
mkdir -p $out/share/java
ln -s $jar $out/share/java/clooj.jar
makeWrapper ${jre}/bin/java $out/bin/clooj --add-flags "-jar $out/share/java/clooj.jar"
'';
meta = {
description = "A lightweight IDE for Clojure";
homepage = "https://github.com/arthuredelstein/clooj";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.bsd3;
platforms = lib.platforms.all;
};
}

View file

@ -0,0 +1,101 @@
{ lib, stdenv, fetchurl, installShellFiles, jdk, rlwrap, makeWrapper, writeScript }:
stdenv.mkDerivation rec {
pname = "clojure";
version = "1.11.1.1113";
src = fetchurl {
# https://clojure.org/releases/tools
url = "https://download.clojure.org/install/clojure-tools-${version}.tar.gz";
sha256 = "sha256-DJVKVqBx8zueA5+KuQX4NypaYBoNFKMuDM8jDqdgaiI=";
};
nativeBuildInputs = [
installShellFiles
makeWrapper
];
# See https://github.com/clojure/brew-install/blob/1.10.3/src/main/resources/clojure/install/linux-install.sh
installPhase =
let
binPath = lib.makeBinPath [ rlwrap jdk ];
in
''
runHook preInstall
clojure_lib_dir=$out
bin_dir=$out/bin
echo "Installing libs into $clojure_lib_dir"
install -Dm644 deps.edn "$clojure_lib_dir/deps.edn"
install -Dm644 example-deps.edn "$clojure_lib_dir/example-deps.edn"
install -Dm644 tools.edn "$clojure_lib_dir/tools.edn"
install -Dm644 exec.jar "$clojure_lib_dir/libexec/exec.jar"
install -Dm644 clojure-tools-${version}.jar "$clojure_lib_dir/libexec/clojure-tools-${version}.jar"
echo "Installing clojure and clj into $bin_dir"
substituteInPlace clojure --replace PREFIX $out
substituteInPlace clj --replace BINDIR $bin_dir
install -Dm755 clojure "$bin_dir/clojure"
install -Dm755 clj "$bin_dir/clj"
wrapProgram $bin_dir/clojure --prefix PATH : $out/bin:${binPath}
wrapProgram $bin_dir/clj --prefix PATH : $out/bin:${binPath}
installManPage clj.1 clojure.1
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
CLJ_CONFIG=$TMPDIR CLJ_CACHE=$TMPDIR/.clj_cache $out/bin/clojure \
-Spath \
-Sverbose \
-Scp $out/libexec/clojure-tools-${version}.jar
'';
passthru.updateScript = writeScript "update-clojure" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts jq
set -euo pipefail
# `jq -r '.[0].name'` results in `v0.0`
readonly latest_version="$(curl \
''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
-s "https://api.github.com/repos/clojure/brew-install/tags" \
| jq -r '.[1].name')"
update-source-version clojure "$latest_version"
'';
meta = with lib; {
description = "A Lisp dialect for the JVM";
homepage = "https://clojure.org/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.epl10;
longDescription = ''
Clojure is a dynamic programming language that targets the Java
Virtual Machine. It is designed to be a general-purpose language,
combining the approachability and interactive development of a
scripting language with an efficient and robust infrastructure for
multithreaded programming. Clojure is a compiled language - it
compiles directly to JVM bytecode, yet remains completely
dynamic. Every feature supported by Clojure is supported at
runtime. Clojure provides easy access to the Java frameworks, with
optional type hints and type inference, to ensure that calls to Java
can avoid reflection.
Clojure is a dialect of Lisp, and shares with Lisp the code-as-data
philosophy and a powerful macro system. Clojure is predominantly a
functional programming language, and features a rich set of immutable,
persistent data structures. When mutable state is needed, Clojure
offers a software transactional memory system and reactive Agent
system that ensure clean, correct, multithreaded designs.
'';
maintainers = with maintainers; [ jlesquembre thiagokokada ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,83 @@
{ lib
, stdenv
, fetchurl
, babashka
, cacert
, clojure
, git
, jdk
, obb
, fetchFromGitHub
, makeWrapper
, runCommand }:
stdenv.mkDerivation rec {
pname = "obb";
version = "0.0.2";
src = fetchFromGitHub {
owner = "babashka";
repo = pname;
rev = "v${version}";
sha256 = "1Gxh4IMtytQCuPS+BWOc5AgjEBxa43ebYfDsxLSPeY0=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ babashka cacert git jdk ];
configurePhase = ''
runHook preConfigure
mkdir -p .m2
substituteInPlace deps.edn --replace ':paths' ':mvn/local-repo "./.m2" :paths'
substituteInPlace bb.edn --replace ':paths' ':mvn/local-repo "./.m2" :paths'
echo deps.edn
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
export DEPS_CLJ_TOOLS_DIR=${clojure}
export DEPS_CLJ_TOOLS_VERSION=${clojure.version}
mkdir -p .gitlibs
mkdir -p .cpcache
export GITLIBS=.gitlibs
export CLJ_CACHE=.cpcache
bb build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
ln -s /usr/bin/osascript $out/bin/osascript
install -Dm755 "out/bin/obb" "$out/bin/obb"
wrapProgram $out/bin/obb --prefix PATH : $out/bin
runHook postInstall
'';
passthru.tests = {
simple = runCommand "${pname}-test" {} ''
[ $(${obb}/bin/obb -e '(+ 1 2)') = '3' ]
touch $out
'';
};
meta = with lib; {
description = "Ad-hoc ClojureScript scripting of Mac applications via Apple's Open Scripting Architecture";
homepage = "https://github.com/babashka/obb";
license = licenses.epl10;
maintainers = with maintainers; [
willcohen
];
platforms = platforms.darwin;
};
}

View file

@ -0,0 +1,51 @@
{ lib, stdenv, fetchFromGitHub, libck, darwin }:
let
version = "0.34.0";
bootstrap = stdenv.mkDerivation {
pname = "cyclone-bootstrap";
inherit version;
src = fetchFromGitHub {
owner = "justinethier";
repo = "cyclone-bootstrap";
rev = "v${version}";
sha256 = "sha256-kJBPb0Ej32HveY/vdGpH2gyxSwq8Xq7muneFIw3Y7hM=";
};
enableParallelBuilding = true;
nativeBuildInputs = lib.optionals stdenv.isDarwin [ darwin.cctools ];
buildInputs = [ libck ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
};
in
stdenv.mkDerivation {
pname = "cyclone";
inherit version;
src = fetchFromGitHub {
owner = "justinethier";
repo = "cyclone";
rev = "v${version}";
sha256 = "sha256-4U/uOTbFpPTC9BmO6Wkhy4PY8UCFVt5eHSGqrOlKT/U=";
};
enableParallelBuilding = true;
nativeBuildInputs = [ bootstrap ]
++ lib.optionals stdenv.isDarwin [ darwin.cctools ];
buildInputs = [ libck ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
meta = with lib; {
homepage = "https://justinethier.github.io/cyclone/";
description = "A brand-new compiler that allows practical application development using R7RS Scheme";
license = licenses.mit;
maintainers = with maintainers; [ siraben ];
};
}

View file

@ -0,0 +1,74 @@
{ stdenv
, lib
, fetchurl
, unzip
, version ? "2.17.0"
, sources ? let
base = "https://storage.googleapis.com/dart-archive/channels";
x86_64 = "x64";
i686 = "ia32";
aarch64 = "arm64";
# Make sure that if the user overrides version parameter they're
# also need to override sources, to avoid mistakes
version = "2.17.0";
in
{
"${version}-aarch64-darwin" = fetchurl {
url = "${base}/stable/release/${version}/sdk/dartsdk-macos-${aarch64}-release.zip";
sha256 = "sha256-WXf0SdSEHMaJRfVFgKzb9SY4LBjf1xO5Oki/dzKMEMY=";
};
"${version}-x86_64-darwin" = fetchurl {
url = "${base}/stable/release/${version}/sdk/dartsdk-macos-${x86_64}-release.zip";
sha256 = "sha256-PwaxUQHIUhRWCOy3IVdGtRyP9LtscqoUJPOZfevN7xs=";
};
"${version}-x86_64-linux" = fetchurl {
url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${x86_64}-release.zip";
sha256 = "sha256-V7j9lk5HyB1GeuuVsJmmcKt+j1ShzXTUW80f3HeRPYY=";
};
"${version}-i686-linux" = fetchurl {
url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${i686}-release.zip";
sha256 = "sha256-YWxFwbcGvssOSL4S5O4jqLzxdUHvbVd9i4cLNyFn/cs=";
};
"${version}-aarch64-linux" = fetchurl {
url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${aarch64}-release.zip";
sha256 = "sha256-BaHbD9hFhYd9YYCFg0bXxTx++JQzZn2zuF8/Ll+nA2s=";
};
}
}:
assert version != null && version != "";
assert sources != null && (builtins.isAttrs sources);
stdenv.mkDerivation {
pname = "dart";
inherit version;
nativeBuildInputs = [ unzip ];
src = sources."${version}-${stdenv.hostPlatform.system}" or (throw "unsupported version/system: ${version}/${stdenv.hostPlatform.system}");
installPhase = ''
mkdir -p $out
cp -R * $out/
echo $libPath
'' + lib.optionalString(stdenv.isLinux) ''
find $out/bin -executable -type f -exec patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) {} \;
'';
libPath = lib.makeLibraryPath [ stdenv.cc.cc ];
dontStrip = true;
meta = with lib; {
homepage = "https://www.dartlang.org/";
maintainers = with maintainers; [ grburst flexagoon ];
description = "Scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps";
longDescription = ''
Dart is a class-based, single inheritance, object-oriented language
with C-style syntax. It offers compilation to JavaScript, interfaces,
mixins, abstract classes, reified generics, and optional typing.
'';
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
license = licenses.bsd3;
};
}

View file

@ -0,0 +1,29 @@
{ buildDhallPackage, lib }:
# This is a minor variation on `buildDhallPackage` that splits the `code`
# argument into `src` and `file` in such a way that you can easily override
# the `file`
#
# This function is used by `dhall-to-nixpkgs` when given a directory
lib.makePackageOverridable
( { # Arguments passed through to `buildDhallPackage`
name
, dependencies ? []
, source ? false
, src
, # The file to import, relative to the root directory
file ? "package.dhall"
# Set to `true` to generate documentation for the package
, document ? false
}:
buildDhallPackage
( { inherit name dependencies source;
code = "${src}/${file}";
}
// lib.optionalAttrs document { documentationRoot = "${src}"; }
)
)

View file

@ -0,0 +1,62 @@
{ buildDhallPackage, fetchFromGitHub, lib }:
# This function is used by `dhall-to-nixpkgs` when given a GitHub repository
lib.makePackageOverridable
( { # Arguments passed through to `buildDhallPackage`
name
, dependencies ? []
, source ? false
, # The directory containing the Dhall files, if other than the root of the
# repository
directory ? ""
, # The file to import, relative to the above directory
file ? "package.dhall"
# Set to `true` to generate documentation for the package
, document ? false
# Arguments passed through to `fetchFromGitHub`
, owner
, repo
, rev
# Extra arguments passed through to `fetchFromGitHub`, such as the hash
# or `fetchSubmodules`
, ...
}@args:
let
versionedName = "${name}-${rev}";
src = fetchFromGitHub ({
name = "${versionedName}-source";
inherit owner repo rev;
} // removeAttrs args [
"name"
"dependencies"
"document"
"source"
"directory"
"file"
"owner"
"repo"
"rev"
]);
prefix = lib.optionalString (directory != "") "/${directory}";
in
buildDhallPackage
( { inherit dependencies source;
name = versionedName;
code = "${src}${prefix}/${file}";
}
// lib.optionalAttrs document
{ documentationRoot = "${src}/${prefix}";
baseImportUrl = "https://raw.githubusercontent.com/${owner}/${repo}/${rev}${prefix}";
}
)
)

View file

@ -0,0 +1,102 @@
{ dhall, dhall-docs, haskell, lib, lndir, runCommand, writeText }:
{ name
# Expressions to add to the cache before interpreting the code
, dependencies ? []
# A Dhall expression
#
# Carefully note that the following expression must be devoid of uncached HTTP
# imports. This is because the expression will be evaluated using an
# interpreter with HTTP support disabled, so all HTTP imports have to be
# protected by an integrity check that can be satisfied via cached
# dependencies.
#
# You can add a dependency to the cache using the preceding `dependencies`
# option
, code
# `buildDhallPackage` can include both a "source distribution" in
# `source.dhall` and a "binary distribution" in `binary.dhall`:
#
# * `source.dhall` is a dependency-free αβ-normalized Dhall expression
#
# * `binary.dhall` is an expression of the form: `missing sha256:${HASH}`
#
# This expression requires you to install the cache product located at
# `.cache/dhall/1220${HASH}` to successfully resolve
#
# By default, `buildDhallPackage` only includes "binary.dhall" to conserve
# space within the Nix store, but if you set the following `source` option to
# `true` then the package will also include `source.dhall`.
, source ? false
# Directory to generate documentation for (i.e. as the `--input` option to the
# `dhall-docs` command.)
#
# If `null`, then no documentation is generated.
, documentationRoot ? null
# Base URL prepended to paths copied to the clipboard
#
# This is used in conjunction with `documentationRoot`, and is unused if
# `documentationRoot` is `null`.
, baseImportUrl ? null
}:
let
# HTTP support is disabled in order to force that HTTP dependencies are built
# using Nix instead of using Dhall's support for HTTP imports.
dhallNoHTTP = haskell.lib.compose.appendConfigureFlag "-f-with-http" dhall;
file = writeText "${name}.dhall" code;
cache = ".cache";
data = ".local/share";
cacheDhall = "${cache}/dhall";
dataDhall = "${data}/dhall";
sourceFile = "source.dhall";
in
runCommand name { inherit dependencies; } ''
set -eu
mkdir -p ${cacheDhall}
for dependency in $dependencies; do
${lndir}/bin/lndir -silent $dependency/${cacheDhall} ${cacheDhall}
done
export XDG_CACHE_HOME=$PWD/${cache}
mkdir -p $out/${cacheDhall}
${dhallNoHTTP}/bin/dhall --alpha --file '${file}' > $out/${sourceFile}
SHA_HASH=$(${dhallNoHTTP}/bin/dhall hash <<< $out/${sourceFile})
HASH_FILE="''${SHA_HASH/sha256:/1220}"
${dhallNoHTTP}/bin/dhall encode --file $out/${sourceFile} > $out/${cacheDhall}/$HASH_FILE
echo "missing $SHA_HASH" > $out/binary.dhall
${lib.optionalString (!source) "rm $out/${sourceFile}"}
${lib.optionalString (documentationRoot != null) ''
mkdir -p $out/${dataDhall}
XDG_DATA_HOME=$out/${data} ${dhall-docs}/bin/dhall-docs --output-link $out/docs ${lib.cli.toGNUCommandLineShell { } {
base-import-url = baseImportUrl;
input = documentationRoot;
package-name = name;
}}
''}
''

View file

@ -0,0 +1,96 @@
{ cacert, dhall, dhall-docs, haskell, lib, runCommand }:
# `buildDhallUrl` is similar to `buildDhallDirectoryPackage` or
# `buildDhallGitHubPackage`, but instead builds a Nixpkgs Dhall package
# based on a hashed URL. This will generally be a URL that has an integrity
# check in a Dhall file.
#
# Similar to `buildDhallDirectoryPackage` and `buildDhallGitHubPackage`, the output
# of this function is a derivation that has a `binary.dhall` file, along with
# a `.cache/` directory with the actual contents of the Dhall file from the
# suppiled URL.
#
# This function is primarily used by `dhall-to-nixpkgs directory --fixed-output-derivations`.
{ # URL of the input Dhall file.
# example: "https://raw.githubusercontent.com/cdepillabout/example-dhall-repo/c1b0d0327146648dcf8de997b2aa32758f2ed735/example1.dhall"
url
# Nix hash of the input Dhall file.
# example: "sha256-ZTSiQUXpPbPfPvS8OeK6dDQE6j6NbP27ho1cg9YfENI="
, hash
# Dhall hash of the input Dhall file.
# example: "sha256:6534a24145e93db3df3ef4bc39e2ba743404ea3e8d6cfdbb868d5c83d61f10d2"
, dhallHash
# Name for this derivation.
, name ? (baseNameOf url + "-cache")
# `buildDhallUrl` can include both a "source distribution" in
# `source.dhall` and a "binary distribution" in `binary.dhall`:
#
# * `source.dhall` is a dependency-free αβ-normalized Dhall expression
#
# * `binary.dhall` is an expression of the form: `missing sha256:${HASH}`
#
# This expression requires you to install the cache product located at
# `.cache/dhall/1220${HASH}` to successfully resolve
#
# By default, `buildDhallUrl` only includes "binary.dhall" to conserve
# space within the Nix store, but if you set the following `source` option to
# `true` then the package will also include `source.dhall`.
, source ? false
}:
let
# HTTP support is disabled in order to force that HTTP dependencies are built
# using Nix instead of using Dhall's support for HTTP imports.
dhallNoHTTP = haskell.lib.appendConfigureFlag dhall "-f-with-http";
# This uses Dhall's remote importing capabilities for downloading a Dhall file.
# The output Dhall file has all imports resolved, and then is
# alpha-normalized and binary-encoded.
downloadedEncodedFile =
runCommand
(baseNameOf url)
{
outputHashAlgo = null;
outputHash = hash;
name = baseNameOf url;
nativeBuildInputs = [ cacert ];
}
''
echo "${url} ${dhallHash}" > in-dhall-file
${dhall}/bin/dhall --alpha --plain --file in-dhall-file | ${dhallNoHTTP}/bin/dhall encode > $out
'';
cache = ".cache";
data = ".local/share";
cacheDhall = "${cache}/dhall";
dataDhall = "${data}/dhall";
sourceFile = "source.dhall";
in
runCommand name { } (''
set -eu
mkdir -p ${cacheDhall} $out/${cacheDhall}
export XDG_CACHE_HOME=$PWD/${cache}
SHA_HASH="${dhallHash}"
HASH_FILE="''${SHA_HASH/sha256:/1220}"
cp ${downloadedEncodedFile} $out/${cacheDhall}/$HASH_FILE
echo "missing $SHA_HASH" > $out/binary.dhall
'' +
lib.optionalString source ''
${dhallNoHTTP}/bin/dhall decode --file ${downloadedEncodedFile} > $out/${sourceFile}
'')

View file

@ -0,0 +1,27 @@
{ dhall-nixpkgs, lib, stdenv }:
# This function calls `dhall-to-nixpkgs directory --fixed-output-derivations`
# within a Nix derivation.
#
# This is possible because
# `dhall-to-nixpkgs directory --fixed-output-derivations` will turn remote
# Dhall imports protected with Dhall integrity checksinto fixed-output
# derivations (with the `buildDhallUrl` function), so no unrestricted network
# access is necessary.
lib.makePackageOverridable
( { src
, # The file to import, relative to the root directory
file ? "package.dhall"
, # Set to `true` to generate documentation for the package
document ? false
}:
stdenv.mkDerivation {
name = "dhall-directory-package.nix";
buildCommand = ''
dhall-to-nixpkgs directory --fixed-output-derivations --file "${file}" "${src}" ${if document then "--document" else ""} > $out
'';
nativeBuildInputs = [ dhall-nixpkgs ];
}
)

View file

@ -0,0 +1,44 @@
{ lib, stdenv, fetchurl, validatePkgConfig }:
stdenv.mkDerivation rec {
pname = "duktape";
version = "2.7.0";
src = fetchurl {
url = "http://duktape.org/duktape-${version}.tar.xz";
sha256 = "sha256-kPjS+otVZ8aJmDDd7ywD88J5YLEayiIvoXqnrGE8KJA=";
};
nativeBuildInputs = [ validatePkgConfig ];
postPatch = ''
substituteInPlace Makefile.sharedlibrary \
--replace 'gcc' '${stdenv.cc.targetPrefix}cc' \
--replace 'g++' '${stdenv.cc.targetPrefix}c++'
substituteInPlace Makefile.cmdline \
--replace 'gcc' '${stdenv.cc.targetPrefix}cc' \
--replace 'g++' '${stdenv.cc.targetPrefix}c++'
'';
buildPhase = ''
make -f Makefile.sharedlibrary
make -f Makefile.cmdline
'';
installPhase = ''
install -d $out/bin
install -m755 duk $out/bin/
install -d $out/lib/pkgconfig
install -d $out/include
make -f Makefile.sharedlibrary install INSTALL_PREFIX=$out
substituteAll ${./duktape.pc.in} $out/lib/pkgconfig/duktape.pc
'';
enableParallelBuilding = true;
meta = with lib; {
description = "An embeddable Javascript engine, with a focus on portability and compact footprint";
homepage = "https://duktape.org/";
downloadPage = "https://duktape.org/download.html";
license = licenses.mit;
maintainers = [ maintainers.fgaz ];
mainProgram = "duk";
platforms = platforms.all;
};
}

View file

@ -0,0 +1,10 @@
prefix=@out@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: duktape
Description: An embeddable Javascript engine, with a focus on portability and compact footprint
Version: @version@
Libs: -L${libdir} -lduktape
Cflags: -I${includedir}

View file

@ -0,0 +1,71 @@
{ lib
, stdenv
, fetchFromGitHub
, jdk
, makeWrapper
, buildNativeImage ? true
}:
stdenv.mkDerivation rec {
pname = "dapl" + lib.optionalString buildNativeImage "-native";
version = "0.2.0+date=2021-10-16";
src = fetchFromGitHub {
owner = "dzaima";
repo = "APL";
rev = "5eb0a4205e27afa6122096a25008474eec562dc0";
hash = "sha256-UdumMytqT909JRpNqzhYPuKPw644m/vRUsEbIVF2a7U=";
};
nativeBuildInputs = [
jdk
makeWrapper
];
dontConfigure = true;
postPatch = ''
patchShebangs --build ./build
'';
buildPhase = ''
runHook preBuild
./build
'' + lib.optionalString buildNativeImage ''
native-image --report-unsupported-elements-at-runtime \
-H:CLibraryPath=${lib.getLib jdk}/lib -J-Dfile.encoding=UTF-8 \
-jar APL.jar dapl
'' + ''
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
'' + (if buildNativeImage then ''
mv dapl $out/bin
'' else ''
mkdir -p $out/share/${pname}
mv APL.jar $out/share/${pname}/
makeWrapper "${lib.getBin jdk}/bin/java" "$out/bin/dapl" \
--add-flags "-jar $out/share/${pname}/APL.jar"
'') + ''
ln -s $out/bin/dapl $out/bin/apl
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/dzaima/APL";
description = "An APL implementation in Java" + lib.optionalString buildNativeImage ", compiled as a native image";
license = licenses.mit;
maintainers = with maintainers; [ AndersonTorres ];
inherit (jdk.meta) platforms;
broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dapl-native.x86_64-darwin
};
}
# TODO: Processing app
# TODO: minimalistic JDK

View file

@ -0,0 +1,38 @@
{ lib, stdenv, fetchFromGitHub, which, ocamlPackages }:
stdenv.mkDerivation rec {
pname = "eff";
version = "5.0";
src = fetchFromGitHub {
owner = "matijapretnar";
repo = "eff";
rev = "v${version}";
sha256 = "1fslfj5d7fhj3f7kh558b8mk5wllwyq4rnhfkyd96fpy144sdcka";
};
postPatch = ''
substituteInPlace setup.ml --replace js_of_ocaml.ocamlbuild js_of_ocaml-ocamlbuild
'';
buildInputs = [ which ] ++ (with ocamlPackages; [
ocaml findlib ocamlbuild menhir js_of_ocaml js_of_ocaml-ocamlbuild
]);
doCheck = true;
checkTarget = "test";
meta = with lib; {
homepage = "https://www.eff-lang.org";
description = "A functional programming language based on algebraic effects and their handlers";
longDescription = ''
Eff is a functional language with handlers of not only exceptions,
but also of other computational effects such as state or I/O. With
handlers, you can simply implement transactions, redirections,
backtracking, multi-threading, and much more...
'';
license = licenses.bsd2;
inherit (ocamlPackages.ocaml.meta) platforms;
maintainers = [ maintainers.jirkamarsik ];
};
}

View file

@ -0,0 +1,9 @@
{ mkDerivation }:
# How to obtain `sha256`:
# nix-prefetch-url --unpack https://github.com/elixir-lang/elixir/archive/v${version}.tar.gz
mkDerivation {
version = "1.10.4";
sha256 = "16j4rmm3ix088fvxhvyjqf1hnfg7wiwa87gml3b2mrwirdycbinv";
minimumOTPVersion = "21";
}

View file

@ -0,0 +1,9 @@
{ mkDerivation }:
# How to obtain `sha256`:
# nix-prefetch-url --unpack https://github.com/elixir-lang/elixir/archive/v${version}.tar.gz
mkDerivation {
version = "1.11.4";
sha256 = "sha256-qCX6hRWUbW+E5xaUhcYxRAnhnvncASUJck8lESlcDvk=";
minimumOTPVersion = "21";
}

View file

@ -0,0 +1,9 @@
{ mkDerivation }:
# How to obtain `sha256`:
# nix-prefetch-url --unpack https://github.com/elixir-lang/elixir/archive/v${version}.tar.gz
mkDerivation {
version = "1.12.3";
sha256 = "sha256-Jo9ZC5cSBVpjVnGZ8tEIUKOhW9uvJM/h84+VcnrT0R0=";
minimumOTPVersion = "22";
}

View file

@ -0,0 +1,9 @@
{ mkDerivation }:
# How to obtain `sha256`:
# nix-prefetch-url --unpack https://github.com/elixir-lang/elixir/archive/v${version}.tar.gz
mkDerivation {
version = "1.13.4";
sha256 = "sha256-xGKq62wzaIfgZN2j808fL3b8ykizQVPuePWzsy2HKfw=";
minimumOTPVersion = "22";
}

View file

@ -0,0 +1,9 @@
{ mkDerivation }:
# How to obtain `sha256`:
# nix-prefetch-url --unpack https://github.com/elixir-lang/elixir/archive/v${version}.tar.gz
mkDerivation {
version = "1.9.4";
sha256 = "1l4318g35y4h0vi2w07ayc3jizw1xc3s7hdb47w6j3iw33y06g6b";
minimumOTPVersion = "20";
}

View file

@ -0,0 +1,79 @@
{ pkgs
, lib
, stdenv
, fetchFromGitHub
, erlang
, makeWrapper
, coreutils
, curl
, bash
, debugInfo ? false
}:
{ baseName ? "elixir"
, version
, minimumOTPVersion
, sha256 ? null
, rev ? "v${version}"
, src ? fetchFromGitHub { inherit rev sha256; owner = "elixir-lang"; repo = "elixir"; }
} @ args:
let
inherit (lib) getVersion versionAtLeast optional;
in
assert versionAtLeast (getVersion erlang) minimumOTPVersion;
stdenv.mkDerivation ({
pname = "${baseName}";
inherit src version debugInfo;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ erlang ];
LANG = "C.UTF-8";
LC_TYPE = "C.UTF-8";
buildFlags = optional debugInfo "ERL_COMPILER_OPTIONS=debug_info";
preBuild = ''
patchShebangs lib/elixir/generate_app.escript || true
substituteInPlace Makefile \
--replace "/usr/local" $out
'';
postFixup = ''
# Elixir binaries are shell scripts which run erl. Add some stuff
# to PATH so the scripts can run without problems.
for f in $out/bin/*; do
b=$(basename $f)
if [ "$b" = mix ]; then continue; fi
wrapProgram $f \
--prefix PATH ":" "${lib.makeBinPath [ erlang coreutils curl bash ]}"
done
substituteInPlace $out/bin/mix \
--replace "/usr/bin/env elixir" "${coreutils}/bin/env elixir"
'';
pos = builtins.unsafeGetAttrPos "sha256" args;
meta = with lib; {
homepage = "https://elixir-lang.org/";
description = "A functional, meta-programming aware language built on top of the Erlang VM";
longDescription = ''
Elixir is a functional, meta-programming aware language built on
top of the Erlang VM. It is a dynamic language with flexible
syntax and macro support that leverages Erlang's abilities to
build concurrent, distributed and fault-tolerant applications
with hot code upgrades.
'';
license = licenses.epl10;
platforms = platforms.unix;
maintainers = teams.beam.members;
};
})

View file

@ -0,0 +1,65 @@
{ pkgs, mkDerivation }:
mkDerivation {
baseName = "erlang";
version = "16B02.basho10";
src = pkgs.fetchFromGitHub {
owner = "basho";
repo = "otp";
rev = "OTP_R16B02_basho10";
sha256 = "1s2c3ag9dnp6xmcr27kh95n1w50xly97n1mp8ivc2a3gpv4blqmj";
};
preConfigure = ''
export HOME=$PWD/../
export LANG=C
export ERL_TOP=$(pwd)
sed -e s@/bin/pwd@pwd@g -i otp_build
sed -e s@"/usr/bin/env escript"@$(pwd)/bootstrap/bin/escript@g -i lib/diameter/bin/diameterc
./otp_build autoconf
'';
enableHipe = false;
# Do not install docs, instead use prebuilt versions.
installTargets = "install";
postInstall = let
manpages = pkgs.fetchurl {
url = "https://www.erlang.org/download/otp_doc_man_R16B02.tar.gz";
sha256 = "12apxjmmd591y9g9bhr97z5jbd1jarqg7wj0y2sqhl21hc1yp75p";
};
in ''
sed -e s@$(pwd)/bootstrap/bin/escript@$out/bin/escript@g -i $out/lib/erlang/lib/diameter-1.4.3/bin/diameterc
tar xf "${manpages}" -C "$out/lib/erlang"
for i in "$out"/lib/erlang/man/man[0-9]/*.[0-9]; do
prefix="''${i%/*}"
mkdir -p "$out/share/man/''${prefix##*/}"
ln -s "$i" "$out/share/man/''${prefix##*/}/''${i##*/}erl"
done
'';
meta = {
homepage = "https://github.com/basho/otp/";
description = "Programming language used for massively scalable soft real-time systems, Basho fork";
longDescription = ''
Erlang is a programming language used to build massively scalable
soft real-time systems with requirements on high availability.
Some of its uses are in telecoms, banking, e-commerce, computer
telephony and instant messaging. Erlang's runtime system has
built-in support for concurrency, distribution and fault
tolerance.
This version of Erlang is Basho's version, forked from Ericsson's
repository.
'';
knownVulnerabilities = [ "CVE-2017-1000385" ];
platforms = ["x86_64-linux" "x86_64-darwin"];
license = pkgs.lib.licenses.asl20;
maintainers = with pkgs.lib.maintainers; [ mdaiter ];
};
}

View file

@ -0,0 +1,6 @@
{ mkDerivation }:
mkDerivation {
version = "21.3.8.24";
sha256 = "sha256-FNs+M4KFFKzfb4EG513HtyQ9eRRtxSPMpYq0bmRgY3g=";
}

View file

@ -0,0 +1,8 @@
{ mkDerivation }:
# How to obtain `sha256`:
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz
mkDerivation {
version = "22.3.4.24";
sha256 = "0c9713xa8sjw7nr55hysgcnbvj7gzbrpzdl94y1nqn7vw4ni8is3";
}

View file

@ -0,0 +1,8 @@
{ mkDerivation }:
# How to obtain `sha256`:
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz
mkDerivation {
version = "23.3.4.10";
sha256 = "0sfz7n748hvhmcygnvb6h31ag35p59aaa9h8gdpqsh6p4hnjh1mf";
}

View file

@ -0,0 +1,8 @@
{ mkDerivation }:
# How to obtain `sha256`:
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz
mkDerivation {
version = "24.2";
sha256 = "10s57v2i2qqyg3gddm85n3crzrkikl4zfwgzqmxjzdynsyb4xg68";
}

View file

@ -0,0 +1,8 @@
{ mkDerivation }:
# How to obtain `sha256`:
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz
mkDerivation {
version = "25.0";
sha256 = "1nf72yiirdpxcs8m10xc04ryghxxc73x954x38m5a6fhv2hfhp2n";
}

View file

@ -0,0 +1,207 @@
{ pkgs
, lib
, stdenv
, fetchFromGitHub
, makeWrapper
, gawk
, gnum4
, gnused
, libxml2
, libxslt
, ncurses
, openssl
, perl
, autoconf
, openjdk11 ? null # javacSupport
, unixODBC ? null # odbcSupport
, libGL ? null
, libGLU ? null
, wxGTK ? null
, wxmac ? null
, xorg ? null
, parallelBuild ? false
, systemd
, wxSupport ? true
, systemdSupport ? stdenv.isLinux # systemd support in epmd
# updateScript deps
, writeScript
, common-updater-scripts
, coreutils
, git
}:
{ baseName ? "erlang"
, version
, sha256 ? null
, rev ? "OTP-${version}"
, src ? fetchFromGitHub { inherit rev sha256; owner = "erlang"; repo = "otp"; }
, enableHipe ? true
, enableDebugInfo ? false
, enableThreads ? true
, enableSmpSupport ? true
, enableKernelPoll ? true
, javacSupport ? false
, javacPackages ? [ openjdk11 ]
, odbcSupport ? false
, odbcPackages ? [ unixODBC ]
, opensslPackage ? openssl
, wxPackages ? [ libGL libGLU wxGTK xorg.libX11 ]
, preUnpack ? ""
, postUnpack ? ""
, patches ? [ ]
, patchPhase ? ""
, prePatch ? ""
, postPatch ? ""
, configureFlags ? [ ]
, configurePhase ? ""
, preConfigure ? ""
, postConfigure ? ""
, buildPhase ? ""
, preBuild ? ""
, postBuild ? ""
, installPhase ? ""
, preInstall ? ""
, postInstall ? ""
, installTargets ? [ "install" "install-docs" ]
, checkPhase ? ""
, preCheck ? ""
, postCheck ? ""
, fixupPhase ? ""
, preFixup ? ""
, postFixup ? ""
, meta ? { }
}:
assert wxSupport -> (if stdenv.isDarwin
then wxmac != null
else libGL != null && libGLU != null && wxGTK != null && xorg != null);
assert odbcSupport -> unixODBC != null;
assert javacSupport -> openjdk11 != null;
let
inherit (lib) optional optionals optionalAttrs optionalString;
wxPackages2 = if stdenv.isDarwin then [ wxmac ] else wxPackages;
in
stdenv.mkDerivation ({
# name is used instead of pname to
# - not have to pass pnames as argument
# - have a separate pname for erlang (main module)
name = "${baseName}"
+ optionalString javacSupport "_javac"
+ optionalString odbcSupport "_odbc"
+ "-${version}";
inherit src version;
nativeBuildInputs = [ autoconf makeWrapper perl gnum4 libxslt libxml2 ];
buildInputs = [ ncurses opensslPackage ]
++ optionals wxSupport wxPackages2
++ optionals odbcSupport odbcPackages
++ optionals javacSupport javacPackages
++ optional systemdSupport systemd
++ optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [ AGL Carbon Cocoa WebKit ]);
debugInfo = enableDebugInfo;
# On some machines, parallel build reliably crashes on `GEN asn1ct_eval_ext.erl` step
enableParallelBuilding = parallelBuild;
postPatch = ''
patchShebangs make
${postPatch}
'';
preConfigure = ''
./otp_build autoconf
'';
configureFlags = [ "--with-ssl=${lib.getOutput "out" opensslPackage}" ]
++ [ "--with-ssl-incl=${lib.getDev opensslPackage}" ] # This flag was introduced in R24
++ optional enableThreads "--enable-threads"
++ optional enableSmpSupport "--enable-smp-support"
++ optional enableKernelPoll "--enable-kernel-poll"
++ optional enableHipe "--enable-hipe"
++ optional javacSupport "--with-javac"
++ optional odbcSupport "--with-odbc=${unixODBC}"
++ optional wxSupport "--enable-wx"
++ optional systemdSupport "--enable-systemd"
++ optional stdenv.isDarwin "--enable-darwin-64bit"
++ configureFlags;
# install-docs will generate and install manpages and html docs
# (PDFs are generated only when fop is available).
postInstall = ''
ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call
${postInstall}
'';
# Some erlang bin/ scripts run sed and awk
postFixup = ''
wrapProgram $out/lib/erlang/bin/erl --prefix PATH ":" "${gnused}/bin/"
wrapProgram $out/lib/erlang/bin/start_erl --prefix PATH ":" "${lib.makeBinPath [ gnused gawk ]}"
'';
passthru = {
updateScript =
let major = builtins.head (builtins.splitVersion version);
in
writeScript "update.sh" ''
#!${stdenv.shell}
set -ox errexit
PATH=${lib.makeBinPath [ common-updater-scripts coreutils git gnused ]}
latest=$(list-git-tags --url=https://github.com/erlang/otp.git | sed -n 's/^OTP-${major}/${major}/p' | sort -V | tail -1)
if [ "$latest" != "${version}" ]; then
nixpkgs="$(git rev-parse --show-toplevel)"
nix_file="$nixpkgs/pkgs/development/interpreters/erlang/R${major}.nix"
update-source-version ${baseName}R${major} "$latest" --version-key=version --print-changes --file="$nix_file"
else
echo "${baseName}R${major} is already up-to-date"
fi
'';
};
meta = with lib; ({
homepage = "https://www.erlang.org/";
downloadPage = "https://www.erlang.org/download.html";
description = "Programming language used for massively scalable soft real-time systems";
longDescription = ''
Erlang is a programming language used to build massively scalable
soft real-time systems with requirements on high availability.
Some of its uses are in telecoms, banking, e-commerce, computer
telephony and instant messaging. Erlang's runtime system has
built-in support for concurrency, distribution and fault
tolerance.
'';
platforms = platforms.unix;
maintainers = teams.beam.members;
license = licenses.asl20;
} // meta);
}
// optionalAttrs (preUnpack != "") { inherit preUnpack; }
// optionalAttrs (postUnpack != "") { inherit postUnpack; }
// optionalAttrs (patches != [ ]) { inherit patches; }
// optionalAttrs (prePatch != "") { inherit prePatch; }
// optionalAttrs (patchPhase != "") { inherit patchPhase; }
// optionalAttrs (configurePhase != "") { inherit configurePhase; }
// optionalAttrs (preConfigure != "") { inherit preConfigure; }
// optionalAttrs (postConfigure != "") { inherit postConfigure; }
// optionalAttrs (buildPhase != "") { inherit buildPhase; }
// optionalAttrs (preBuild != "") { inherit preBuild; }
// optionalAttrs (postBuild != "") { inherit postBuild; }
// optionalAttrs (checkPhase != "") { inherit checkPhase; }
// optionalAttrs (preCheck != "") { inherit preCheck; }
// optionalAttrs (postCheck != "") { inherit postCheck; }
// optionalAttrs (installPhase != "") { inherit installPhase; }
// optionalAttrs (installTargets != [ ]) { inherit installTargets; }
// optionalAttrs (preInstall != "") { inherit preInstall; }
// optionalAttrs (fixupPhase != "") { inherit fixupPhase; }
// optionalAttrs (preFixup != "") { inherit preFixup; }
// optionalAttrs (postFixup != "") { inherit postFixup; }
)

View file

@ -0,0 +1,41 @@
{ cargo, fetchFromGitHub, makeWrapper, pkg-config, rustPlatform, lib, stdenv
, gcc, cmake, libiconv, CoreServices, Security }:
rustPlatform.buildRustPackage rec {
pname = "evcxr";
version = "0.12.0";
src = fetchFromGitHub {
owner = "google";
repo = "evcxr";
rev = "v${version}";
sha256 = "sha256-sD/eykXoeJq43o3xyFx2VIoH+xZrMmb6vZKVt4CO7B4=";
};
cargoSha256 = "sha256-eySdhzavm9NGv2xjgdq/C2iv6lxdulhgYNs9ehnSzKQ=";
RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
nativeBuildInputs = [ pkg-config makeWrapper cmake ];
buildInputs = lib.optionals stdenv.isDarwin
[ libiconv CoreServices Security ];
postInstall = let
wrap = exe: ''
wrapProgram $out/bin/${exe} \
--prefix PATH : ${lib.makeBinPath [ cargo gcc ]} \
--set-default RUST_SRC_PATH "$RUST_SRC_PATH"
'';
in ''
${wrap "evcxr"}
${wrap "evcxr_jupyter"}
rm $out/bin/testing_runtime
'';
meta = with lib; {
description = "An evaluation context for Rust";
homepage = "https://github.com/google/evcxr";
license = licenses.asl20;
maintainers = with maintainers; [ protoben ma27 ];
};
}

View file

@ -0,0 +1,27 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, pcre, zlib, sqlite }:
stdenv.mkDerivation {
pname = "falcon";
version = "unstable-2018-10-23";
src = fetchFromGitHub {
owner = "falconpl";
repo = "falcon";
rev = "637e2d5cd950a874496042993c02ab7d17c1b688";
sha256 = "iCyvvZJjXb1CR396EJ6GiP6d4e7iAc6QQlAOQoAfehg=";
};
# -Wnarrowing is enabled by default in recent GCC versions,
# causing compilation to fail.
NIX_CFLAGS_COMPILE = "-Wno-narrowing";
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ pcre zlib sqlite ];
meta = with lib; {
description = "Programming language with macros and syntax at once";
license = licenses.gpl2Only;
maintainers = with maintainers; [ pSub ];
platforms = with platforms; unix;
};
}

View file

@ -0,0 +1,43 @@
{ stdenv, lib, fetchurl, pkg-config, texinfo, libiconv, gdbm, openssl, zlib
, mbedtls, cacert }:
stdenv.mkDerivation rec {
pname = "gauche-bootstrap";
version = "0.9.9";
src = fetchurl {
url = "mirror://sourceforge/gauche/Gauche-${version}.tgz";
sha256 = "1yzpszhw52vkpr65r5d4khf3489mnnvnw58dd2wsvvx7499k5aac";
};
nativeBuildInputs = [ pkg-config texinfo ];
buildInputs = [ libiconv gdbm openssl zlib mbedtls cacert ];
postPatch = ''
patchShebangs .
'';
configureFlags = [
"--with-iconv=${libiconv}"
"--with-dbm=gdbm"
"--with-zlib=${zlib}"
"--with-ca-bundle=${cacert}/etc/ssl/certs/ca-bundle.crt"
# TODO: Enable slib
# Current slib in nixpkgs is specialized to Guile
# "--with-slib=${slibGuile}/lib/slib"
];
enableParallelBuilding = true;
# TODO: Fix tests that fail in sandbox build
doCheck = false;
meta = with lib; {
description = "R7RS Scheme scripting engine";
homepage = "https://practical-scheme.net/gauche/";
maintainers = with maintainers; [ mnacamura ];
license = licenses.bsd3;
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,50 @@
{ stdenv, lib, fetchFromGitHub, autoreconfHook, gaucheBootstrap, pkg-config, texinfo
, libiconv, gdbm, openssl, zlib, mbedtls, cacert }:
stdenv.mkDerivation rec {
pname = "gauche";
version = "0.9.10";
src = fetchFromGitHub {
owner = "shirok";
repo = pname;
rev = "release${lib.replaceChars [ "." ] [ "_" ] version}";
sha256 = "0ki1w7sa10ivmg51sqjskby0gsznb0d3738nz80x589033km5hmb";
};
nativeBuildInputs = [ gaucheBootstrap pkg-config texinfo autoreconfHook ];
buildInputs = [ libiconv gdbm openssl zlib mbedtls cacert ];
autoreconfPhase = ''
./DIST gen
'';
postPatch = ''
patchShebangs .
'';
configureFlags = [
"--with-iconv=${libiconv}"
"--with-dbm=gdbm"
"--with-zlib=${zlib}"
"--with-ca-bundle=${cacert}/etc/ssl/certs/ca-bundle.crt"
# TODO: Enable slib
# Current slib in nixpkgs is specialized to Guile
# "--with-slib=${slibGuile}/lib/slib"
];
enableParallelBuilding = true;
# TODO: Fix tests that fail in sandbox build
doCheck = false;
meta = with lib; {
description = "R7RS Scheme scripting engine";
homepage = "https://practical-scheme.net/gauche/";
maintainers = with maintainers; [ mnacamura ];
license = licenses.bsd3;
platforms = platforms.unix;
broken = stdenv.isDarwin;
};
}

View file

@ -0,0 +1,51 @@
{ lib, stdenv, fetchurl, readline, gettext, ncurses }:
stdenv.mkDerivation rec {
pname = "gnu-apl";
version = "1.8";
src = fetchurl {
url = "mirror://gnu/apl/apl-${version}.tar.gz";
sha256 = "1jxvv2h3y1am1fw6r5sn3say1n0dj8shmscbybl0qhqdia2lqkql";
};
buildInputs = [ readline gettext ncurses ];
NIX_CFLAGS_COMPILE = with lib; toString ((optionals stdenv.cc.isGNU [
# Needed with GCC 8
"-Wno-error=int-in-bool-context"
"-Wno-error=class-memaccess"
"-Wno-error=restrict"
"-Wno-error=format-truncation"
# Needed with GCC 10
"-Wno-error=maybe-uninitialized"
# Needed with GCC 11
"-Wno-error=misleading-indentation"
]) ++ optional stdenv.cc.isClang "-Wno-error=null-dereference");
patchPhase = lib.optionalString stdenv.isDarwin ''
substituteInPlace src/LApack.cc --replace "malloc.h" "malloc/malloc.h"
'';
postInstall = ''
cp -r support-files/ $out/share/doc/
find $out/share/doc/support-files -name 'Makefile*' -delete
'';
meta = with lib; {
broken = stdenv.isDarwin;
description = "Free interpreter for the APL programming language";
homepage = "https://www.gnu.org/software/apl/";
license = licenses.gpl3Plus;
maintainers = [ maintainers.kovirobi ];
platforms = with platforms; linux ++ darwin;
mainProgram = "apl";
longDescription = ''
GNU APL is a free interpreter for the programming language APL, with an
(almost) complete implementation of ISO standard 13751 aka. Programming
Language APL, Extended. GNU APL was written and is being maintained by
Jürgen Sauermann.
'';
};
}

View file

@ -0,0 +1,203 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, wrapGAppsHook
, readline
, ncurses
, zlib
, gsl
, openmp
, graphicsmagick
, fftw
, fftwFloat
, fftwLongDouble
, proj
, shapelib
, expat
, udunits
, eigen
, pslib
, eccodes
, glpk
, libpng
, plplot
, libtiff
, libgeotiff
, libjpeg
# We enable it in hdf4 and use libtirpc as a dependency here from the passthru
# of hdf4
, enableLibtirpc ? stdenv.isLinux
, libtirpc
, python3
, enableMPI ? (stdenv.isLinux || stdenv.isDarwin)
# Choose MPICH over OpenMPI because it currently builds on AArch and Darwin
, mpi
# Unfree optional dependency for hdf4 and hdf5
, enableSzip ? false
, szip
, enableHDF4 ? true
, hdf4
, hdf4-forced ? null
, enableHDF5 ? true
# HDF5 format version (API version) 1.10 and 1.12 is not fully compatible
# Specify if the API version should default to 1.10
# netcdf currently depends on hdf5 with `usev110Api=true`
# If you wish to use HDF5 API version 1.12 (`useHdf5v110Api=false`),
# you will need to turn NetCDF off.
, useHdf5v110Api ? true
, hdf5
, hdf5-forced ? null
, enableNetCDF ? true
, netcdf
, netcdf-forced ? null
, plplot-forced ? null
# wxWidgets is preferred over X11 for this project but we only have it on Linux
# and Darwin. Also, we use the wxWidgets dependency here from the passthru of
# plplot.
, enableWX ? (stdenv.isLinux || stdenv.isDarwin)
# X11: OFF by default for platform consistency. Use X where WX is not available
, enableXWin ? (!stdenv.isLinux && !stdenv.isDarwin)
}:
let
hdf4-custom =
if hdf4-forced != null
then hdf4-forced
else
hdf4.override {
uselibtirpc = enableLibtirpc;
szipSupport = enableSzip;
inherit szip;
};
hdf5-custom =
if hdf5-forced != null
then hdf5-forced
else
hdf5.override {
usev110Api = useHdf5v110Api;
mpiSupport = enableMPI;
inherit mpi;
szipSupport = enableSzip;
inherit szip;
};
netcdf-custom =
if netcdf-forced != null
then netcdf-forced
else
netcdf.override {
hdf5 = hdf5-custom;
};
enablePlplotDrivers = enableWX || enableXWin;
plplot-with-drivers =
if plplot-forced != null
then plplot-forced
else
plplot.override {
inherit
enableWX
enableXWin
;
};
in
stdenv.mkDerivation rec {
pname = "gnudatalanguage";
version = "1.0.1";
src = fetchFromGitHub {
owner = pname;
repo = "gdl";
rev = "v${version}";
sha256 = "sha256-IrCLL8MQp0SkWj7sbfZlma5FrnMbgdl4E/1nPGy0Y60=";
};
buildInputs = [
readline
ncurses
zlib
gsl
openmp
graphicsmagick
fftw
fftwFloat
fftwLongDouble
proj
shapelib
expat
mpi
udunits
eigen
pslib
eccodes
glpk
libpng
libtiff
libgeotiff
libjpeg
hdf4-custom
hdf5-custom
netcdf-custom
plplot-with-drivers
] ++ lib.optional enableXWin plplot-with-drivers.libX11
++ lib.optional enableWX plplot-with-drivers.wxWidgets
++ lib.optional enableMPI mpi
++ lib.optional enableLibtirpc hdf4-custom.libtirpc
++ lib.optional enableSzip szip;
propagatedBuildInputs = [
(python3.withPackages (ps: with ps; [ numpy ]))
];
nativeBuildInputs = [
cmake
] ++ lib.optional enableWX wrapGAppsHook;
cmakeFlags = lib.optional (!enableHDF4) "-DHDF=OFF"
++ [ (if enableHDF5 then "-DHDF5DIR=${hdf5-custom}" else "-DHDF5=OFF") ]
++ lib.optional (!enableNetCDF) "-DNETCDF=OFF"
++ lib.optional (!enablePlplotDrivers) "-DINTERACTIVE_GRAPHICS=OFF"
++ lib.optional (!enableWX) "-DWXWIDGETS=OFF"
++ lib.optional enableSzip "-DSZIPDIR=${szip}"
++ lib.optionals enableXWin [ "-DX11=ON" "-DX11DIR=${plplot-with-drivers.libX11}" ]
++ lib.optionals enableMPI [ "-DMPI=ON" "-DMPIDIR=${mpi}" ];
doCheck = true;
# Opt-out unstable tests
# https://github.com/gnudatalanguage/gdl/issues/482
# https://github.com/gnudatalanguage/gdl/issues/1079
# https://github.com/gnudatalanguage/gdl/issues/460
preCheck = ''
checkFlagsArray+=("ARGS=-E 'test_tic_toc.pro|test_byte_conversion.pro|test_bytscl.pro|test_call_external.pro'")
'';
passthru = {
hdf4 = hdf4-custom;
hdf5 = hdf5-custom;
netcdf = netcdf-custom;
plplot = plplot-with-drivers;
python = python3;
inherit
enableMPI
mpi
useHdf5v110Api
enableSzip
enableWX
enableXWin
;
};
meta = with lib; {
description = "Free incremental compiler of IDL";
longDescription = ''
GDL (GNU Data Language) is a free/libre/open source incremental compiler
compatible with IDL (Interactive Data Language) and to some extent with PV-WAVE.
GDL is aimed as a drop-in replacement for IDL.
'';
homepage = "https://github.com/gnudatalanguage/gdl";
license = licenses.gpl2Only;
maintainers = with maintainers; [ ShamrockLee ];
platforms = platforms.all;
mainProgram = "gdl";
};
}

View file

@ -0,0 +1,39 @@
{ lib, stdenv, fetchurl, unzip, which, makeWrapper, jdk }:
# at runtime, need jdk
stdenv.mkDerivation rec {
pname = "groovy";
version = "3.0.7";
src = fetchurl {
url = "http://dl.bintray.com/groovy/maven/apache-groovy-binary-${version}.zip";
sha256 = "1xdpjqx7qaq0syw448b32q36g12pgh1hn6knyqi3k5isp0f09qmr";
};
nativeBuildInputs = [ makeWrapper unzip ];
installPhase = ''
mkdir -p $out
mkdir -p $out/share/doc/groovy
rm bin/*.bat
mv {bin,conf,grooid,indy,lib} $out
mv {licenses,LICENSE,NOTICE} $out/share/doc/groovy
sed -i 's#which#${which}/bin/which#g' $out/bin/startGroovy
for p in grape java2groovy groovy{,doc,c,sh,Console}; do
wrapProgram $out/bin/$p \
--set JAVA_HOME "${jdk}" \
--prefix PATH ":" "${jdk}/bin"
done
'';
meta = with lib; {
description = "An agile dynamic language for the Java Platform";
homepage = "http://groovy-lang.org/";
license = licenses.asl20;
maintainers = with maintainers; [ pSub ];
platforms = with platforms; unix;
};
}

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchurl
, glib
, gtk3
, libffcall
, pkg-config
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "gtk-server";
version = "2.4.5";
src = fetchurl {
url = "https://www.gtk-server.org/stable/gtk-server-${version}.tar.gz";
sha256 = "0vlx5ibvc7hyc8yipjgvrx1azvmh42i9fv1khg3dvn09nrdkrc7f";
};
preConfigure = ''
cd src
'';
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
buildInputs = [ libffcall glib gtk3 ];
configureOptions = [ "--with-gtk3" ];
meta = with lib; {
description = "gtk-server for interpreted GUI programming";
homepage = "http://www.gtk-server.org/";
license = licenses.gpl2Plus;
maintainers = [ maintainers.tohl ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,104 @@
{ lib
, stdenv
, fetchurl
, buildPackages
, gawk
, gmp
, libtool
, makeWrapper
, pkg-config
, pkgsBuildBuild
, readline
}:
stdenv.mkDerivation rec {
pname = "guile";
version = "1.8.8";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
sha256 = "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3";
};
outputs = [ "out" "dev" "info" ];
setOutputFlags = false; # $dev gets into the library otherwise
# GCC 4.6 raises a number of set-but-unused warnings.
configureFlags = [
"--disable-error-on-warning"
]
# Guile needs patching to preset results for the configure tests about
# pthreads, which work only in native builds.
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
"--with-threads=no";
depsBuildBuild = [
buildPackages.stdenv.cc
]
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
pkgsBuildBuild.guile_1_8;
nativeBuildInputs = [
makeWrapper
pkg-config
];
buildInputs = [
libtool
readline
];
propagatedBuildInputs = [
gmp
# XXX: These ones aren't normally needed here, but `libguile*.la' has '-l'
# flags for them without corresponding '-L' flags. Adding them here will add
# the needed `-L' flags. As for why the `.la' file lacks the `-L' flags,
# see below.
libtool
];
patches = [
# Fix doc snarfing with GCC 4.5.
./cpp-4.5.patch
# Self explanatory
./CVE-2016-8605.patch
];
preBuild = ''
sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c
'';
postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
''
# XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
# why `--with-libunistring-prefix' and similar options coming from
# `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
+ ''
sed -i "$out/lib/pkgconfig/guile"-*.pc \
-e "s|-lltdl|-L${libtool.lib}/lib -lltdl|g"
'';
# One test fails.
# ERROR: file: "libtest-asmobs", message: "file not found"
# This is fixed here:
# <https://git.savannah.gnu.org/cgit/guile.git/commit/?h=branch_release-1-8&id=a0aa1e5b69d6ef0311aeea8e4b9a94eae18a1aaf>.
doCheck = false;
doInstallCheck = doCheck;
setupHook = ./setup-hook-1.8.sh;
meta = with lib; {
homepage = "https://www.gnu.org/software/guile/";
description = "Embeddable Scheme implementation";
longDescription = ''
GNU Guile is an implementation of the Scheme programming language, with
support for many SRFIs, packaged for use in a wide variety of
environments. In addition to implementing the R5RS Scheme standard and a
large subset of R6RS, Guile includes a module system, full access to POSIX
system calls, networking support, multiple threads, dynamic linking, a
foreign function call interface, and powerful string processing.
'';
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ ludo ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,160 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, boehmgc
, buildPackages
, coverageAnalysis ? null
, gawk
, gmp
, libffi
, libtool
, libunistring
, makeWrapper
, pkg-config
, pkgsBuildBuild
, readline
}:
let
# Do either a coverage analysis build or a standard build.
builder = if coverageAnalysis != null
then coverageAnalysis
else stdenv.mkDerivation;
in
builder rec {
pname = "guile";
version = "2.0.13";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
sha256 = "12yqkr974y91ylgw6jnmci2v90i90s7h9vxa4zk0sai8vjnz4i1p";
};
outputs = [ "out" "dev" "info" ];
setOutputFlags = false; # $dev gets into the library otherwise
depsBuildBuild = [
buildPackages.stdenv.cc
]
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
pkgsBuildBuild.guile_2_0;
nativeBuildInputs = [
makeWrapper
pkg-config
];
buildInputs = [
readline
libtool
libunistring
libffi
];
propagatedBuildInputs = [
boehmgc
gmp
# These ones aren't normally needed here, but `libguile*.la' has '-l'
# flags for them without corresponding '-L' flags. Adding them here will
# add the needed `-L' flags. As for why the `.la' file lacks the `-L'
# flags, see below.
libtool
libunistring
];
enableParallelBuilding = true;
patches = [
# Small fixes to Clang compiler
./clang.patch
# Self-explanatory
./disable-gc-sensitive-tests.patch
# Read the header of the patch to more info
./eai_system.patch
# RISC-V endianness
./riscv.patch
# Fixes stability issues with 00-repl-server.test
(fetchpatch {
url = "https://git.savannah.gnu.org/cgit/guile.git/patch/?id=2fbde7f02adb8c6585e9baf6e293ee49cd23d4c4";
sha256 = "0p6c1lmw1iniq03z7x5m65kg3lq543kgvdb4nrxsaxjqf3zhl77v";
})] ++
(lib.optional (coverageAnalysis != null) ./gcov-file-name.patch)
++ lib.optionals stdenv.isDarwin [
./filter-mkostemp-darwin.patch
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch";
sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207";
})
];
# Explicitly link against libgcc_s, to work around the infamous
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
# don't have "libgcc_s.so.1" on darwin
LDFLAGS = lib.optionalString
(!stdenv.isDarwin && !stdenv.hostPlatform.isMusl) "-lgcc_s";
configureFlags = [
"--with-libreadline-prefix"
] ++ lib.optionals stdenv.isSunOS [
# Make sure the right <gmp.h> is found, and not the incompatible
# /usr/include/mp.h from OpenSolaris. See
# <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
# for details.
"--with-libgmp-prefix=${lib.getDev gmp}"
# Same for these (?).
"--with-libreadline-prefix=${lib.getDev readline}"
"--with-libunistring-prefix=${libunistring}"
# See below.
"--without-threads"
];
postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
''
# XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
# why `--with-libunistring-prefix' and similar options coming from
# `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
+ ''
sed -i "$out/lib/pkgconfig/guile"-*.pc \
-e "s|-lunistring|-L${libunistring}/lib -lunistring|g ;
s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ;
s|-lltdl|-L${libtool.lib}/lib -lltdl|g ;
s|includedir=$out|includedir=$dev|g
"
'';
# make check doesn't work on darwin
# On Linuxes+Hydra the tests are flaky; feel free to investigate deeper.
doCheck = false;
doInstallCheck = doCheck;
setupHook = ./setup-hook-2.0.sh;
meta = with lib; {
homepage = "https://www.gnu.org/software/guile/";
description = "Embeddable Scheme implementation";
longDescription = ''
GNU Guile is an implementation of the Scheme programming language, with
support for many SRFIs, packaged for use in a wide variety of
environments. In addition to implementing the R5RS Scheme standard and
a large subset of R6RS, Guile includes a module system, full access to
POSIX system calls, networking support, multiple threads, dynamic
linking, a foreign function call interface, and powerful string
processing.
'';
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ ludo lovek323 vrthra ];
platforms = platforms.all;
};
}
//
(lib.optionalAttrs (!stdenv.isLinux) {
# Work around <https://bugs.gnu.org/14201>.
SHELL = stdenv.shell;
CONFIG_SHELL = stdenv.shell;
})

View file

@ -0,0 +1,142 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, boehmgc
, buildPackages
, coverageAnalysis ? null
, gawk
, gmp
, libffi
, libtool
, libunistring
, makeWrapper
, pkg-config
, pkgsBuildBuild
, readline
}:
let
# Do either a coverage analysis build or a standard build.
builder = if coverageAnalysis != null
then coverageAnalysis
else stdenv.mkDerivation;
in
builder rec {
pname = "guile";
version = "2.2.7";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
sha256 = "013mydzhfswqci6xmyc1ajzd59pfbdak15i0b090nhr9bzm7dxyd";
};
outputs = [ "out" "dev" "info" ];
setOutputFlags = false; # $dev gets into the library otherwise
depsBuildBuild = [
buildPackages.stdenv.cc
]
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
pkgsBuildBuild.guile;
nativeBuildInputs = [
makeWrapper
pkg-config
];
buildInputs = [
libffi
libtool
libunistring
readline
];
propagatedBuildInputs = [
boehmgc
gmp
# XXX: These ones aren't normally needed here, but `libguile*.la' has '-l'
# flags for them without corresponding '-L' flags. Adding them here will add
# the needed `-L' flags. As for why the `.la' file lacks the `-L' flags,
# see below.
libtool
libunistring
];
# According to Bernhard M. Wiedemann <bwiedemann suse de> on
# #reproducible-builds on irc.oftc.net, (2020-01-29): they had to
# build Guile without parallel builds to make it reproducible.
#
# re: https://issues.guix.gnu.org/issue/20272
# re: https://build.opensuse.org/request/show/732638
enableParallelBuilding = false;
patches = [
# Read the header of the patch to more info
./eai_system.patch
] ++ lib.optional (coverageAnalysis != null) ./gcov-file-name.patch
++ lib.optional stdenv.isDarwin
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch";
sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207";
});
# Explicitly link against libgcc_s, to work around the infamous
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
# don't have "libgcc_s.so.1" on clang
LDFLAGS = lib.optionalString
(stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) "-lgcc_s";
configureFlags = [
"--with-libreadline-prefix=${lib.getDev readline}"
] ++ lib.optionals stdenv.isSunOS [
# Make sure the right <gmp.h> is found, and not the incompatible
# /usr/include/mp.h from OpenSolaris. See
# <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
# for details.
"--with-libgmp-prefix=${lib.getDev gmp}"
# Same for these (?).
"--with-libunistring-prefix=${libunistring}"
# See below.
"--without-threads"
];
postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
''
# XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
# why `--with-libunistring-prefix' and similar options coming from
# `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
+ ''
sed -i "$out/lib/pkgconfig/guile"-*.pc \
-e "s|-lunistring|-L${libunistring}/lib -lunistring|g ;
s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ;
s|-lltdl|-L${libtool.lib}/lib -lltdl|g ;
s|includedir=$out|includedir=$dev|g
"
'';
# make check doesn't work on darwin
# On Linuxes+Hydra the tests are flaky; feel free to investigate deeper.
doCheck = false;
doInstallCheck = doCheck;
setupHook = ./setup-hook-2.2.sh;
meta = with lib; {
homepage = "https://www.gnu.org/software/guile/";
description = "Embeddable Scheme implementation";
longDescription = ''
GNU Guile is an implementation of the Scheme programming language, with
support for many SRFIs, packaged for use in a wide variety of
environments. In addition to implementing the R5RS Scheme standard and a
large subset of R6RS, Guile includes a module system, full access to POSIX
system calls, networking support, multiple threads, dynamic linking, a
foreign function call interface, and powerful string processing.
'';
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ ludo lovek323 vrthra ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,161 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, boehmgc
, buildPackages
, coverageAnalysis ? null
, gawk
, gmp
, libffi
, libtool
, libunistring
, makeWrapper
, pkg-config
, pkgsBuildBuild
, readline
, writeScript
}:
let
# Do either a coverage analysis build or a standard build.
builder = if coverageAnalysis != null
then coverageAnalysis
else stdenv.mkDerivation;
in
builder rec {
pname = "guile";
version = "3.0.8";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
sha256 = "sha256-2qcGClbygE6bdMjX5/6L7tErQ6qyeJo4WFGD/MF7ihM=";
};
outputs = [ "out" "dev" "info" ];
setOutputFlags = false; # $dev gets into the library otherwise
depsBuildBuild = [
buildPackages.stdenv.cc
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
pkgsBuildBuild.guile;
nativeBuildInputs = [
makeWrapper
pkg-config
];
buildInputs = [
libffi
libtool
libunistring
readline
];
propagatedBuildInputs = [
boehmgc
gmp
# These ones aren't normally needed here, but `libguile*.la' has '-l'
# flags for them without corresponding '-L' flags. Adding them here will
# add the needed `-L' flags. As for why the `.la' file lacks the `-L'
# flags, see below.
libtool
libunistring
];
# According to Bernhard M. Wiedemann <bwiedemann suse de> on
# #reproducible-builds on irc.oftc.net, (2020-01-29): they had to build
# Guile without parallel builds to make it reproducible.
#
# re: https://issues.guix.gnu.org/issue/20272
# re: https://build.opensuse.org/request/show/732638
enableParallelBuilding = false;
patches = [
./eai_system.patch
] ++ lib.optional (coverageAnalysis != null) ./gcov-file-name.patch
++ lib.optional stdenv.isDarwin
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch";
sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207";
});
# Explicitly link against libgcc_s, to work around the infamous
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
# don't have "libgcc_s.so.1" on clang
LDFLAGS = lib.optionalString
(stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) "-lgcc_s";
configureFlags = [
"--with-libreadline-prefix=${lib.getDev readline}"
] ++ lib.optionals stdenv.isSunOS [
# Make sure the right <gmp.h> is found, and not the incompatible
# /usr/include/mp.h from OpenSolaris. See
# <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
# for details.
"--with-libgmp-prefix=${lib.getDev gmp}"
# Same for these (?).
"--with-libunistring-prefix=${libunistring}"
# See below.
"--without-threads"
]
# Disable JIT on Apple Silicon, as it is not yet supported
# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44505";
++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "--enable-jit=no"
# At least on x86_64-darwin '-flto' autodetection is not correct:
# https://github.com/NixOS/nixpkgs/pull/160051#issuecomment-1046193028
++ lib.optional (stdenv.isDarwin) "--disable-lto";
postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
''
# XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for
# why `--with-libunistring-prefix' and similar options coming from
# `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64.
+ ''
sed -i "$out/lib/pkgconfig/guile"-*.pc \
-e "s|-lunistring|-L${libunistring}/lib -lunistring|g ;
s|^Cflags:\(.*\)$|Cflags: -I${libunistring}/include \1|g ;
s|-lltdl|-L${libtool.lib}/lib -lltdl|g ;
s|includedir=$out|includedir=$dev|g
"
'';
# make check doesn't work on darwin
# On Linuxes+Hydra the tests are flaky; feel free to investigate deeper.
doCheck = false;
doInstallCheck = doCheck;
setupHook = ./setup-hook-3.0.sh;
passthru = {
updateScript = writeScript "update-guile-3" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pcre common-updater-scripts
set -eu -o pipefail
# Expect the text in format of '"https://ftp.gnu.org/gnu/guile/guile-3.0.8.tar.gz"'
new_version="$(curl -s https://www.gnu.org/software/guile/download/ |
pcregrep -o1 '"https://ftp.gnu.org/gnu/guile/guile-(3[.0-9]+).tar.gz"')"
update-source-version guile_3_0 "$new_version"
'';
};
meta = with lib; {
homepage = "https://www.gnu.org/software/guile/";
description = "Embeddable Scheme implementation";
longDescription = ''
GNU Guile is an implementation of the Scheme programming language, with
support for many SRFIs, packaged for use in a wide variety of
environments. In addition to implementing the R5RS Scheme standard and a
large subset of R6RS, Guile includes a module system, full access to POSIX
system calls, networking support, multiple threads, dynamic linking, a
foreign function call interface, and powerful string processing.
'';
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ ludo lovek323 vrthra ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,59 @@
commit d514e3fc42eb14a1bc5846b27ef89f50ba3a5d48
Author: Ludovic Courtès <ludo@gnu.org>
Date: Tue Oct 11 10:14:26 2016 +0200
Remove 'umask' calls from 'mkdir'.
Fixes <http://bugs.gnu.org/24659>.
* libguile/filesys.c (SCM_DEFINE): Remove calls to 'umask' when MODE is
unbound; instead, use 0777 as the mode. Update docstring to clarify
this.
diff --git a/libguile/filesys.c b/libguile/filesys.c
index c8acb13ef..921f765f1 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2004, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2006,
+ * 2009, 2010, 2011, 2012, 2013, 2014, 2016 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -791,26 +792,21 @@ SCM_DEFINE (scm_delete_file, "delete-file", 1, 0, 0,
SCM_DEFINE (scm_mkdir, "mkdir", 1, 1, 0,
(SCM path, SCM mode),
"Create a new directory named by @var{path}. If @var{mode} is omitted\n"
- "then the permissions of the directory file are set using the current\n"
- "umask. Otherwise they are set to the decimal value specified with\n"
- "@var{mode}. The return value is unspecified.")
+ "then the permissions of the directory are set to @code{#o777}\n"
+ "masked with the current umask (@pxref{Processes, @code{umask}}).\n"
+ "Otherwise they are set to the value specified with @var{mode}.\n"
+ "The return value is unspecified.")
#define FUNC_NAME s_scm_mkdir
{
int rv;
- mode_t mask;
+ mode_t c_mode;
- if (SCM_UNBNDP (mode))
- {
- mask = umask (0);
- umask (mask);
- STRING_SYSCALL (path, c_path, rv = mkdir (c_path, 0777 ^ mask));
- }
- else
- {
- STRING_SYSCALL (path, c_path, rv = mkdir (c_path, scm_to_uint (mode)));
- }
+ c_mode = SCM_UNBNDP (mode) ? 0777 : scm_to_uint (mode);
+
+ STRING_SYSCALL (path, c_path, rv = mkdir (c_path, c_mode));
if (rv != 0)
SCM_SYSERROR;
+
return SCM_UNSPECIFIED;
}
#undef FUNC_NAME

View file

@ -0,0 +1,14 @@
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index 889bca7..15d39b0 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -74,7 +74,8 @@
in <inttypes.h> would reinclude us, skipping our contents because
_@GUARD_PREFIX@_STDINT_H is defined.
The include_next requires a split double-inclusion guard. */
-# @INCLUDE_NEXT@ @NEXT_STDINT_H@
+# include <inttypes.h>
+// # @INCLUDE_NEXT@ @NEXT_STDINT_H@
#endif
#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H

View file

@ -0,0 +1,24 @@
Fix doc snarfing with GCC 4.5.
From <http://git.savannah.gnu.org/cgit/guile.git/commit/?h=branch_release-1-8&id=aac41d28358cea594bb30f6e547afb82bb6004a6>.
diff --git a/scripts/snarf-check-and-output-texi b/scripts/snarf-check-and-output-texi
index ea33e17..8cd42e8 100755
--- a/scripts/snarf-check-and-output-texi
+++ b/scripts/snarf-check-and-output-texi
@@ -267,6 +267,17 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
(set! *file* file)
(set! *line* line))
+ ;; newer gccs like to throw around more location markers into the
+ ;; preprocessed source; these (hash . hash) bits are what they translate to
+ ;; in snarfy terms.
+ (('location ('string . file) ('int . line) ('hash . 'hash))
+ (set! *file* file)
+ (set! *line* line))
+
+ (('location ('hash . 'hash) ('string . file) ('int . line) ('hash . 'hash))
+ (set! *file* file)
+ (set! *line* line))
+
(('arglist rest ...)
(set! *args* (do-arglist rest)))

View file

@ -0,0 +1,25 @@
This patch disable GC-sensitive tests. This is particularly useful when
compiling with `-O0' (as is done with coverage analysis) since there may
be many false references held on the stack, leading to the failure of
such tests.
--- a/test-suite/tests/gc.test
+++ b/test-suite/tests/gc.test
@@ -67,6 +67,7 @@
(with-test-prefix "gc"
(pass-if "Unused modules are removed"
+ (throw 'unresolved)
(let* ((guard (make-guardian))
(total 1000))
--- a/test-suite/tests/threads.test
+++ b/test-suite/tests/threads.test
@@ -366,6 +366,7 @@
(not (mutex-owner m))))
(pass-if "mutex with owner not retained (bug #27450)"
+ (throw 'unresolved)
(let ((g (make-guardian)))
(g (let ((m (make-mutex))) (lock-mutex m) m))

View file

@ -0,0 +1,24 @@
Building nixpkgs in non-chroot, NSS modules may fail
and that will report EAI_SYSTEM in getaddrinfo.
https://bugzilla.novell.com/show_bug.cgi?id=794696
Index: guile-2.0.7/test-suite/tests/net-db.test
===================================================================
--- guile-2.0.7.orig/test-suite/tests/net-db.test
+++ guile-2.0.7/test-suite/tests/net-db.test
@@ -79,6 +79,7 @@
(and (defined? 'EAI_NODATA) ; GNU extension
(= errcode EAI_NODATA))
(= errcode EAI_AGAIN)
+ (= errcode EAI_SYSTEM)
(begin
(format #t "unexpected error code: ~a ~s~%"
errcode (gai-strerror errcode))
@@ -105,6 +106,7 @@
;; `EAI_NONAME'.)
(and (or (= errcode EAI_SERVICE)
(= errcode EAI_NONAME)
+ (= errcode EAI_SYSTEM)
(and (defined? 'EAI_NODATA)
(= errcode EAI_NODATA)))
(string? (gai-strerror errcode))))))))

View file

@ -0,0 +1,28 @@
Filter incompat. mkostemp(3) flags on macOS 10.12
macOS Sierra introduces a mkostemp(3) function which is used when
present. Contrary to the GNUlib version of mkostemp(3) that was used
previously, this version fails with 'invalid argument' when flags other
than from a specified set are passed. From mktemp(3):
| The mkostemp() function is like mkstemp() but allows specifying
| additional open(2) flags (defined in <fcntl.h>). The permitted flags
| are O_APPEND, O_SHLOCK, O_EXLOCK and O_CLOEXEC.
Signed-off-by: Clemens Lang <cal@macports.org>
Upstream-Status: Submitted [https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24862#23]
--- a/libguile/filesys.c.orig 2017-01-09 00:53:27.000000000 +0100
+++ b/libguile/filesys.c 2017-01-09 00:54:48.000000000 +0100
@@ -1486,6 +1486,12 @@
mode_bits = scm_i_mode_bits (mode);
}
+#ifdef __APPLE__
+ /* macOS starting with 10.12 defines mkostemp(2) which is used if defined,
+ * but only accepts some flags according to its manpage. It fails with
+ * invalid argument when other flags are passed. */
+ open_flags &= O_APPEND | O_SHLOCK | O_EXLOCK | O_CLOEXEC;
+#endif
SCM_SYSCALL (rv = mkostemp (c_tmpl, open_flags));
if (rv == -1)
SCM_SYSERROR;

View file

@ -0,0 +1,42 @@
This patch arranges so that we don't end up, with profiling builds, with a
file named `<stdout>.gcov' since that confuses lcov:
<stdout>:cannot open source file
geninfo: ERROR: cannot read <stdout>.gcov!
--- guile/libguile/c-tokenize.c 2009-09-13 13:05:15.000000000 +0200
+++ guile/libguile/c-tokenize.c 2009-10-28 16:24:15.000000000 +0100
@@ -1,5 +1,5 @@
-#line 3 "<stdout>"
+#line 3 "c-tokenize.c"
#define YY_INT_ALIGNED short int
@@ -616,7 +616,7 @@ int cookie_was_last = 0;
#define IS_COOKIE cookie_was_last = 1
#define IS_NOT_COOKIE cookie_was_last = 0
-#line 620 "<stdout>"
+#line 620 "c-tokenize.c"
#define INITIAL 0
@@ -799,7 +799,7 @@ YY_DECL
#line 65 "./c-tokenize.lex"
-#line 803 "<stdout>"
+#line 803 "c-tokenize.c"
if ( !(yy_init) )
{
@@ -1235,7 +1235,7 @@ YY_RULE_SETUP
#line 181 "./c-tokenize.lex"
ECHO;
YY_BREAK
-#line 1239 "<stdout>"
+#line 1239 "c-tokenize.c"
case YY_STATE_EOF(INITIAL):
yyterminate();

View file

@ -0,0 +1,13 @@
diff --git a/module/system/base/target.scm b/module/system/base/target.scm
index 95ab8d8c9..93616f4a3 100644
--- a/module/system/base/target.scm
+++ b/module/system/base/target.scm
@@ -86,6 +86,8 @@
(endianness big))
((string=? "aarch64" cpu)
(endianness little))
+ ((string-match "riscv[1-9][0-9]*" cpu)
+ (endianness little))
(else
(error "unknown CPU endianness" cpu)))))

View file

@ -0,0 +1,7 @@
addGuileLibPath () {
if test -d "$1/share/guile/site"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
fi
}
addEnvHooks "$hostOffset" addGuileLibPath

View file

@ -0,0 +1,19 @@
addGuileLibPath () {
if test -d "$1/share/guile/site/2.0"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site/2.0"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site/2.0"
elif test -d "$1/share/guile/site"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site"
fi
if test -d "$1/lib/guile/2.0/ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.0/ccache"
fi
if test -d "$1/lib/guile/2.0/site-ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.0/site-ccache"
fi
}
addEnvHooks "$hostOffset" addGuileLibPath

View file

@ -0,0 +1,19 @@
addGuileLibPath () {
if test -d "$1/share/guile/site/2.2"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site/2.2"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site/2.2"
elif test -d "$1/share/guile/site"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site"
fi
if test -d "$1/lib/guile/2.2/ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.2/ccache"
fi
if test -d "$1/lib/guile/2.2/site-ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.2/site-ccache"
fi
}
addEnvHooks "$hostOffset" addGuileLibPath

View file

@ -0,0 +1,19 @@
addGuileLibPath () {
if test -d "$1/share/guile/site/3.0"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site/3.0"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site/3.0"
elif test -d "$1/share/guile/site"; then
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site"
fi
if test -d "$1/lib/guile/3.0/ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/3.0/ccache"
fi
if test -d "$1/lib/guile/3.0/site-ccache"; then
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/3.0/site-ccache"
fi
}
addEnvHooks "$hostOffset" addGuileLibPath

View file

@ -0,0 +1,50 @@
{ lib, stdenv, fetchurl, bison }:
stdenv.mkDerivation rec {
pname = "hugs98";
version = "2006-09";
src = fetchurl {
url = "https://www.haskell.org/hugs/downloads/${version}/hugs98-Sep2006.tar.gz";
sha256 = "1dj65c39zpy6qqvvrwns2hzj6ipnd4ih655xj7kgyk2nfdvd5x1w";
};
patches =
[ (fetchurl {
url = "https://aur.archlinux.org/cgit/aur.git/plain/hsbase_inline.patch?h=hugs";
name = "hsbase_inline.patch";
sha256 = "1h0sp16d17hlm6gj7zdbgwrjwi2l4q02m8p0wd60dp4gn9i9js0v";
})
];
nativeBuildInputs = [ bison ];
postUnpack = "find -type f -exec sed -i 's@/bin/cp@cp@' {} +";
preConfigure = "unset STRIP";
configureFlags = [
"--enable-char-encoding=utf8" # require that the UTF-8 encoding is always used
"--disable-path-canonicalization"
"--disable-timer" # evaluation timing (for benchmarking Hugs)
"--disable-profiling" # heap profiler
"--disable-stack-dumps" # stack dump on stack overflow
"--enable-large-banner" # multiline startup banner
"--disable-internal-prims" # experimental primitives to access Hugs's innards
"--disable-debug" # include C debugging information (for debugging Hugs)
"--disable-tag" # runtime tag checking (for debugging Hugs)
"--disable-lint" # "lint" flags (for debugging Hugs)
"--disable-only98" # build Hugs to understand Haskell 98 only
"--enable-ffi"
"--enable-pthreads" # build Hugs using POSIX threads C library
];
meta = with lib; {
broken = stdenv.isDarwin;
homepage = "https://www.haskell.org/hugs";
description = "Haskell interpreter";
maintainers = with maintainers; [ joachifm ];
license = licenses.bsd3;
platforms = platforms.all;
};
}

View file

@ -0,0 +1,47 @@
{ lib, stdenv
, fetchFromGitHub
, libX11
, libXt
, withGraphics ? true
}:
stdenv.mkDerivation rec {
pname = "icon-lang";
version = "unstable-2020-02-05";
src = fetchFromGitHub {
owner = "gtownsend";
repo = "icon";
rev = "829cff33de4a21546fb269de3ef5acd7b4f0c0c7";
sha256 = "1lj2f13pbaajcy4v3744bz46rghhw5sv4dwwfnzhsllbj5gnjsv2";
};
buildInputs = lib.optionals withGraphics [ libX11 libXt ];
configurePhase =
let
target = if withGraphics then "X-Configure" else "Configure";
platform =
if stdenv.isLinux then "linux"
else if stdenv.isDarwin then "macintosh"
else if stdenv.isBSD then "bsd"
else if stdenv.isCygwin then "cygwin"
else if stdenv.isSunOS then "solaris"
else throw "unsupported system";
in
"make ${target} name=${platform}";
installPhase = ''
make Install dest=$out
rm $out/README
mkdir -p $out/share/doc
mv $out/doc $out/share/doc/icon
'';
meta = with lib; {
description = "A very high level general-purpose programming language";
maintainers = with maintainers; [ vrthra yurrriq ];
platforms = with platforms; linux ++ darwin ++ freebsd ++ netbsd ++ openbsd ++ cygwin ++ illumos;
license = licenses.publicDomain;
homepage = "https://www.cs.arizona.edu/icon/";
};
}

View file

@ -0,0 +1,72 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, zlib, sqlite, gmp, libffi, cairo,
ncurses, freetype, libGLU, libGL, libpng, libtiff, libjpeg, readline, libsndfile,
libxml2, freeglut, libsamplerate, pcre, libevent, libedit, yajl,
python3, openssl, glfw, pkg-config, libpthreadstubs, libXdmcp, libmemcached
}:
stdenv.mkDerivation {
pname = "io";
version = "2017.09.06";
src = fetchFromGitHub {
owner = "stevedekorte";
repo = "io";
rev = "b8a18fc199758ed09cd2f199a9bc821f6821072a";
sha256 = "07rg1zrz6i6ghp11cm14w7bbaaa1s8sb0y5i7gr2sds0ijlpq223";
};
patches = [
(fetchpatch {
name = "check-for-sysctl-h.patch";
url = "https://github.com/IoLanguage/io/pull/446/commits/9f3e4d87b6d4c1bf583134d55d1cf92d3464c49f.patch";
sha256 = "9f06073ac17f26c2ef6298143bdd1babe7783c228f9667622aa6c91bb7ec7fa0";
})
];
nativeBuildInputs = [
cmake
];
buildInputs = [
zlib sqlite gmp libffi cairo ncurses freetype
libGLU libGL libpng libtiff libjpeg readline libsndfile libxml2
freeglut libsamplerate pcre libevent libedit yajl
pkg-config glfw openssl libpthreadstubs libXdmcp
libmemcached python3
];
preConfigure = ''
# The Addon generation (AsyncRequest and a others checked) seems to have
# trouble with building on Virtual machines. Disabling them until it
# can be fully investigated.
sed -ie \
"s/add_subdirectory(addons)/#add_subdirectory(addons)/g" \
CMakeLists.txt
# Bind Libs STATIC to avoid a segfault when relinking
sed -i 's/basekit SHARED/basekit STATIC/' libs/basekit/CMakeLists.txt
sed -i 's/garbagecollector SHARED/garbagecollector STATIC/' libs/garbagecollector/CMakeLists.txt
sed -i 's/coroutine SHARED/coroutine STATIC/' libs/coroutine/CMakeLists.txt
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/io
$out/bin/io_static
'';
# for gcc5; c11 inline semantics breaks the build
NIX_CFLAGS_COMPILE = "-fgnu89-inline";
meta = with lib; {
description = "Io programming language";
homepage = "https://iolanguage.org/";
license = licenses.bsd3;
maintainers = with maintainers; [
raskin
maggesi
vrthra
];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,24 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "ivy";
version = "0.1.13";
src = fetchFromGitHub {
rev = "v${version}";
owner = "robpike";
repo = "ivy";
sha256 = "sha256-IiQrmmHitKUItm/ZSTQ3jGO3ls8vPPexyOtUvfq3yeU=";
};
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
subPackages = [ "." ];
meta = with lib; {
homepage = "https://github.com/robpike/ivy";
description = "ivy, an APL-like calculator";
license = licenses.bsd3;
maintainers = with maintainers; [ smasher164 ];
};
}

View file

@ -0,0 +1,107 @@
{ lib
, stdenv
, fetchFromGitHub
, bc
, libedit
, readline
, avxSupport ? stdenv.hostPlatform.avxSupport
}:
stdenv.mkDerivation rec {
pname = "j";
version = "904-beta-c";
src = fetchFromGitHub {
name = "${pname}-source";
owner = "jsoftware";
repo = "jsource";
rev = "j${version}";
hash = "sha256-MzEO/saHEBl1JwVlFC6P2UKm9RZnV7KVrNd9h4cPV/w=";
};
buildInputs = [
readline
libedit
bc
];
dontConfigure = true;
# emulating build_all.sh configuration variables
jplatform =
if stdenv.isDarwin then "darwin"
else if (stdenv.isAarch32 || stdenv.isAarch64) then "raspberry"
else if stdenv.isLinux then "linux"
else "unsupported";
j64x =
if stdenv.is32bit then "j32"
else if stdenv.isx86_64 then
if (stdenv.isLinux && avxSupport) then "j64avx" else "j64"
else if stdenv.isAarch64 then
if stdenv.isDarwin then "j64arm" else "j64"
else "unsupported";
buildPhase = ''
runHook preBuild
export SRCDIR=$(pwd)
export HOME=$TMPDIR
export JLIB=$SRCDIR/jlibrary
export CC=cc
cd make2
patchShebangs .
j64x="${j64x}" jplatform="${jplatform}" ./build_all.sh
cp -v $SRCDIR/bin/${jplatform}/${j64x}/* "$JLIB/bin"
runHook postBuild
'';
doCheck = true;
checkPhase = ''
runHook preCheck
echo "Smoke test"
echo 'i. 10' | $JLIB/bin/jconsole | fgrep "0 1 2 3 4 5 6 7 8 9"
# Now run the real tests
pushd $SRCDIR/test
for f in *.ijs
do
echo -n "test $f: "
$JLIB/bin/jconsole < $f > /dev/null || echo FAIL && echo PASS
done
popd
runHook postCheck
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/share/j/"
cp -r $JLIB/{addons,system} "$out/share/j"
cp -r $JLIB/bin "$out"
runHook postInstall
'';
meta = with lib; {
homepage = "http://jsoftware.com/";
description = "J programming language, an ASCII-based APL successor";
longDescription = ''
J is a high-level, general-purpose programming language that is
particularly suited to the mathematical, statistical, and logical analysis
of data. It is a powerful tool for developing algorithms and exploring
problems that are not already well understood.
'';
license = licenses.gpl3Plus;
maintainers = with maintainers; [ raskin synthetica AndersonTorres ];
platforms = with platforms; unix;
};
}

View file

@ -0,0 +1,20 @@
diff --git a/test/suite0009.janet b/test/suite0009.janet
index 6095bc60..25360d60 100644
--- a/test/suite0009.janet
+++ b/test/suite0009.janet
@@ -174,15 +174,6 @@
(defer (:close stream)
(check-matching-names stream)))
-# Test localname and peername
-(repeat 20
- (with [s (net/server "127.0.0.1" "8000" names-handler)]
- (defn test-names []
- (with [conn (net/connect "127.0.0.1" "8000")]
- (check-matching-names conn)))
- (repeat 20 (test-names)))
- (gccollect))
-
# Create pipe
(var pipe-counter 0)

View file

@ -0,0 +1,38 @@
{ lib, stdenv, fetchFromGitHub, meson, ninja }:
stdenv.mkDerivation rec {
pname = "janet";
version = "1.22.0";
src = fetchFromGitHub {
owner = "janet-lang";
repo = pname;
rev = "v${version}";
sha256 = "sha256-FOs8ZfO61A1amovLy4EDSZiZ6XlwVNXf1TiPvNo6BnQ=";
};
# This release fails the test suite on darwin, remove when debugged.
# See https://github.com/NixOS/nixpkgs/pull/150618 for discussion.
patches = lib.optionals stdenv.isDarwin ./darwin-remove-net-test.patch;
postPatch = ''
substituteInPlace janet.1 \
--replace /usr/local/ $out/
'';
nativeBuildInputs = [ meson ninja ];
mesonFlags = [ "-Dgit_hash=release" ];
doCheck = true;
meta = with lib; {
description = "Janet programming language";
homepage = "https://janet-lang.org/";
license = licenses.mit;
maintainers = with maintainers; [ andrewchambers peterhoeg ];
platforms = platforms.all;
# Marked as broken when patch is applied, see comment above patch.
broken = stdenv.isDarwin;
};
}

View file

@ -0,0 +1,59 @@
{ lib, stdenv, fetchFromGitHub, janet }:
let
platformFiles = {
aarch64-darwin = "macos_config.janet";
aarch64-linux = "linux_config.janet";
x86_64-darwin = "macos_config.janet";
x86_64-linux = "linux_config.janet";
};
platformFile = platformFiles.${stdenv.hostPlatform.system};
in
stdenv.mkDerivation rec {
pname = "jpm";
version = "0.0.2";
src = fetchFromGitHub {
owner = "janet-lang";
repo = pname;
rev = version;
sha256 = "sha256-nv+vkDjEY711L+C5ibw48DUSNqq2UJiFC2i5LntuBNM=";
};
# `auto-shebangs true` gives us a shebang line that points to janet inside the
# jpm bin folder
postPatch = ''
substituteInPlace configs/${platformFile} \
--replace 'auto-shebang true' 'auto-shebang false' \
--replace /usr/local $out
'';
dontConfigure = true;
buildInputs = [ janet ];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{lib/janet,share/man/man1}
janet bootstrap.janet configs/${platformFile}
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/jpm help
'';
meta = janet.meta // {
description = "Janet Project Manager for the Janet programming language";
platforms = lib.attrNames platformFiles;
};
}

View file

@ -0,0 +1,28 @@
{ lib, python3Packages, fetchFromGitHub }:
python3Packages.buildPythonApplication {
pname = "jelly";
version = "0.1.31";
src = fetchFromGitHub {
owner = "DennisMitchell";
repo = "jellylanguage";
rev = "70c9fd93ab009c05dc396f8cc091f72b212fb188";
sha256 = "1rpclqagvigp5qhvgnjavvy463f1drshnc1mfxm6z7ygzs0l0yz6";
};
propagatedBuildInputs = [ python3Packages.sympy ];
# checks are disabled because jelly has no tests, and the default is to run
# the output binary with no arguments, which exits with status 1 and causes
# the build to fail
doCheck = false;
meta = with lib; {
description = "A recreational programming language inspired by J";
homepage = "https://github.com/DennisMitchell/jellylanguage";
license = licenses.mit;
maintainers = [ maintainers.tckmn ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,70 @@
{ lib
, stdenv
, fetchFromGitHub
, asciidoc
, pkg-config
, inetutils
, sqlite
, readline
, SDL
, SDL_gfx
}:
stdenv.mkDerivation rec {
pname = "jimtcl";
version = "0.81";
src = fetchFromGitHub {
owner = "msteveb";
repo = "jimtcl";
rev = version;
sha256 = "sha256-OpM9y7fQ+18qxl3/5wUCrNA9qiCdA0vTHqLYSw2lvJs=";
};
nativeBuildInputs = [
pkg-config
asciidoc
];
buildInputs = [
sqlite readline SDL SDL_gfx
];
configureFlags = [
"--shared"
"--with-ext=oo"
"--with-ext=tree"
"--with-ext=binary"
"--with-ext=sqlite3"
"--with-ext=readline"
"--with-ext=sdl"
"--with-ext=json"
"--enable-utf8"
"--ipv6"
];
enableParallelBuilding = true;
doCheck = true;
preCheck = ''
# test exec2-3.2 fails depending on platform or sandboxing (?)
rm tests/exec2.test
'';
# test posix-1.6 needs the "hostname" command
checkInputs = [ inetutils ];
postInstall = ''
ln -sr $out/lib/libjim.so.${version} $out/lib/libjim.so
'';
meta = {
description = "An open source small-footprint implementation of the Tcl programming language";
homepage = "http://jim.tcl.tk/";
license = lib.licenses.bsd2;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ dbohdan fgaz vrthra ];
};
}

View file

@ -0,0 +1,30 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "joker";
version = "1.0.0";
src = fetchFromGitHub {
rev = "v${version}";
owner = "candid82";
repo = "joker";
sha256 = "sha256-SlkhxALJwrZ/DOuBbqjb+wHEfT5mhd3lSD6E0geFP4Y=";
};
vendorSha256 = "sha256-AYoespfzFLP/jIIxbw5K653wc7sSfLY8K7di8GZ64wA=";
doCheck = false;
preBuild = ''
go generate ./...
'';
subPackages = [ "." ];
meta = with lib; {
homepage = "https://github.com/candid82/joker";
description = "A small Clojure interpreter and linter written in Go";
license = licenses.epl10;
maintainers = with maintainers; [ andrestylianos ];
};
}

View file

@ -0,0 +1,67 @@
{ lib, stdenv, callPackage, fetchurl, makeWrapper, jre }:
let
# The version number here is whatever is reported by the RUBY_VERSION string
rubyVersion = callPackage ../ruby/ruby-version.nix {} "2" "5" "7" "";
jruby = stdenv.mkDerivation rec {
pname = "jruby";
version = "9.3.4.0";
src = fetchurl {
url = "https://s3.amazonaws.com/jruby.org/downloads/${version}/jruby-bin-${version}.tar.gz";
sha256 = "sha256-UxVE0yeocVXYyATxU6LfPPBPAYJWHLLdLJNy9IYFtlw=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -pv $out/docs
mv * $out
rm $out/bin/*.{bat,dll,exe,sh}
mv $out/COPYING $out/LICENSE* $out/docs
for i in $out/bin/jruby{,.bash}; do
wrapProgram $i \
--set JAVA_HOME ${jre.home}
done
ln -s $out/bin/jruby $out/bin/ruby
# Bundler tries to create this directory
mkdir -pv $out/${passthru.gemPath}
mkdir -p $out/nix-support
cat > $out/nix-support/setup-hook <<EOF
addGemPath() {
addToSearchPath GEM_PATH \$1/${passthru.gemPath}
}
addEnvHooks "$hostOffset" addGemPath
EOF
'';
postFixup = ''
PATH=$out/bin:$PATH patchShebangs $out/bin
'';
passthru = rec {
rubyEngine = "jruby";
gemPath = "lib/${rubyEngine}/gems/${rubyVersion.libDir}";
libPath = "lib/${rubyEngine}/${rubyVersion.libDir}";
};
meta = with lib; {
description = "Ruby interpreter written in Java";
homepage = "http://jruby.org/";
license = with licenses; [ cpl10 gpl2 lgpl21 ];
platforms = platforms.unix;
maintainers = [ maintainers.fzakaria ];
};
};
in jruby.overrideAttrs (oldAttrs: {
passthru = oldAttrs.passthru // {
devEnv = callPackage ../ruby/dev.nix {
ruby = jruby;
};
};
})

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
pname = "jython";
version = "2.7.2b3";
src = fetchurl {
url = "http://search.maven.org/remotecontent?filepath=org/python/jython-standalone/${version}/jython-standalone-${version}.jar";
sha256 = "142285hd9mx0nx5zw0jvkpqkb4kbhgyyy52p5bj061ya8bg5jizy";
};
nativeBuildInputs = [ makeWrapper ];
dontUnpack = true;
installPhase = ''
mkdir -pv $out/bin
cp $src $out/jython.jar
makeWrapper ${jre}/bin/java $out/bin/jython --add-flags "-jar $out/jython.jar"
'';
meta = {
description = "Python interpreter written in Java";
homepage = "https://jython.org/";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.psfl;
platforms = jre.meta.platforms;
};
}

View file

@ -0,0 +1,25 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "kona";
version = "20211225";
src = fetchFromGitHub {
owner = "kevinlawler";
repo = "kona";
rev = "Win64-${version}";
sha256 = "sha256-m3a9conyKN0qHSSAG8zAb3kx8ir+7dqgxm1XGjCQcfk=";
};
makeFlags = [ "PREFIX=$(out)" ];
preInstall = ''mkdir -p "$out/bin"'';
meta = with lib; {
description = "An interpreter of K, APL-like programming language";
homepage = "https://github.com/kevinlawler/kona/";
maintainers = with maintainers; [ raskin ];
mainProgram = "k";
platforms = platforms.all;
license = licenses.isc;
};
}

View file

@ -0,0 +1,7 @@
{ mkDerivation }:
mkDerivation {
version = "1.2.1";
sha256 = "0j5gjlsk92y14kxgvd80q9vwyhmjkphpzadcswyjxikgahwg1avz";
maximumOTPVersion = "19";
}

View file

@ -0,0 +1,43 @@
{ fetchpatch, mkDerivation }:
let
_fetchpatch =
{ rev, sha256 }:
fetchpatch {
url = "https://github.com/rvirding/lfe/commit/${rev}.patch";
inherit sha256;
};
fetchPatches = map _fetchpatch;
in
mkDerivation {
version = "1.3";
sha256 = "0pgwi0h0d34353m39jin8dxw4yykgfcg90k6pc4qkjyrg40hh4l6";
maximumOTPVersion = "21";
patches = fetchPatches [
{
rev = "b457e5d521bb35008e6049fab31b4073cc10d583";
sha256 = "1zrq1b3291xhb0jsirgb5s8hacq5xvz7xidsp29aqcnpazdvivdc";
}
{
rev = "5fe9f37741b7d53bd43109fd3435e1437f124a0d";
sha256 = "1anqlcbih52lc0wynf58r67w1jhn264lz49rczwgh19pqg92dvqf";
}
{
rev = "b8f3e06511cb6805cf3a904c1589b27f33f3958d";
sha256 = "1zqafc0asm9m6cq7r0brvfawv69fqggy1phif3zknjmpicf25pqf";
}
{
rev = "40c239a608460e55563edb68c1b6faca57518b54";
sha256 = "03av5115jwyammw337xzy50l6api5h0wbwwda5vzw0w10zwb2z8y";
}
{
rev = "5faa7106419263689bfc0bc08a7451ccb1fba718";
sha256 = "0ml5yh5b3rn4ympks4bpx409hkra0i79zvq80azk0kmbjd869fxp";
}
{
rev = "9ff978693babcfd043d741b5c6940920b8315892";
sha256 = "04968dmp527wbkdv7dqpaj3nsyjls93whc1b5hx73b39dvl3n3y1";
}
];
}

View file

@ -0,0 +1,13 @@
diff --git a/Makefile b/Makefile
index 59f2c06..5ee8f6e 100644
--- a/Makefile
+++ b/Makefile
@@ -60,7 +60,7 @@ ESRCS = $(notdir $(wildcard $(SRCDIR)/*.erl))
XSRCS = $(notdir $(wildcard $(SRCDIR)/*.xrl))
YSRCS = $(notdir $(wildcard $(SRCDIR)/*.yrl))
LSRCS = $(notdir $(wildcard $(LSRCDIR)/*.lfe))
-EBINS = $(ESRCS:.erl=.beam) $(XSRCS:.xrl=.beam) $(YSRCS:.yrl=.beam)
+EBINS = $(sort $(ESRCS:.erl=.beam) $(XSRCS:.xrl=.beam) $(YSRCS:.yrl=.beam))
LBINS = $(LSRCS:.lfe=.beam)
CSRCS = $(notdir $(wildcard $(CSRCDIR)/*.c))

View file

@ -0,0 +1,29 @@
diff --git a/rebar.config b/rebar.config
index 1d5a68e..a86ee39 100644
--- a/rebar.config
+++ b/rebar.config
@@ -2,20 +2,20 @@
{erl_opts, [debug_info]}.
-{profiles, [{test, [{deps, [proper]}]}]}.
+%%{profiles, [{test, [{deps, [proper]}]}]}.
{pre_hooks, [{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", ct,
"bin/lfe bin/lfec"
- " -o $REBAR_DEPS_DIR/lfe/test"
+ " -o test"
" test/*_SUITE.lfe"},
{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", eunit,
"bin/lfe bin/lfec"
- " -o $REBAR_DEPS_DIR/lfe/ebin"
+ " -o ebin"
" test/clj-tests.lfe"},
%% TODO: Test this on a win32 box
%% {"win32", ct,
%% "bin/lfe bin/lfec -o $REBAR_DEPS_DIR/lfe/test test/*_SUITE.lfe"}
{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", app_compile,
- "bin/lfe bin/lfec -o $REBAR_DEPS_DIR/lfe/ebin src/*.lfe"}
+ "bin/lfe bin/lfec -o ebin src/*.lfe"}
%% TODO: equivalent win32 hook
]}.

View file

@ -0,0 +1,93 @@
{ lib, fetchFromGitHub, erlang, makeWrapper, coreutils, bash, buildRebar3, buildHex }:
{ baseName ? "lfe"
, version
, maximumOTPVersion
, sha256 ? null
, rev ? version
, src ? fetchFromGitHub { inherit rev sha256; owner = "rvirding"; repo = "lfe"; }
, patches ? []
}:
let
inherit (lib)
assertMsg makeBinPath optionalString
getVersion versionAtLeast versionOlder versions;
mainVersion = versions.major (getVersion erlang);
proper = buildHex {
name = "proper";
version = "1.1.1-beta";
sha256 = "0hnkhs761yjynw9382w8wm4j3x0r7lllzavaq2kh9n7qy3zc1rdx";
configurePhase = ''
${erlang}/bin/escript write_compile_flags include/compile_flags.hrl
'';
};
in
assert (assertMsg (versionAtLeast maximumOTPVersion mainVersion)) ''
LFE ${version} is supported on OTP <=${maximumOTPVersion}, not ${mainVersion}.
'';
buildRebar3 {
name = baseName;
inherit src version;
buildInputs = [ erlang makeWrapper ];
beamDeps = [ proper ];
patches = [ ./fix-rebar-config.patch ./dedup-ebins.patch ] ++ patches;
doCheck = true;
checkTarget = "travis";
makeFlags = [ "-e" "MANDB=''" "PREFIX=$$out"];
# These installPhase tricks are based on Elixir's Makefile.
# TODO: Make, upload, and apply a patch.
installPhase = optionalString (versionOlder version "1.3") ''
local libdir=$out/lib/lfe
local ebindir=$libdir/ebin
local bindir=$libdir/bin
rm -Rf $ebindir
install -m755 -d $ebindir
install -m644 _build/default/lib/lfe/ebin/* $ebindir
install -m755 -d $bindir
for bin in bin/lfe{,c,doc,script}; do install -m755 $bin $bindir; done
install -m755 -d $out/bin
for file in $bindir/*; do ln -sf $file $out/bin/; done
'';
# Thanks again, Elixir.
postFixup = ''
# LFE binaries are shell scripts which run erl and lfe.
# Add some stuff to PATH so the scripts can run without problems.
for f in $out/bin/*; do
wrapProgram $f \
--prefix PATH ":" "${makeBinPath [ erlang coreutils bash ]}:$out/bin"
substituteInPlace $f --replace "/usr/bin/env" "${coreutils}/bin/env"
done
'';
meta = with lib; {
description = "The best of Erlang and of Lisp; at the same time!";
longDescription = ''
LFE, Lisp Flavoured Erlang, is a lisp syntax front-end to the Erlang
compiler. Code produced with it is compatible with "normal" Erlang
code. An LFE evaluator and shell is also included.
'';
homepage = "https://lfe.io";
downloadPage = "https://github.com/rvirding/lfe/releases";
license = licenses.asl20;
maintainers = teams.beam.members;
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,35 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, doxygen, cmake, readline }:
with lib;
stdenv.mkDerivation rec {
pname = "lolcode";
version = "0.11.2";
src = fetchFromGitHub {
owner = "justinmeza";
repo = "lci";
rev = "v${version}";
sha256 = "sha256-VMBW3/sw+1kI6iuOckSPU1TIeY6QORcSfFLFkRYw3Gs=";
};
nativeBuildInputs = [ pkg-config cmake doxygen ];
buildInputs = [ readline ];
# Maybe it clashes with lci scientific logic software package...
postInstall = "mv $out/bin/lci $out/bin/lolcode-lci";
meta = {
homepage = "http://lolcode.org";
description = "An esoteric programming language";
longDescription = ''
LOLCODE is a funny esoteric programming language, a bit Pascal-like,
whose keywords are LOLspeak.
'';
license = licenses.gpl3;
maintainers = [ maintainers.AndersonTorres ];
mainProgram = "lolcode-lci";
platforms = lib.platforms.unix;
};
}

View file

@ -0,0 +1,39 @@
{ lib, stdenv, fetchFromGitHub, pkg-config
, SDL2, libGLU, libGL, openal, luajit
, libdevil, freetype, physfs, libmodplug, mpg123, libvorbis, libogg
, libtheora, which, autoconf, automake, libtool
}:
stdenv.mkDerivation rec {
pname = "love";
version = "11.4";
src = fetchFromGitHub {
owner = "love2d";
repo = "love";
rev = version;
sha256 = "sha256-C/Ifd0KjmaM5Y2fxBiDNz1GQoT4GeH/vyUCiira57U4=";
};
nativeBuildInputs = [ pkg-config autoconf automake ];
buildInputs = [
SDL2 libGLU libGL openal luajit libdevil freetype physfs libmodplug mpg123
libvorbis libogg libtheora which libtool
];
preConfigure = "$shell ./platform/unix/automagic";
configureFlags = [
"--with-lua=luajit"
];
NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg"; # needed since luajit-2.1.0-beta3
meta = {
homepage = "https://love2d.org";
description = "A Lua-based 2D game engine/scripting language";
license = lib.licenses.zlib;
platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.raskin ];
};
}

View file

@ -0,0 +1,21 @@
diff --unified --recursive --text love-HEAD.orig/src/modules/graphics/opengl/Framebuffer.cpp love-HEAD.new/src/modules/graphics/opengl/Framebuffer.cpp
--- love-HEAD.orig/src/modules/graphics/opengl/Framebuffer.cpp 2019-03-14 12:46:55.032982224 -0400
+++ love-HEAD.new/src/modules/graphics/opengl/Framebuffer.cpp 2019-03-14 12:47:22.356175299 -0400
@@ -1,3 +1,5 @@
+#define GL_GLEXT_PROTOTYPES
+
#include "Framebuffer.h"
#include <common/Matrix.h>
diff --unified --recursive --text love-HEAD.orig/src/modules/graphics/opengl/SpriteBatch.cpp love-HEAD.new/src/modules/graphics/opengl/SpriteBatch.cpp
--- love-HEAD.orig/src/modules/graphics/opengl/SpriteBatch.cpp 2019-03-14 12:46:55.032982224 -0400
+++ love-HEAD.new/src/modules/graphics/opengl/SpriteBatch.cpp 2019-03-14 12:47:33.346119890 -0400
@@ -18,6 +18,8 @@
* 3. This notice may not be removed or altered from any source distribution.
**/
+#define GL_GLEXT_PROTOTYPES
+
#include "SpriteBatch.h"
// STD

Some files were not shown because too many files have changed in this diff Show more