feat(nixpkgs-patches): ocaml extensions by overlay
This commit is contained in:
parent
75b64379be
commit
9f0782c125
2 changed files with 61 additions and 1 deletions
|
@ -82,7 +82,10 @@ let
|
|||
subnets
|
||||
fqdn
|
||||
;
|
||||
patches = [ ./nginx-fallback.patch ] ++ config.patches;
|
||||
patches = [
|
||||
./nginx-fallback.patch
|
||||
./ocamlPackagesExtentions.patch
|
||||
] ++ config.patches;
|
||||
overlay-paths = [
|
||||
"${sources.kat-pkgs}/overlay.nix"
|
||||
(pkgs.writeText "lix-overlay.nix" ''
|
||||
|
|
57
kat/ocamlPackagesExtentions.patch
Normal file
57
kat/ocamlPackagesExtentions.patch
Normal file
|
@ -0,0 +1,57 @@
|
|||
From 7f9ea7ad9fa9c4a1a9515df2732b0dcdea145f63 Mon Sep 17 00:00:00 2001
|
||||
From: catvayor <catvayor@katvayor.net>
|
||||
Date: Wed, 22 Jan 2025 17:43:54 +0100
|
||||
Subject: [PATCH] feat(ocamlPackages): init ocamlPackagesExtensions
|
||||
|
||||
---
|
||||
pkgs/top-level/all-packages.nix | 1 +
|
||||
pkgs/top-level/ocaml-packages.nix | 13 +++++++++----
|
||||
2 files changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
|
||||
index 86c329e9a1b4..130b6425aa42 100644
|
||||
--- a/pkgs/top-level/all-packages.nix
|
||||
+++ b/pkgs/top-level/all-packages.nix
|
||||
@@ -6638,6 +6638,7 @@ with pkgs;
|
||||
ocaml-ng = callPackage ./ocaml-packages.nix { };
|
||||
ocaml = ocamlPackages.ocaml;
|
||||
|
||||
+ ocamlPackagesExtensions = [ ];
|
||||
ocamlPackages = recurseIntoAttrs ocaml-ng.ocamlPackages;
|
||||
|
||||
ocaml-crunch = ocamlPackages.crunch.bin;
|
||||
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
|
||||
index 84d0d4032c01..ed7a64f61b5e 100644
|
||||
--- a/pkgs/top-level/ocaml-packages.nix
|
||||
+++ b/pkgs/top-level/ocaml-packages.nix
|
||||
@@ -1,10 +1,10 @@
|
||||
-{ lib, newScope, pkgs, config }:
|
||||
+{ lib, newScope, pkgs, ocamlPackagesExtensions, config }:
|
||||
|
||||
let
|
||||
liftJaneStreet = self: super: super.janeStreet // super;
|
||||
|
||||
- mkOcamlPackages = ocaml:
|
||||
- (lib.makeScope newScope (self: with self;
|
||||
+ base-packages = ocaml:
|
||||
+ self: with self;
|
||||
{
|
||||
inherit ocaml;
|
||||
|
||||
@@ -2053,7 +2053,12 @@ let
|
||||
|
||||
### End ###
|
||||
|
||||
- })).overrideScope liftJaneStreet;
|
||||
+ };
|
||||
+
|
||||
+ mkOcamlPackages = ocaml:
|
||||
+ (lib.makeScope newScope (
|
||||
+ lib.extends (lib.composeManyExtensions ocamlPackagesExtensions) (base-packages ocaml)
|
||||
+ )).overrideScope liftJaneStreet;
|
||||
|
||||
in let inherit (pkgs) callPackage; in rec
|
||||
{
|
||||
--
|
||||
2.47.0
|
||||
|
Loading…
Add table
Reference in a new issue