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

hopper: fix libxml2 dynamic linking issue #75522

merged 6 commits into from Feb 19, 2020

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
@Enteee Enteee force-pushed the Enteee:bugfix/hopper branch from db0b403 to 2f7f00b Dec 11, 2019
@Enteee Enteee requested review from jtojnar and FRidh Dec 11, 2019
maintainers = [ stdenv.lib.maintainers.luis ];
platforms = stdenv.lib.platforms.linux;
license = licenses.unfree;
maintainers = [

This comment has been minimized.

@jtojnar

jtojnar Dec 11, 2019
Contributor

Why not use with maintainers

This comment has been minimized.

@Enteee

Enteee Dec 15, 2019
Author Contributor

done

python27,
gmpxx,
}:
let

This comment has been minimized.

@jtojnar

jtojnar Dec 11, 2019
Contributor

Empty let.

This comment has been minimized.

@Enteee

Enteee Dec 15, 2019
Author Contributor

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

This comment has been minimized.

@jtojnar

jtojnar Dec 11, 2019
Contributor

This is installing files into $out/share/share

This comment has been minimized.

@Enteee

Enteee Dec 15, 2019
Author Contributor

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

This comment has been minimized.

@jtojnar

jtojnar Dec 11, 2019
Contributor

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

This comment has been minimized.

@jtojnar

jtojnar Dec 15, 2019
Contributor

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

This comment has been minimized.

@Enteee

Enteee Dec 15, 2019
Author Contributor

  • 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

This comment has been minimized.

@Enteee

Enteee Dec 15, 2019
Author Contributor

done

pkgs/development/tools/analysis/hopper/default.nix Outdated Show resolved Hide resolved
Enteee added 2 commits Dec 15, 2019
* add dependency to ncurses, gnustep
* don't copy to share/share
* run pre/post Install hooks
* fix desktop icon
* with maintainers
@Enteee Enteee force-pushed the Enteee:bugfix/hopper branch from fb8e87e to bb51742 Dec 15, 2019
@Enteee Enteee requested a review from jtojnar Dec 15, 2019
@Enteee Enteee requested a review from jtojnar Dec 18, 2019
@Enteee
Copy link
Contributor Author

@Enteee Enteee commented Feb 4, 2020

@jtojnar all review comments were implemented, please merge.

Copy link
Contributor

@Luis-Hebendanz Luis-Hebendanz left a comment

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

@Mic92 Mic92 merged commit 2d87562 into NixOS:master Feb 19, 2020
15 checks passed
15 checks passed
hopper on aarch64-linux No attempt
Details
hopper on x86_64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
dtzWill added 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 Enteee:bugfix/hopper branch Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.