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

hopper: fix libxml2 dynamic linking issue #75522

Merged
merged 6 commits into from Feb 19, 2020
Merged

Conversation

Enteee
Copy link
Contributor

@Enteee Enteee commented Dec 11, 2019

  • port to qt5.callPackage / mkDerivation
  • format derivation
Motivation for this change

On channel: nixpkgs-20.03pre202154.58fb23f72ad hopper currently fails to start:

$ hopper 
/etc/profiles/per-user/ente/bin/hopper: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @luis-hebendanz (Maintainer)
@ttuegel (Contributor)

* port to qt5.callPackage / mkDerivation
* format derivation
pkgs/development/tools/analysis/hopper/default.nix Outdated Show resolved Hide resolved
pkgs/development/tools/analysis/hopper/default.nix Outdated Show resolved Hide resolved
pkgs/development/tools/analysis/hopper/default.nix Outdated Show resolved Hide resolved
* use wrapQtAppsHook in favour for the custom qt builder
* use autoPatchelfHook
* cleanup build dependencies
* add maintainer Enteee
maintainers = [ stdenv.lib.maintainers.luis ];
platforms = stdenv.lib.platforms.linux;
license = licenses.unfree;
maintainers = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use with maintainers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

python27,
gmpxx,
}:
let
Copy link
Contributor

Choose a reason for hiding this comment

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

Empty let.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib
mkdir -p $out/share

cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
cp -r $sourceRoot/opt/hopper-${rev}/lib $out
cp -r $sourceRoot/usr/share $out/share
Copy link
Contributor

Choose a reason for hiding this comment

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

This is installing files into $out/share/share

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib
mkdir -p $out/share

cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
cp -r $sourceRoot/opt/hopper-${rev}/lib $out
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not like all these libraries being vendored, could you perhaps only copy those that are not available in nixpkgs and add the rest to buildInputs?

── lib
│  ├── libBlocksRuntime.so.0
│  ├── libdispatch.so -> libdispatch.so.1
│  ├── libdispatch.so.0.1.3.1
│  ├── libdispatch.so.1 -> libdispatch.so.0.1.3.1
│  ├── libform.so.5
│  ├── libgnustep-base.so -> libgnustep-base.so.1.24
│  ├── libgnustep-base.so.1.24 -> libgnustep-base.so.1.24.9
│  ├── libgnustep-base.so.1.24.9
│  ├── libHopperCore.so
│  ├── libkqueue.so.0
│  ├── libncurses.so.5
│  ├── libobjc.so -> libobjc.so.4.6
│  ├── libobjc.so.4.6
│  ├── libobjcxx.so -> libobjcxx.so.4.6
│  ├── libobjcxx.so.4.6
│  ├── libpthread_workqueue.so.0
│  └── libtinfo.so.5

Copy link
Contributor

Choose a reason for hiding this comment

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

libpthread_workqueue.so.0 might come from https://github.com/mheily/libpwq

Copy link
Contributor Author

@Enteee Enteee Dec 15, 2019

Choose a reason for hiding this comment

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

  • libBlocksRuntime.so.0
    • copy
  • libdispatch.so.0.1.3.1
    • copy
  • libform.so.5
    • copy
    • ncurses5.out
    • (gcc-arm-embedded-4_9.out)
    • (androidStudioPackages.dev.out)
    • (androidStudioPackages.canary.out)
    • (android-studio.out)
    • (androidStudioPackages.beta.out)
  • libgnustep-base.so.1.24.9
    • copy
  • libHopperCore.so
    • copy
  • libkqueue.so.0
    • copy
  • libncurses.so.5
    • copy
    • scilab-bin.out
    • ncurses5.out
    • (gcc-arm-embedded-4_9.out)
    • (androidStudioPackages.dev.out)
    • (androidStudioPackages.canary.out)
    • (android-studio.out)
    • (androidStudioPackages.beta.out)
  • libobjc.so.4.6
    • copy
    • gnustep.libobjc.out
  • libobjcxx.so.4.6
    • copy
  • libpthread_workqueue.so.0
    • copy
  • libtinfo.so.5
    • copy
    • tlf.out
    • ncurses5.out
    • (gcc-arm-embedded-4_9.out)
    • jetbrains.clion.out
    • arduino-core.out
    • arduino.out
    • (androidStudioPackages.dev.out)
    • (androidStudioPackages.canary.out)
    • (android-studio.out)
    • (androidStudioPackages.beta.out)

generated with:

for l in *; do [ -L "${l}" ] && continue; echo "* ${l}"; echo "  - [ ] copy"; nix-locate -1 -w "${l}" | sed -e 's/^/  - [ ] /' ; done | xclip

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

pkgs/development/tools/analysis/hopper/default.nix Outdated Show resolved Hide resolved
* add dependency to ncurses, gnustep
* don't copy to share/share
* run pre/post Install hooks
* fix desktop icon
* with maintainers
@Enteee Enteee requested a review from jtojnar December 18, 2019 11:44
@Enteee
Copy link
Contributor Author

Enteee commented Feb 4, 2020

@jtojnar all review comments were implemented, please merge.

Copy link
Contributor

@Qubasa Qubasa left a comment

Choose a reason for hiding this comment

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

Tested and works fine :-)
@Lassulus could you merge this please?

@Mic92 Mic92 merged commit 2d87562 into NixOS:master Feb 19, 2020
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Feb 19, 2020
hopper: fix libxml2 dynamic linking issue
(cherry picked from commit 2d87562)
@Enteee Enteee deleted the bugfix/hopper branch February 19, 2020 18:41
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

5 participants