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

react-native-debugger: init at 0.7.18 #38327

Merged
merged 1 commit into from Apr 17, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Apr 2, 2018

Motivation for this change

Electron application that can be used to debug React Native applications.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: react-native-debugger

Partial log (click to expand)


  inflating: /nix/store/ddwsjjafs7dna00prff0559ndk4881aw-react-native-debugger-0.7.18/snapshot_blob.bin

  inflating: /nix/store/ddwsjjafs7dna00prff0559ndk4881aw-react-native-debugger-0.7.18/ui_resources_200_percent.pak

 extracting: /nix/store/ddwsjjafs7dna00prff0559ndk4881aw-react-native-debugger-0.7.18/version

  inflating: /nix/store/ddwsjjafs7dna00prff0559ndk4881aw-react-native-debugger-0.7.18/views_resources_200_percent.pak

/nix/store/ddwsjjafs7dna00prff0559ndk4881aw-react-native-debugger-0.7.18

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: react-native-debugger

Partial log (click to expand)

  inflating: /nix/store/cnnr0czasllfldyspqvg9ay5m9hy7bw4-react-native-debugger-0.7.18/natives_blob.bin
  inflating: /nix/store/cnnr0czasllfldyspqvg9ay5m9hy7bw4-react-native-debugger-0.7.18/pdf_viewer_resources.pak
   creating: /nix/store/cnnr0czasllfldyspqvg9ay5m9hy7bw4-react-native-debugger-0.7.18/resources/
  inflating: /nix/store/cnnr0czasllfldyspqvg9ay5m9hy7bw4-react-native-debugger-0.7.18/resources/app.asar
  inflating: /nix/store/cnnr0czasllfldyspqvg9ay5m9hy7bw4-react-native-debugger-0.7.18/resources/electron.asar
  inflating: /nix/store/cnnr0czasllfldyspqvg9ay5m9hy7bw4-react-native-debugger-0.7.18/snapshot_blob.bin
  inflating: /nix/store/cnnr0czasllfldyspqvg9ay5m9hy7bw4-react-native-debugger-0.7.18/ui_resources_200_percent.pak
 extracting: /nix/store/cnnr0czasllfldyspqvg9ay5m9hy7bw4-react-native-debugger-0.7.18/version
  inflating: /nix/store/cnnr0czasllfldyspqvg9ay5m9hy7bw4-react-native-debugger-0.7.18/views_resources_200_percent.pak
/nix/store/cnnr0czasllfldyspqvg9ay5m9hy7bw4-react-native-debugger-0.7.18

unzip $src -d $out

mkdir $out/{lib,bin,share}
mv $out/lib{node,ffmpeg}.so $out/lib
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the tarball bundles libnode.so and libffmpeg.so as binaries. Shoulnd't we use nixpkgs versions instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure though. I need a second, closer look at the prebuilt package as it could be possible that they're using some kind of modified shared objects

Copy link
Contributor

Choose a reason for hiding this comment

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

Might not be worth much effort since the main binary is a blob anyway.
Have you ever tried to build this from source?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, unfortunately not. This is a package I currently need for some projects and I wanted to file a patch with the expression I originally added to my personal overlay.
The thing is, building from source would require way more effort ATM as we would some kind of builder for electron apps first and regarding such a feature there are currently pending discussions in #26698, #17073 and this project: https://github.com/NixOS/nixpkgs/projects/6
As I don't think I'm sufficiently qualified for this job (and I don't think that I'll have enough time in the next months) I didn't work on this, however I'd rewrite the expression in case we have such a feature.

@Ma27 Ma27 force-pushed the package-react-native-debugger branch from ac92d09 to f43b40a Compare April 2, 2018 11:42
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: react-native-debugger

Partial log (click to expand)

  inflating: /nix/store/q4j2iy8k9bnwyf7xhjyr9dm6dy2f4fda-react-native-debugger-0.7.18/natives_blob.bin
  inflating: /nix/store/q4j2iy8k9bnwyf7xhjyr9dm6dy2f4fda-react-native-debugger-0.7.18/pdf_viewer_resources.pak
   creating: /nix/store/q4j2iy8k9bnwyf7xhjyr9dm6dy2f4fda-react-native-debugger-0.7.18/resources/
  inflating: /nix/store/q4j2iy8k9bnwyf7xhjyr9dm6dy2f4fda-react-native-debugger-0.7.18/resources/app.asar
  inflating: /nix/store/q4j2iy8k9bnwyf7xhjyr9dm6dy2f4fda-react-native-debugger-0.7.18/resources/electron.asar
  inflating: /nix/store/q4j2iy8k9bnwyf7xhjyr9dm6dy2f4fda-react-native-debugger-0.7.18/snapshot_blob.bin
  inflating: /nix/store/q4j2iy8k9bnwyf7xhjyr9dm6dy2f4fda-react-native-debugger-0.7.18/ui_resources_200_percent.pak
 extracting: /nix/store/q4j2iy8k9bnwyf7xhjyr9dm6dy2f4fda-react-native-debugger-0.7.18/version
  inflating: /nix/store/q4j2iy8k9bnwyf7xhjyr9dm6dy2f4fda-react-native-debugger-0.7.18/views_resources_200_percent.pak
/nix/store/q4j2iy8k9bnwyf7xhjyr9dm6dy2f4fda-react-native-debugger-0.7.18

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: react-native-debugger

Partial log (click to expand)

  inflating: /nix/store/4g4czx6iv5dinjcl3aab7lp2yl1hxlq0-react-native-debugger-0.7.18/natives_blob.bin
  inflating: /nix/store/4g4czx6iv5dinjcl3aab7lp2yl1hxlq0-react-native-debugger-0.7.18/pdf_viewer_resources.pak
   creating: /nix/store/4g4czx6iv5dinjcl3aab7lp2yl1hxlq0-react-native-debugger-0.7.18/resources/
  inflating: /nix/store/4g4czx6iv5dinjcl3aab7lp2yl1hxlq0-react-native-debugger-0.7.18/resources/app.asar
  inflating: /nix/store/4g4czx6iv5dinjcl3aab7lp2yl1hxlq0-react-native-debugger-0.7.18/resources/electron.asar
  inflating: /nix/store/4g4czx6iv5dinjcl3aab7lp2yl1hxlq0-react-native-debugger-0.7.18/snapshot_blob.bin
  inflating: /nix/store/4g4czx6iv5dinjcl3aab7lp2yl1hxlq0-react-native-debugger-0.7.18/ui_resources_200_percent.pak
 extracting: /nix/store/4g4czx6iv5dinjcl3aab7lp2yl1hxlq0-react-native-debugger-0.7.18/version
  inflating: /nix/store/4g4czx6iv5dinjcl3aab7lp2yl1hxlq0-react-native-debugger-0.7.18/views_resources_200_percent.pak
/nix/store/4g4czx6iv5dinjcl3aab7lp2yl1hxlq0-react-native-debugger-0.7.18

@Ma27 Ma27 force-pushed the package-react-native-debugger branch from bc90af8 to 767f4fe Compare April 2, 2018 11:57
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: react-native-debugger

Partial log (click to expand)

  inflating: /nix/store/l65r5ipl838qa0614s8w2jjin4iv0wc1-react-native-debugger-0.7.18/resources/electron.asar

  inflating: /nix/store/l65r5ipl838qa0614s8w2jjin4iv0wc1-react-native-debugger-0.7.18/snapshot_blob.bin

  inflating: /nix/store/l65r5ipl838qa0614s8w2jjin4iv0wc1-react-native-debugger-0.7.18/ui_resources_200_percent.pak

 extracting: /nix/store/l65r5ipl838qa0614s8w2jjin4iv0wc1-react-native-debugger-0.7.18/version
  inflating: /nix/store/l65r5ipl838qa0614s8w2jjin4iv0wc1-react-native-debugger-0.7.18/views_resources_200_percent.pak

/nix/store/l65r5ipl838qa0614s8w2jjin4iv0wc1-react-native-debugger-0.7.18

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: react-native-debugger

Partial log (click to expand)

  inflating: /nix/store/hwzyjs453y1cbdb85knb5ixnmgmnmqgv-react-native-debugger-0.7.18/natives_blob.bin
  inflating: /nix/store/hwzyjs453y1cbdb85knb5ixnmgmnmqgv-react-native-debugger-0.7.18/pdf_viewer_resources.pak
   creating: /nix/store/hwzyjs453y1cbdb85knb5ixnmgmnmqgv-react-native-debugger-0.7.18/resources/
  inflating: /nix/store/hwzyjs453y1cbdb85knb5ixnmgmnmqgv-react-native-debugger-0.7.18/resources/app.asar
  inflating: /nix/store/hwzyjs453y1cbdb85knb5ixnmgmnmqgv-react-native-debugger-0.7.18/resources/electron.asar
  inflating: /nix/store/hwzyjs453y1cbdb85knb5ixnmgmnmqgv-react-native-debugger-0.7.18/snapshot_blob.bin
  inflating: /nix/store/hwzyjs453y1cbdb85knb5ixnmgmnmqgv-react-native-debugger-0.7.18/ui_resources_200_percent.pak
 extracting: /nix/store/hwzyjs453y1cbdb85knb5ixnmgmnmqgv-react-native-debugger-0.7.18/version
  inflating: /nix/store/hwzyjs453y1cbdb85knb5ixnmgmnmqgv-react-native-debugger-0.7.18/views_resources_200_percent.pak
/nix/store/hwzyjs453y1cbdb85knb5ixnmgmnmqgv-react-native-debugger-0.7.18

@Ma27
Copy link
Member Author

Ma27 commented Apr 3, 2018

ok, just did some research: first of all it seems as especially the shared objects libnode.so and libffmpeg.so are used by from the upstream source (the electron apps postman, postman and kodestudio use the libnode.so bundled with the original package). Furthermore our nodejs package doesn't have a libnode.so in its output, just dev headers, binaries and docs.

The same can be observed with libffmpeg: kodestudio, postman and vivaldi use the upstream libffmpeg, furthermore nix-build -A ffmpeg.all doesn't have a prebuilt shared object so I guess that the current approach should be fine.

However I'm clearly aware that in the end a build from source might be the better solution, however this requires some more significant changes in nixpkgs I won't have time to develop/maintain ATM, but in case we build electron apps from source some day (see the issues I linked above), I'd offer to rewrite this derivation accordingly %)

@Ma27
Copy link
Member Author

Ma27 commented Apr 10, 2018

is there anything else to be discussed? Otherwise I'd love to see this merged :)

@matthewbauer matthewbauer merged commit aa22581 into NixOS:master Apr 17, 2018
@Ma27 Ma27 deleted the package-react-native-debugger branch April 17, 2018 15:06
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