Loading pkgs/development/ocaml-modules/menhir/default.nix +8 −1 Original line number Diff line number Diff line { buildDunePackage { buildDunePackage, substituteAll, ocaml , menhirLib, menhirSdk }: Loading @@ -11,6 +11,13 @@ buildDunePackage rec { buildInputs = [ menhirLib menhirSdk ]; patches = [ (substituteAll { src = ./menhir-suggest-menhirLib.patch; libdir = "${menhirLib}/lib/ocaml/${ocaml.version}/site-lib/menhirLib"; }) ]; meta = menhirSdk.meta // { description = "LR(1) parser generator for OCaml"; mainProgram = "menhir"; Loading pkgs/development/ocaml-modules/menhir/menhir-suggest-menhirLib.patch 0 → 100644 +19 −0 Original line number Diff line number Diff line diff --git a/src/installation.ml b/src/installation.ml index 3c64e395..be7d6e7b 100644 --- a/src/installation.ml +++ b/src/installation.ml @@ -39,13 +39,4 @@ let rec normalize fn = and hope that it is of the form [.../bin/menhir]. We change this to [.../lib/menhirLib], and hope that this is where MenhirLib is installed. *) -let libdir () = - let root = - Sys.executable_name - |> normalize - |> Filename.dirname (* remove [menhir] *) - |> Filename.dirname (* remove [bin] *) - in - Filename.concat - root - (Filename.concat "lib" "menhirLib") +let libdir () = ignore normalize; "@libdir@" Loading
pkgs/development/ocaml-modules/menhir/default.nix +8 −1 Original line number Diff line number Diff line { buildDunePackage { buildDunePackage, substituteAll, ocaml , menhirLib, menhirSdk }: Loading @@ -11,6 +11,13 @@ buildDunePackage rec { buildInputs = [ menhirLib menhirSdk ]; patches = [ (substituteAll { src = ./menhir-suggest-menhirLib.patch; libdir = "${menhirLib}/lib/ocaml/${ocaml.version}/site-lib/menhirLib"; }) ]; meta = menhirSdk.meta // { description = "LR(1) parser generator for OCaml"; mainProgram = "menhir"; Loading
pkgs/development/ocaml-modules/menhir/menhir-suggest-menhirLib.patch 0 → 100644 +19 −0 Original line number Diff line number Diff line diff --git a/src/installation.ml b/src/installation.ml index 3c64e395..be7d6e7b 100644 --- a/src/installation.ml +++ b/src/installation.ml @@ -39,13 +39,4 @@ let rec normalize fn = and hope that it is of the form [.../bin/menhir]. We change this to [.../lib/menhirLib], and hope that this is where MenhirLib is installed. *) -let libdir () = - let root = - Sys.executable_name - |> normalize - |> Filename.dirname (* remove [menhir] *) - |> Filename.dirname (* remove [bin] *) - in - Filename.concat - root - (Filename.concat "lib" "menhirLib") +let libdir () = ignore normalize; "@libdir@"