Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sublime Text needs libcurl dependency #146635

Closed
dbeckwith opened this issue Nov 19, 2021 · 12 comments
Closed

Sublime Text needs libcurl dependency #146635

dbeckwith opened this issue Nov 19, 2021 · 12 comments

Comments

@dbeckwith
Copy link
Contributor

dbeckwith commented Nov 19, 2021

Describe the bug

See sublimehq/sublime_text#5022. This also affects Sublime Merge.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Launch Sublime Text in the terminal with sublime_text
  2. Observe warnings about failure to load from libcurl.so

Expected behavior

Editor should launch without warnings

Notify maintainers

@jtojnar @wmertens @demin-dmitriy @zimbatm @zookatron

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.77, NixOS, 21.05.4051.9e86f5f7a19 (Okapi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.16`
 - channels(root): `"nixos-21.05.4051.9e86f5f7a19, nixos-unstable-21.11pre329341.9e70e9f732f"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
- sublime4
- sublime-merge
# a list of nixos modules affected by the problem
module:
@jtojnar
Copy link
Contributor

jtojnar commented Nov 19, 2021

Right, noticed the same thing with Sublime Merge.

@dbeckwith
Copy link
Contributor Author

Yes, Sublime Merge has the same issue. Will update the bug to reflect that.

@dbeckwith
Copy link
Contributor Author

I suppose because of sublimehq/sublime_text#5022 (comment) this is actually pretty low-priority. The warnings are annoying but I guess they only relate to checking for updates which isn't really relevant in NixOS.

@r-burns
Copy link
Contributor

r-burns commented Nov 21, 2021

Is it possible to disable the auto update feature entirely? Seems appropriate when it's running from an immutable store path.

@dbeckwith
Copy link
Contributor Author

Sublime does not auto-update, it just checks for updates and shows a notification. You can disable the update check notification with a user preference. However, this doesn't appear to stop it from attempting to load libcurl on startup. In order to do that it would probably require a feature request for Sublime to only load libcurl on demand when it actually goes to check for updates (if update checks aren't disabled).

@zookatron
Copy link
Contributor

I have fixed this issue in the Sublime Merge application: #146934 I do not use Sublime Text version 4 so I have not had a chance to investigate the issue there yet but the solution is likely the same.

@zookatron
Copy link
Contributor

I have fixed this issue in Sublime Text version 4 as well: #150471 Once this pull request is merged we should be able to close this issue.

zookatron pushed a commit to zookatron/nixpkgs that referenced this issue Dec 13, 2021
@dbeckwith
Copy link
Contributor Author

Thanks @zookatron!

@dbeckwith
Copy link
Contributor Author

Also, just FYI, the sublime devs said curl is used for license validity checks and crash reporting as well as update checks.

@blakat360
Copy link

blakat360 commented Oct 23, 2022

This is still an issue when running nix on manjaro.

I have this flake::

{
  description = "Terminal dev environment";

  inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11"; };

  outputs = { self, nixpkgs }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs { inherit system; };
    in {
      devShells.${system}.default = pkgs.mkShell {
        buildInputs = with pkgs; [
          sublime4
	  curl
        ];
      };
    };
}

and this flake.lock

{
  "nodes": {
    "nixpkgs": {
      "locked": {
        "lastModified": 1659446231,
        "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
        "owner": "nixos",
        "repo": "nixpkgs",
        "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
        "type": "github"
      },
      "original": {
        "owner": "nixos",
        "ref": "nixos-21.11",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
    "root": {
      "inputs": {
        "nixpkgs": "nixpkgs"
      }
    }
  },
  "root": "root",
  "version": 7
}

I get into the shell with NIXPKGS_ALLOW_UNFREE=1 nix develop --impure

running subl lol gives you the errors

@dbeckwith
Copy link
Contributor Author

@blakat360 This issue was fixed in b1239b8 which is in NixOS 22.05, but you seem to be using an earlier version (21.11). You'll need to upgrade to get this fix. I don't think including curl in the shell buildInputs will properly make it available to the sublime package.

@blakat360
Copy link

@dbeckwith that fixed it - serves me right for copy-pastaing a flake template off the web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants