Adds 10 Reason Native packages: * reason-native-console * reason-native-dir * reason-native-file-context-printer * reason-native-fp * reason-native-pastel * reason-native-pastel-console * reason-native-qcheck-rely * reason-native-refmterr * reason-native-rely * reason-native-rely-junit-reporterlaunchpad/nixpkgs/master
parent
f68a20933e
commit
2efd63b87c
@ -0,0 +1,11 @@ |
||||
{ re, reason, pastel, ... }: |
||||
|
||||
{ |
||||
pname = "cli"; |
||||
|
||||
buildInputs = [ |
||||
re |
||||
reason |
||||
pastel |
||||
]; |
||||
} |
@ -0,0 +1,21 @@ |
||||
{ buildDunePackage, callPackage, reason, console, ... }: |
||||
|
||||
{ |
||||
pname = "console"; |
||||
|
||||
buildInputs = [ |
||||
reason |
||||
]; |
||||
|
||||
passthru.tests = { |
||||
console = callPackage ./tests/console { |
||||
inherit buildDunePackage reason console; |
||||
}; |
||||
}; |
||||
|
||||
meta = { |
||||
description = "A library providing a web-influenced polymorphic console API for native Console.log(anything) with runtime printing"; |
||||
downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/console"; |
||||
homepage = "https://reason-native.com/docs/console/"; |
||||
}; |
||||
} |
@ -0,0 +1,43 @@ |
||||
{ newScope, lib, fetchFromGitHub, callPackage, buildDunePackage, atdgen, junit, qcheck-core, re, reason, reason-native }: |
||||
|
||||
let |
||||
generic = (somePath: |
||||
let |
||||
prepkg = import somePath { |
||||
inherit callPackage cli buildDunePackage atdgen junit qcheck-core re reason; |
||||
inherit (reason-native) console file-context-printer fp pastel rely; |
||||
}; |
||||
in |
||||
buildDunePackage |
||||
({ |
||||
version = "2021-16-16-aec0ac6"; |
||||
src = fetchFromGitHub { |
||||
owner = "reasonml"; |
||||
repo = "reason-native"; |
||||
rev = "aec0ac681be7211b4d092262281689c46deb63e1"; |
||||
sha256 = "sha256-QoyI50MBY3RJBmM1y90n7oXrLmHe0CQxKojv+7YbegE="; |
||||
}; |
||||
useDune2 = true; |
||||
meta = with lib; { |
||||
description = "Libraries for building and testing native Reason programs"; |
||||
downloadPage = "https://github.com/reasonml/reason-native"; |
||||
homepage = "https://reason-native.com/"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ superherointj ]; |
||||
} // (prepkg.meta or {}); |
||||
} // prepkg) |
||||
); |
||||
cli = generic ./cli.nix; # Used only by Rely. |
||||
in |
||||
lib.makeScope newScope (self: with self; { |
||||
console = generic ./console.nix; |
||||
dir = generic ./dir.nix; |
||||
file-context-printer = generic ./file-context-printer.nix; |
||||
fp = generic ./fp.nix; |
||||
pastel = generic ./pastel.nix; |
||||
pastel-console = generic ./pastel-console.nix; |
||||
qcheck-rely = generic ./qcheck-rely.nix; |
||||
refmterr = generic ./refmterr.nix; |
||||
rely = generic ./rely.nix; |
||||
rely-junit-reporter = generic ./rely-junit-reporter.nix; |
||||
}) |
@ -0,0 +1,18 @@ |
||||
{ reason, fp, ... }: |
||||
|
||||
{ |
||||
pname = "dir"; |
||||
|
||||
buildInputs = [ |
||||
reason |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
fp |
||||
]; |
||||
|
||||
meta = { |
||||
description = "A library that provides a consistent API for common system, user and application directories consistently on all platforms"; |
||||
downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/dir"; |
||||
}; |
||||
} |
@ -0,0 +1,20 @@ |
||||
{ reason, re, pastel, ... }: |
||||
|
||||
{ |
||||
pname = "file-context-printer"; |
||||
|
||||
buildInputs = [ |
||||
reason |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
re |
||||
pastel |
||||
]; |
||||
|
||||
meta = { |
||||
description = "Utility for displaying snippets of files on the command line"; |
||||
downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/file-context-printer"; |
||||
homepage = "https://reason-native.com/docs/file-context-printer/"; |
||||
}; |
||||
} |
@ -0,0 +1,14 @@ |
||||
{ reason, ... }: |
||||
|
||||
{ |
||||
pname = "fp"; |
||||
|
||||
buildInputs = [ |
||||
reason |
||||
]; |
||||
|
||||
meta = { |
||||
description = "A library for creating and operating on file paths consistently on multiple platforms"; |
||||
downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/fp"; |
||||
}; |
||||
} |
@ -0,0 +1,20 @@ |
||||
{ reason, console, pastel, ... }: |
||||
|
||||
{ |
||||
pname = "pastel-console"; |
||||
|
||||
buildInputs = [ |
||||
reason |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
console |
||||
pastel |
||||
]; |
||||
|
||||
meta = { |
||||
description = "Small library for pretty coloring to Console output"; |
||||
downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/pastel-console"; |
||||
homepage = "https://reason-native.com/docs/pastel/console"; |
||||
}; |
||||
} |
@ -0,0 +1,20 @@ |
||||
{ reason, re, ... }: |
||||
|
||||
{ |
||||
pname = "pastel"; |
||||
|
||||
minimalOCamlVersion = "4.05"; |
||||
|
||||
buildInputs = [ |
||||
reason |
||||
]; |
||||
propagatedBuildInputs = [ |
||||
re |
||||
]; |
||||
|
||||
meta = { |
||||
description = "A text formatting library that harnesses Reason JSX to provide intuitive terminal output. Like React but for CLI"; |
||||
downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/pastel"; |
||||
homepage = "https://reason-native.com/docs/pastel/"; |
||||
}; |
||||
} |
@ -0,0 +1,20 @@ |
||||
{ qcheck-core, reason, console, rely, ... }: |
||||
|
||||
{ |
||||
pname = "qcheck-rely"; |
||||
|
||||
buildInputs = [ |
||||
reason |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
qcheck-core |
||||
console |
||||
rely |
||||
]; |
||||
|
||||
meta = { |
||||
description = "A library containing custom Rely matchers allowing for easily using QCheck with Rely. QCheck is a 'QuickCheck inspired property-based testing for OCaml, and combinators to generate random values to run tests on'"; |
||||
downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/qcheck-rely"; |
||||
}; |
||||
} |
@ -0,0 +1,21 @@ |
||||
{ atdgen, re, reason, pastel, ... }: |
||||
|
||||
{ |
||||
pname = "refmterr"; |
||||
|
||||
buildInputs = [ |
||||
reason |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
atdgen |
||||
re |
||||
pastel |
||||
]; |
||||
|
||||
meta = { |
||||
description = "An error formatter tool for Reason and OCaml. Takes raw error output from compiler and converts to pretty output"; |
||||
downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/refmterr"; |
||||
homepage = "https://reason-native.com/docs/refmterr/"; |
||||
}; |
||||
} |
@ -0,0 +1,23 @@ |
||||
{ atdgen, junit, re, reason, pastel, rely, ... }: |
||||
|
||||
{ |
||||
pname = "rely-junit-reporter"; |
||||
|
||||
buildInputs = [ |
||||
atdgen |
||||
reason |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
junit |
||||
re |
||||
pastel |
||||
rely |
||||
]; |
||||
|
||||
meta = { |
||||
description = "A tool providing JUnit Reporter for Rely Testing Framework"; |
||||
downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/rely-junit-reporter"; |
||||
homepage = "https://reason-native.com/docs/rely/"; |
||||
}; |
||||
} |
@ -0,0 +1,22 @@ |
||||
{ re, reason, cli, file-context-printer, pastel, ... }: |
||||
|
||||
{ |
||||
pname = "rely"; |
||||
|
||||
buildInputs = [ |
||||
reason |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
re |
||||
cli |
||||
file-context-printer |
||||
pastel |
||||
]; |
||||
|
||||
meta = { |
||||
description = "A Jest-inspired testing framework for native OCaml/Reason"; |
||||
downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/rely"; |
||||
homepage = "https://reason-native.com/docs/rely/"; |
||||
}; |
||||
} |
@ -0,0 +1 @@ |
||||
Console.log(Some("Hello fellow Nixer!")); /* {"Hello fellow Nixer!"} */ |
@ -0,0 +1,20 @@ |
||||
{ lib, buildDunePackage, reason, console }: |
||||
|
||||
buildDunePackage rec { |
||||
pname = "console-test"; |
||||
version = "1"; |
||||
|
||||
src = ./.; |
||||
|
||||
useDune2 = true; |
||||
|
||||
buildInputs = [ |
||||
reason |
||||
console |
||||
]; |
||||
|
||||
doInstallCheck = true; |
||||
postInstallCheck = '' |
||||
$out/bin/console-test | grep -q "{\"Hello fellow Nixer!\"}" > /dev/null |
||||
''; |
||||
} |
@ -0,0 +1,4 @@ |
||||
(executable |
||||
(name console-test) |
||||
(public_name console-test) |
||||
(libraries reason console.lib)) |
Loading…
Reference in new issue