4f0dadbf38
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
58 lines
1.4 KiB
Nix
58 lines
1.4 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchurl,
|
|
ocaml,
|
|
findlib,
|
|
ocamlbuild,
|
|
topkg,
|
|
}:
|
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
|
|
"ptime is not available for OCaml ${ocaml.version}"
|
|
|
|
stdenv.mkDerivation
|
|
(finalAttrs: {
|
|
version = "1.2.0";
|
|
pname = "ocaml${ocaml.version}-ptime";
|
|
|
|
src = fetchurl {
|
|
url = "https://erratique.ch/software/ptime/releases/ptime-${finalAttrs.version}.tbz";
|
|
hash = "sha256-lhZ0f99JDsNugCTKsn7gHjoK9XfYojImY4+kA03nOrA=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
findlib
|
|
ocaml
|
|
ocamlbuild
|
|
topkg
|
|
];
|
|
|
|
buildInputs = [
|
|
topkg
|
|
];
|
|
|
|
strictDeps = true;
|
|
|
|
inherit (topkg) buildPhase installPhase;
|
|
|
|
meta = {
|
|
description = "POSIX time for OCaml";
|
|
homepage = "https://erratique.ch/software/ptime";
|
|
license = lib.licenses.isc;
|
|
longDescription = ''
|
|
Ptime has platform independent POSIX time support in pure OCaml.
|
|
It provides a type to represent a well-defined range of POSIX timestamps
|
|
with picosecond precision, conversion with date-time values, conversion
|
|
with RFC 3339 timestamps and pretty printing to a human-readable,
|
|
locale-independent representation.
|
|
|
|
The additional Ptime_clock library provides access to a system POSIX clock
|
|
and to the system's current time zone offset.
|
|
|
|
Ptime is not a calendar library.
|
|
'';
|
|
maintainers = with lib.maintainers; [ sternenseemann ];
|
|
};
|
|
})
|