Linux 在NixOS中运行jetbrains工具箱

Linux 在NixOS中运行jetbrains工具箱,linux,nixos,jetbrains-toolbox,Linux,Nixos,Jetbrains Toolbox,我想在NixOS中安装。跟踪beta和cannery频道很有用。我发现以前有人问过,但我没有遇到这个问题,所以我决定再问一次。所以通过使用,在下载和解包之后,我运行了这个 $ patchelf \ --set-interpreter /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib/ld-linux-x86-64.so.2 \ --set-rpath /nix/store/9df65igwjmf2wbw0gbrrgair

我想在NixOS中安装。跟踪beta和cannery频道很有用。我发现以前有人问过,但我没有遇到这个问题,所以我决定再问一次。所以通过使用,在下载和解包之后,我运行了这个

$ patchelf \
  --set-interpreter /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib/ld-linux-x86-64.so.2 \
  --set-rpath /nix/store/9df65igwjmf2wbw0gbrrgair6piqjgmi-glibc-2.31/lib:/nix/store/9sfmwj09ij65qnc8dgv8h56gf12b60nn-zlib-1.2.11/lib:/nix/store/dadpj611mynymmljn7s8d97kfsy89dmc-fuse-2.9.9/lib \
  jetbrains-toolbox                                                                                                                                             

$ ./jetbrains-toolbox
/run/user/1000/.mount_jetbraWshcwf/AppRun: line 14: ./glibcversion: No such file or directory
/run/user/1000/.mount_jetbraWshcwf/AppRun: line 14: [: : integer expression expected
/run/user/1000/.mount_jetbraWshcwf/AppRun: line 35: /run/user/1000/.mount_jetbraWshcwf/jetbrains-toolbox: No such file or directory
 
我搜索了很多,想知道如何安装
glibcversion
,但没有成功!你知道我该怎么解决这个问题吗

创建一个也很容易!创建一个名为
glibcversion.c

#include <stdio.h>
#include <stdlib.h>
#include <gnu/libc-version.h>

int main(int argc, char *argv[]) {
  printf("glibc version: %s\n", gnu_get_libc_version());
}

但是我怎样才能将它提供给jetbrains工具箱呢?

我能够使用appimageTools.wrapType2构建jetbrains工具箱。我相信这会创建一个有点传统的环境,其中所有内容都正确地位于/usr/bin中,以此类推。这还可以确保已安装的IDE正常工作

另外请注意,最新版本1.18.7455不起作用。但它适用于1.16.6319

这是一个nix表达式。使用
nix Build-jetbrains工具箱构建它。nix

with import <nixpkgs> {};
let
  name = "jetbrains-toolbox";
  version = "1.16.6319";
    #version = "1.18.7455";
  sha256 = "4e6f333839af8330a09d9d6fdcd6a635c9ca1f0ae239d8f268249dbd095ca880";
in rec {
  jetbrains-toolbox-src = stdenv.mkDerivation {
    name = "jetbrains-toolbox-src";

    src = fetchurl {
        url = "https://download.jetbrains.com/toolbox/${name}-${version}.tar.gz";
        inherit sha256;
    };

    installPhase = ''
        #mkdir -p $out/bin
        cp jetbrains-toolbox $out
    '';
  };

  jetbrains-toolbox = appimageTools.wrapType2 {
    inherit name;

    src = jetbrains-toolbox-src;

    extraPkgs = pkgs: with pkgs; [
      libcef
    ];

    meta = with stdenv.lib; {
      description = "A toolbox to manage JetBrains products";
      longDescription = ''
      The JetBrains Toolbox lets you install and manage JetBrains Products in muiltiple versions.
      '';
      homepage = "https://www.jetbrains.com/toolbox/";
      platforms = platforms.all;
    };
  };
}
与导入{};
让
name=“jetbrains工具箱”;
version=“1.16.6319”;
#version=“1.18.7455”;
sha256=“4e6f333839af8330a09d9d6fdcd6a635c9ca1f0ae239d8f268249dbd095ca880”;
记录{
jetbrains工具箱src=stdenv.mk{
name=“jetbrains工具箱src”;
src=fetchurl{
url=”https://download.jetbrains.com/toolbox/${name}-${version}.tar.gz”;
继承sha256;
};
安装阶段=“”
#mkdir-p$out/bin
cp jetbrains工具箱$out
'';
};
jetbrains toolbox=appimageTools.wrapType2{
继承姓名;
src=jetbrains工具箱src;
extraPkgs=pkgs:带pkgs[
libcef
];
meta=带stdenv.lib{
description=“管理JetBrains产品的工具箱”;
longDescription=“”
JetBrains工具箱允许您安装和管理多个版本的JetBrains产品。
'';
主页=”https://www.jetbrains.com/toolbox/";
平台=平台.all;
};
};
}
。可能不是最惯用的版本。。。但我对尼克松也是新手:)

with import <nixpkgs> {};
let
  name = "jetbrains-toolbox";
  version = "1.16.6319";
    #version = "1.18.7455";
  sha256 = "4e6f333839af8330a09d9d6fdcd6a635c9ca1f0ae239d8f268249dbd095ca880";
in rec {
  jetbrains-toolbox-src = stdenv.mkDerivation {
    name = "jetbrains-toolbox-src";

    src = fetchurl {
        url = "https://download.jetbrains.com/toolbox/${name}-${version}.tar.gz";
        inherit sha256;
    };

    installPhase = ''
        #mkdir -p $out/bin
        cp jetbrains-toolbox $out
    '';
  };

  jetbrains-toolbox = appimageTools.wrapType2 {
    inherit name;

    src = jetbrains-toolbox-src;

    extraPkgs = pkgs: with pkgs; [
      libcef
    ];

    meta = with stdenv.lib; {
      description = "A toolbox to manage JetBrains products";
      longDescription = ''
      The JetBrains Toolbox lets you install and manage JetBrains Products in muiltiple versions.
      '';
      homepage = "https://www.jetbrains.com/toolbox/";
      platforms = platforms.all;
    };
  };
}