!kjdutkOsheZdjqYmqp:nixos.org

Empty Room

1634 Members
347 Servers

Load older messages


SenderMessageTime
21 May 2021
@jschievink:matrix.orgjschievinkah, I see12:40:28
@jschievink:matrix.orgjschievinkthanks!12:40:30
@7c6f434c:nitro.chat7c6f434c joined the room.13:07:46
@sephi:matrix.orgsephi

I’ve hit a new error when building my derivation:

File "lib/app/interactive/dune", line 5, characters 51-74:
5 |   (libraries comby-kernel comby.configuration core shell.filename_extended lwt lwt.unix))
                                                       ^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "shell.filename_extended" not found.

Since I have pkgs.ocamlPackages.shell in my buildInputs, I’d like to check what pkgs.ocamlPackages.shell is, so I tried nix edit nixpkgs.ocamlPackages.shell and it opened pkgs/development/ocaml-modules/janestreet/janePackage_0_13.nix (which is more or less this https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/ocaml-modules/janestreet/janePackage_0_14.nix), which takes a pname and seems to be called here https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/ocaml-packages.nix#L1288. I don’t understand where the value of the pname parameter comes from, nor where the shell derivation is defined. Any idea?

13:46:03
@theophane:hufschmitt.netRegnat
In reply to @sephi:matrix.org

I’ve hit a new error when building my derivation:

File "lib/app/interactive/dune", line 5, characters 51-74:
5 |   (libraries comby-kernel comby.configuration core shell.filename_extended lwt lwt.unix))
                                                       ^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "shell.filename_extended" not found.

Since I have pkgs.ocamlPackages.shell in my buildInputs, I’d like to check what pkgs.ocamlPackages.shell is, so I tried nix edit nixpkgs.ocamlPackages.shell and it opened pkgs/development/ocaml-modules/janestreet/janePackage_0_13.nix (which is more or less this https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/ocaml-modules/janestreet/janePackage_0_14.nix), which takes a pname and seems to be called here https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/ocaml-packages.nix#L1288. I don’t understand where the value of the pname parameter comes from, nor where the shell derivation is defined. Any idea?

I guess it comes from https://github.com/NixOS/nixpkgs/blob/nixos-20.09/pkgs/development/ocaml-modules/janestreet/0.13.nix#L406-L412
13:54:24
@sephi:matrix.orgsephiGood catch, thanks!13:59:01
@sternenseemann:systemli.orgsterni
In reply to @sephi:matrix.org

I’ve hit a new error when building my derivation:

File "lib/app/interactive/dune", line 5, characters 51-74:
5 |   (libraries comby-kernel comby.configuration core shell.filename_extended lwt lwt.unix))
                                                       ^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "shell.filename_extended" not found.

Since I have pkgs.ocamlPackages.shell in my buildInputs, I’d like to check what pkgs.ocamlPackages.shell is, so I tried nix edit nixpkgs.ocamlPackages.shell and it opened pkgs/development/ocaml-modules/janestreet/janePackage_0_13.nix (which is more or less this https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/ocaml-modules/janestreet/janePackage_0_14.nix), which takes a pname and seems to be called here https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/ocaml-packages.nix#L1288. I don’t understand where the value of the pname parameter comes from, nor where the shell derivation is defined. Any idea?

depends on the ocaml vresion you are using
14:35:36
@sternenseemann:systemli.orgsterni
In reply to @sephi:matrix.org

I’ve hit a new error when building my derivation:

File "lib/app/interactive/dune", line 5, characters 51-74:
5 |   (libraries comby-kernel comby.configuration core shell.filename_extended lwt lwt.unix))
                                                       ^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "shell.filename_extended" not found.

Since I have pkgs.ocamlPackages.shell in my buildInputs, I’d like to check what pkgs.ocamlPackages.shell is, so I tried nix edit nixpkgs.ocamlPackages.shell and it opened pkgs/development/ocaml-modules/janestreet/janePackage_0_13.nix (which is more or less this https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/ocaml-modules/janestreet/janePackage_0_14.nix), which takes a pname and seems to be called here https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/ocaml-packages.nix#L1288. I don’t understand where the value of the pname parameter comes from, nor where the shell derivation is defined. Any idea?

* depends on the ocaml version you are using
14:35:43
@sternenseemann:systemli.orgsterni for recent versions it's in pkgs/development/ocaml-modules/janestreet/0.14.nix 14:36:08
@sephi:matrix.orgsephi

Sorry for asking that many questions: I’m now trying to use dune to compile the filename_extended package that’s in the shell package (which doesn’t seem to be included in pkgs.ocamlPackages.shell). I thought I could just set pname = "filename_extended"; and the build phase would run dune build -p filename_extended and it would work, but for some reason it doesn’t:

[nix-shell:/tmp/shell]$ dune build -p filename_extended
Error: I don't know about package filename_extended (passed through -p)

Does anyone know how to build "subpackages"? I’ve also tried shell.filename_extended without success

14:45:55
@sephi:matrix.orgsephi *

Sorry for asking so many questions: I’m now trying to use dune to compile the filename_extended package that’s in the shell package (which doesn’t seem to be included in pkgs.ocamlPackages.shell). I thought I could just set pname = "filename_extended"; and the build phase would run dune build -p filename_extended and it would work, but for some reason it doesn’t:

[nix-shell:/tmp/shell]$ dune build -p filename_extended
Error: I don't know about package filename_extended (passed through -p)

Does anyone know how to build "subpackages"? I’ve also tried shell.filename_extended without success

14:46:05
@vs49688:matrix.orgZane joined the room.14:46:23
@milan:petabyte.devMilan (they/them) 🏳️‍⚧️ Asking questions is just fine! However #nix:nixos.org might be a better place for these. 14:46:54
@symphorien:xlumurb.eusymphorien
In reply to @sephi:matrix.org

Sorry for asking so many questions: I’m now trying to use dune to compile the filename_extended package that’s in the shell package (which doesn’t seem to be included in pkgs.ocamlPackages.shell). I thought I could just set pname = "filename_extended"; and the build phase would run dune build -p filename_extended and it would work, but for some reason it doesn’t:

[nix-shell:/tmp/shell]$ dune build -p filename_extended
Error: I don't know about package filename_extended (passed through -p)

Does anyone know how to build "subpackages"? I’ve also tried shell.filename_extended without success

is is because there is a rewrite of - to _ or something like that ?
14:49:40
@sephi:matrix.orgsephiThanks, I’ll try there :) (btw I feel the channel description could be improved to mention packaging, I thought the channel was just for questions/discussions about the language itself)14:49:23
@sephi:matrix.orgsephi symphorien: doesn’t seem so (I’ve tried both but none of them worked) 14:55:59
@sternenseemann:systemli.orgsternithey should usually all be present automatically, maybe you are referencing a version that doesn't have the subpackage?15:00:24
@sephi:matrix.orgsephi Well if I just run dune build without any package names, then all packages get built. Maybe that’s how I should do it? Just run dune build in the buildPhase, omitting the -p? 15:04:12
@sternenseemann:systemli.orgsternishell.filename_extended should be present if you build shell15:11:33
@sternenseemann:systemli.orgsterni sephi: at least for ocamlPackages_4_12 (which has shell 0.14.0) it is present: grep -C 2 filename_extended $(nix-build -A ocamlPackages.shell)/lib/ocaml/4.12.0/site-lib/shell/dune-package 15:15:50
@sternenseemann:systemli.orgsterniwhat version of nixpkgs are you using?15:17:03
@sternenseemann:systemli.orgsterniokay seems somewhat recent15:20:07
@sephi:matrix.orgsephi I’m using nixos-unstable ("21.05pre289339.83d907fd760") 15:20:06
@sternenseemann:systemli.orgsterniwhat is the current set of expressions you have?15:20:34
@sephi:matrix.orgsephi But from what I can see you’re right, the filename_extended plugin seems bundled in the package 15:20:48
@sternenseemann:systemli.orgsterniyeah subpackages should be :)15:21:15
@sephi:matrix.orgsephi

Here’s my derivation:

let
  pkgs = import <nixos-unstable> { };
in pkgs.ocamlPackages.buildDunePackage rec {
  pname = "comby";
  version = "1.5.1";
  useDune2 = true;
  minimumOcamlVersion = "4.11.0";

  src = pkgs.fetchFromGitHub {
    owner = "comby-tools";
    repo = pname;
    rev = version;
    sha256 = "1ipfrr6n1jyyryhm9zpn8wwgzfac1zgbjdjzrm00qcwc17r8x2hf";
  };
  buildInputs = [
    pkgs.zlib
    pkgs.pkg-config-unwrapped
    pkgs.ocamlPackages.ppx_deriving
    pkgs.ocamlPackages.ppx_deriving_yojson
    pkgs.ocamlPackages.ppx_sexp_conv
    pkgs.ocamlPackages.ppx_jane
    pkgs.ocamlPackages.ppx_expect
    pkgs.ocamlPackages.dune-configurator
    pkgs.ocamlPackages.lwt
    pkgs.ocamlPackages.parany
    pkgs.ocamlPackages.patience_diff
    pkgs.ocamlPackages.core
    pkgs.ocamlPackages.toml
    pkgs.ocamlPackages.shell
    pkgs.ocamlPackages.cohttp-lwt-unix
    pkgs.ocamlPackages.mparser
    pkgs.ocamlPackages.opium
    pkgs.ocamlPackages.textutils
    pkgs.ocamlPackages.jst-config
    pkgs.ocamlPackages.shell
  ];
  buildPhase = "dune build";
}
15:21:45
@hexa:lossy.networkhexa The highlighting is awesome, it shows you added pkgs.ocamlPackages.shell twice :D 15:22:37
@andreas.schraegle:helsinki-systems.deajs124
In reply to @hexa:lossy.network
The highlighting is awesome, it shows you added pkgs.ocamlPackages.shell twice :D
it also parses that as a url?
15:38:20
@sandro:supersandro.deSandroit should because .shell is a valid tld15:39:11

Show newer messages


Back to Room ListRoom Version: 6