567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
42 lines
876 B
Nix
42 lines
876 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
ocaml,
|
|
findlib,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ocaml${ocaml.version}-ocamlscript";
|
|
version = "3.0.0";
|
|
src = fetchFromGitHub {
|
|
owner = "mjambon";
|
|
repo = "ocamlscript";
|
|
rev = "v${version}";
|
|
sha256 = "sha256:10xz8jknlmcgnf233nahd04q98ijnxpijhpvb8hl7sv94dgkvpql";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
ocaml
|
|
findlib
|
|
];
|
|
|
|
patches = [ ./Makefile.patch ];
|
|
|
|
buildFlags = [ "PREFIX=$(out)" ];
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
preInstall = "mkdir -p $out/bin";
|
|
createFindlibDestdir = true;
|
|
|
|
meta = {
|
|
inherit (src.meta) homepage;
|
|
license = lib.licenses.boost;
|
|
inherit (ocaml.meta) platforms;
|
|
description = "Natively-compiled OCaml scripts";
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
mainProgram = "ocamlscript";
|
|
broken = !(lib.versionAtLeast ocaml.version "4.08");
|
|
};
|
|
}
|