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

jetbrains-toolbox: init at 1.27.3.14493 #220541

Merged
merged 1 commit into from Mar 13, 2023

Conversation

drupol
Copy link
Contributor

@drupol drupol commented Mar 10, 2023

Derivation for Jetbrains Toolbox.

This PR

  • Fix the commit log message
  • Fix the PR title
  • Adds doCheck=false;
  • Remove a couple of things that were not needed

If you want to test this thing quickly:

NIXPKGS_ALLOW_UNFREE=1 nix run "github:drupol/nixpkgs/init/jetbrains-toolbox-init#jetbrains-toolbox" --impure

This PR has been created due to the lack of feedback from the original author in #206288

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

pkgs/applications/misc/jetbrains-toolbox/default.nix Outdated Show resolved Hide resolved
libPath = lib.makeLibraryPath [ stdenv.cc.cc.lib glibc xorg.xcbutilkeysyms gcc zlib libsecret xorg.libXext ];
extractApp = { name, src }: runCommand "${name}-extracted"
{
buildInputs = [ appimageTools.appimage-exec patchelf gcc libcef ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please split nativeBuildInputs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

--set-rpath "${libPath}:$out/jre/lib:/usr/lib64" \
--set-interpreter ${glibc}/lib64/ld-linux-x86-64.so.2 \
$out/jetbrains-toolbox
patchelf --set-interpreter ${glibc}/lib64/ld-linux-x86-64.so.2 $out/glibcversion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see how that is usually done

patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

} ''
appimage-exec.sh -x $out ${src}/${name}-${version}/${name}
patchelf \
--set-rpath "${libPath}:$out/jre/lib:/usr/lib64" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why /usr/lib64?

Copy link
Contributor Author

@drupol drupol Mar 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the $out/jre/lib:/usr/lib64 part since it works without them too.

pkgs/applications/misc/jetbrains-toolbox/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/jetbrains-toolbox/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/jetbrains-toolbox/default.nix Outdated Show resolved Hide resolved
mkdir -pv $out/share/applications
mkdir -pv $out/share/icons
cp -r ${appimageContents}/.DirIcon $out/share/icons/${name}.svg
cp -r ${desktopItem}/share/applications/* $out/share/applications/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use installDesktopItem

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

installDesktopItem doesn't seem to exist. Based on what I saw in other derivations, I used copyDesktopItems. Is it what you meant?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that one

pkgs/applications/misc/jetbrains-toolbox/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/jetbrains-toolbox/default.nix Outdated Show resolved Hide resolved
@drupol drupol force-pushed the init/jetbrains-toolbox-init branch from 221af4d to 60b6d9f Compare March 11, 2023 09:11
@drupol drupol force-pushed the init/jetbrains-toolbox-init branch 6 times, most recently from f464efe to e345aa6 Compare March 11, 2023 10:29
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/help-with-a-derivation-package/8686/14

@drupol drupol force-pushed the init/jetbrains-toolbox-init branch from e345aa6 to db70bd5 Compare March 11, 2023 13:48
@drupol drupol force-pushed the init/jetbrains-toolbox-init branch from db70bd5 to 26bd3c7 Compare March 11, 2023 13:52
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/862

@SuperSandro2000 SuperSandro2000 merged commit e513c7a into NixOS:master Mar 13, 2023
9 checks passed
@drupol drupol deleted the init/jetbrains-toolbox-init branch March 13, 2023 15:46
@drupol
Copy link
Contributor Author

drupol commented Mar 13, 2023

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

4 participants