aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/ocaml-modules/opam-repository/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/opam-repository/default.nix')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/opam-repository/default.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/opam-repository/default.nix b/nixpkgs/pkgs/development/ocaml-modules/opam-repository/default.nix
new file mode 100644
index 00000000000..1801a9e1c86
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/opam-repository/default.nix
@@ -0,0 +1,24 @@
+{ lib, buildDunePackage, unzip, opam-format, curl }:
+
+buildDunePackage rec {
+ pname = "opam-repository";
+
+ minimumOCamlVersion = "4.02";
+
+ inherit (opam-format) src version;
+
+ patches = [ ./download-tool.patch ];
+ postPatch = ''
+ substituteInPlace src/repository/opamRepositoryConfig.ml \
+ --replace "SUBSTITUTE_NIXOS_CURL_PATH" "\"${curl}/bin/curl\""
+ '';
+
+ nativeBuildInputs = [ unzip ];
+ buildInputs = [ curl ];
+ propagatedBuildInputs = [ opam-format ];
+
+ meta = opam-format.meta // {
+ description = "OPAM repository and remote sources handling, including curl/wget, rsync, git, mercurial, darcs backends";
+ maintainers = with lib.maintainers; [ sternenseemann ];
+ };
+}