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

dart: 0.4 -> 1.16.1 #15947

Merged
merged 1 commit into from
Jun 7, 2016
Merged

dart: 0.4 -> 1.16.1 #15947

merged 1 commit into from
Jun 7, 2016

Conversation

jirkadanek
Copy link
Member

Motivation for this change
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
    • OS X
    • Linux
  • 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.

Update to the original PR #468. Package is still based on binary release.

I've been working with it for a day and it seems to be working. It is my first package,
so if you have any comments and suggestions for improvements, would be
glad to hear them.

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @zefhemel, @gridaphobe and @jwiegley to be potential reviewers

@jirkadanek jirkadanek force-pushed the dart branch 2 times, most recently from d3d9e6b to 9597487 Compare June 3, 2016 08:35
@groxxda
Copy link
Contributor

groxxda commented Jun 3, 2016

  • No need to add unzip as a dependency and explicitly call it in unpackPhase.
    The default unpackPhase will try to figure out the archive type and should do everything automagically for you if you set the src attribute of the derivation. (either move it down into mkDerivation { or use inherit src inside mkDerivation)
  • I think the assertion for system can be replaced with meta.platforms = [ "i686-linux" "x86_64-linux" ]

@jirkadanek
Copy link
Member Author

@groxxda default unpackPhase does not unzip it for me,

$ nix-env -f nixpkgs -i dart
replacing old ‘dart-1.16.1’
installing ‘dart-1.16.1’
download-from-binary-cache.pl: still waiting for ‘https://cache.nixos.org/i4fv222893f2dybhvxd19308z1sns8rx.narinfo’ after 5 seconds...
these derivations will be built:
/nix/store/a4zqnx92bj58j4c9mhyyxjl4q6bk5qdg-dart-1.16.1.drv
building path(s) ‘/nix/store/i4fv222893f2dybhvxd19308z1sns8rx-dart-1.16.1’
unpacking sources
unpacking source archive /nix/store/bpi2j1gri3w3hrxfw0zk132fvw6g2kfh-dartsdk-linux-x64-release.zip
do not know how to unpack source archive /nix/store/bpi2j1gri3w3hrxfw0zk132fvw6g2kfh-dartsdk-linux-x64-release.zip
builder for ‘/nix/store/a4zqnx92bj58j4c9mhyyxjl4q6bk5qdg-dart-1.16.1.drv’ failed with exit code 1
error: build of ‘/nix/store/a4zqnx92bj58j4c9mhyyxjl4q6bk5qdg-dart-1.16.1.drv’ failed

Looking at https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L497 suggests that it does not know about zips.

@groxxda
Copy link
Contributor

groxxda commented Jun 3, 2016

Sorry - you have to add unzip to buildInputs or better nativeBuildInputs. Unpacking should then happen without explicitly setting unpackPhase. Thanks to unzip/setup-hook.sh

@jirkadanek
Copy link
Member Author

So much magic ;) I fixed it according to your suggestions.

chmod +x $out/bin/dart2js
'';

name = "dart-1.16.1";
Copy link
Contributor

Choose a reason for hiding this comment

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

To make updating more convenient, you could add a separate version attribute and re-use it both in the name and in the source urls below.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@joachifm joachifm merged commit c259ad9 into NixOS:master Jun 7, 2016
@jirkadanek jirkadanek deleted the dart branch June 7, 2016 12:45
@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants