-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #213832 from GenericNerdyUsername/riscof
python3Packages.riscof: init 1.25.2
- Loading branch information
Showing
18 changed files
with
606 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ stdenv | ||
, fetchFromGitHub | ||
, lib | ||
, arch | ||
, ocamlPackages | ||
, ocaml | ||
, zlib | ||
, z3 | ||
}: | ||
|
||
|
||
stdenv.mkDerivation rec { | ||
pname = "sail-riscv"; | ||
version = "0.5"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "riscv"; | ||
repo = pname; | ||
rev = version; | ||
hash = "sha256-7PZNNUMaCZEBf0lOCqkquewRgZPooBOjIbGF7JlLnEo="; | ||
}; | ||
|
||
nativeBuildInputs = with ocamlPackages; [ ocamlbuild findlib ocaml z3 sail ]; | ||
buildInputs = with ocamlPackages; [ zlib linksem ]; | ||
strictDeps = true; | ||
|
||
postPatch = '' | ||
rm -r prover_snapshots | ||
''; | ||
|
||
makeFlags = [ | ||
"SAIL=sail" | ||
"ARCH=${arch}" | ||
"SAIL_DIR=${ocamlPackages.sail}/share/sail" | ||
]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
|
||
mkdir -p $out/bin | ||
cp c_emulator/riscv_sim_${arch} $out/bin | ||
mkdir $out/share/ | ||
cp -r generated_definitions/{coq,hol4,isabelle} $out/share/ | ||
|
||
runHook postInstall | ||
''; | ||
|
||
|
||
meta = with lib; { | ||
homepage = "https://github.com/riscv/sail-riscv"; | ||
description = "A formal specification of the RISC-V architecture, written in Sail"; | ||
maintainers = with maintainers; [ genericnerdyusername ]; | ||
license = licenses.bsd2; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ stdenv | ||
, fetchFromGitHub | ||
, lib | ||
, ncurses | ||
, makeWrapper | ||
, ocamlbuild | ||
, findlib | ||
, ocaml | ||
, num | ||
, zarith | ||
}: | ||
|
||
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.07") | ||
"lem is not available for OCaml ${ocaml.version}" | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "ocaml${ocaml.version}-lem"; | ||
version = "2022-12-10"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "rems-project"; | ||
repo = "lem"; | ||
rev = version; | ||
hash = "sha256-ZQgcuIVRkJS0KtpzjbO4OPHGg6B0TadWA6XpRir30y8="; | ||
}; | ||
|
||
nativeBuildInputs = [ makeWrapper ocamlbuild findlib ocaml ]; | ||
propagatedBuildInputs = [ zarith num ]; | ||
|
||
installFlags = [ "INSTALL_DIR=$(out)" ]; | ||
|
||
createFindlibDestdir = true; | ||
|
||
postInstall = '' | ||
wrapProgram $out/bin/lem --set LEMLIB $out/share/lem/library | ||
''; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/rems-project/lem"; | ||
description = "A tool for lightweight executable mathematics"; | ||
maintainers = with maintainers; [ genericnerdyusername ]; | ||
license = with licenses; [ bsd3 gpl2 ]; | ||
platforms = ocaml.meta.platforms; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ lib | ||
, fetchFromGitHub | ||
, stdenv | ||
, findlib | ||
, ocaml | ||
, lem | ||
}: | ||
|
||
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.07") | ||
"linksem is not available for OCaml ${ocaml.version}" | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "ocaml${ocaml.version}-linksem"; | ||
version = "0.8"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "rems-project"; | ||
repo = "linksem"; | ||
rev = version; | ||
hash = "sha256-7/YfDK3TruKCckMzAPLRrwBkHRJcX1S+AzXHWRxkZPA="; | ||
}; | ||
|
||
nativeBuildInputs = [ findlib ocaml ]; | ||
|
||
propagatedBuildInputs = [ lem ]; | ||
|
||
createFindlibDestdir = true; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/rems-project/linksem"; | ||
description = "A formalisation of substantial parts of ELF linking and DWARF debug information"; | ||
maintainers = with maintainers; [ genericnerdyusername ]; | ||
license = licenses.bsd2; | ||
platforms = ocaml.meta.platforms; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ lib | ||
, fetchFromGitHub | ||
, buildDunePackage | ||
, base64 | ||
, omd | ||
, menhir | ||
, ott | ||
, linenoise | ||
, dune-site | ||
, pprint | ||
, makeWrapper | ||
, lem | ||
, z3 | ||
, linksem | ||
, num | ||
}: | ||
|
||
buildDunePackage rec { | ||
pname = "sail"; | ||
version = "0.15"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "rems-project"; | ||
repo = "sail"; | ||
rev = version; | ||
hash = "sha256-eNdFOSzkniNvSCZeORRJ/IYAu+9P4HSouwmhd4BQLPk="; | ||
}; | ||
|
||
duneVersion = "3"; | ||
minimalOCamlVersion = "4.08"; | ||
|
||
nativeBuildInputs = [ | ||
makeWrapper | ||
ott | ||
menhir | ||
lem | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
base64 | ||
omd | ||
dune-site | ||
linenoise | ||
pprint | ||
linksem | ||
]; | ||
|
||
preBuild = '' | ||
rm -r aarch* # Remove code derived from non-bsd2 arm spec | ||
rm -r snapshots # Some of this might be derived from stuff in the aarch dir, it builds fine without it | ||
''; | ||
# `buildDunePackage` only builds the [pname] package | ||
# This doesnt work in this case, as sail includes multiple packages in the same source tree | ||
buildPhase = '' | ||
runHook preBuild | ||
dune build --release ''${enableParallelBuild:+-j $NIX_BUILD_CORES} | ||
runHook postBuild | ||
''; | ||
checkPhase = '' | ||
runHook preCheck | ||
dune runtest ''${enableParallelBuild:+-j $NIX_BUILD_CORES} | ||
runHook postCheck | ||
''; | ||
installPhase = '' | ||
runHook preInstall | ||
dune install --prefix $out --libdir $OCAMLFIND_DESTDIR | ||
runHook postInstall | ||
''; | ||
postInstall = '' | ||
wrapProgram $out/bin/sail --set SAIL_DIR $out/share/sail | ||
''; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/rems-project/sail"; | ||
description = "A language for describing the instruction-set architecture (ISA) semantics of processors"; | ||
maintainers = with maintainers; [ genericnerdyusername ]; | ||
license = licenses.bsd2; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ buildPythonPackage | ||
, fetchFromGitHub | ||
, lib | ||
, mbstrdecoder | ||
, typepy | ||
, pytestCheckHook | ||
, termcolor | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "dataproperty"; | ||
version = "0.55.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "thombashi"; | ||
repo = pname; | ||
rev = "v${version}"; | ||
hash = "sha256-ODSrKZ8M/ni9r2gkVIKWaKkdr+3AVi4INkEKJ+cmb44="; | ||
}; | ||
|
||
propagatedBuildInputs = [ mbstrdecoder typepy ]; | ||
|
||
nativeCheckInputs = [ pytestCheckHook ]; | ||
checkInputs = [ termcolor ]; | ||
|
||
# Tests fail, even on non-nixos | ||
pytestFlagsArray = [ | ||
"--deselect test/test_dataproperty.py::Test_DataPeroperty_len::test_normal_ascii_escape_sequence" | ||
"--deselect test/test_dataproperty.py::Test_DataPeroperty_is_include_ansi_escape::test_normal" | ||
"--deselect test/test_dataproperty.py::Test_DataPeroperty_repr::test_normal" | ||
]; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/thombashi/dataproperty"; | ||
description = "A library for extracting properties from data"; | ||
maintainers = with maintainers; [ genericnerdyusername ]; | ||
license = licenses.mit; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ buildPythonPackage | ||
, fetchFromGitHub | ||
, lib | ||
, chardet | ||
, pytestCheckHook | ||
, faker | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "mbstrdecoder"; | ||
version = "1.1.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "thombashi"; | ||
repo = pname; | ||
rev = "v${version}"; | ||
hash = "sha256-U8F+mWKDulIRvvhswmdGnxKjM2qONQybViQ5TLZbLDY="; | ||
}; | ||
|
||
propagatedBuildInputs = [ chardet ]; | ||
|
||
nativeCheckInputs = [ pytestCheckHook ]; | ||
checkInputs = [ faker ]; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/thombashi/mbstrdecoder"; | ||
description = "A library for decoding multi-byte character strings"; | ||
maintainers = with maintainers; [ genericnerdyusername ]; | ||
license = licenses.mit; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ buildPythonPackage | ||
, fetchFromGitHub | ||
, lib | ||
, dataproperty | ||
, mbstrdecoder | ||
, pathvalidate | ||
, setuptools | ||
, tabledata | ||
, tcolorpy | ||
, typepy | ||
, pytestCheckHook | ||
, pyyaml | ||
, toml | ||
, elasticsearch | ||
, dominate | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "pytablewriter"; | ||
version = "0.64.2"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "thombashi"; | ||
repo = pname; | ||
rev = "v${version}"; | ||
hash = "sha256-+IOHnmdd9g3SoHyITJJtbJ0/SAAmwWmwX5XeqsO34EM="; | ||
}; | ||
|
||
propagatedBuildInputs = [ | ||
dataproperty | ||
mbstrdecoder | ||
pathvalidate | ||
tabledata | ||
tcolorpy | ||
typepy | ||
]; | ||
|
||
checkInputs = [ pyyaml toml elasticsearch dominate ]; | ||
nativeCheckInputs = [ pytestCheckHook ]; | ||
# Circular dependency | ||
disabledTests = [ | ||
"test_normal_from_file" | ||
"test_normal_from_text" | ||
"test_normal_clear_theme" | ||
]; | ||
disabledTestPaths = [ | ||
"test/writer/binary/test_excel_writer.py" | ||
"test/writer/binary/test_sqlite_writer.py" | ||
]; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/thombashi/pytablewriter"; | ||
description = "A library to write a table in various formats"; | ||
maintainers = with maintainers; [ genericnerdyusername ]; | ||
license = licenses.mit; | ||
}; | ||
} |
Oops, something went wrong.