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

Sync all-cabal-hashes with a38a3e2 #32096

Merged
merged 7 commits into from Jan 13, 2018

Conversation

vaibhavsagar
Copy link
Member

@vaibhavsagar vaibhavsagar commented Nov 27, 2017

Motivation for this change

Bring all-cabal-hashes in line with a38a3e2 to facilitate easier and more frequent updates. I ran

git cherry-pick -x --strategy-option=theirs --no-merges --first-parent `git log --reverse --format=format:%H ..origin/master -- pkgs/data/misc/hackage/default.nix`

to cherry-pick these commits.

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.

peti and others added 7 commits November 27, 2017 13:35
OS X by default has a case-insensitive filesystem, and fetching
all-cabal-hashes there fails due to a hash mismatch caused by package
pairs like compactable and Compactable. This partitions the package set
such that each partition contains no equivalent-up-to-case pairs.

(cherry picked from commit 843e099)
This reverts commit ad6b8f4, reversing
changes made to 2d44e72.

(cherry picked from commit 8caf9f1)
@vaibhavsagar
Copy link
Member Author

Any more work on this required from me?

@jtojnar jtojnar closed this Dec 14, 2017
@jtojnar
Copy link
Contributor

jtojnar commented Dec 14, 2017

Sorry, accidentaly deleted release-17.09 branch

@jtojnar jtojnar reopened this Dec 14, 2017
@vaibhavsagar
Copy link
Member Author

Anything more needed from me?

@vaibhavsagar
Copy link
Member Author

Can this be merged please @peti 😃?

Copy link
Member

@peti peti left a comment

Choose a reason for hiding this comment

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

This PR does more then just updating the all-cabal-hashes repo. Did you test those changes?

mv */${name}/${version}/${name}.{json,cabal} $out
'';

hackage2nix = name: version: let component = all-cabal-hashes-component name version; in self.haskellSrc2nix {
Copy link
Member

Choose a reason for hiding this comment

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

Did you test whether those changes actually work in the release-17.09 branch?

Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like the changes only affect macOS users either way, and I don't have a machine running that OS to test on.

Copy link
Member Author

Choose a reason for hiding this comment

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

Otherwise pkgs/development/haskell-modules/make-package-set.nix is the only file that references all-cabal-hashes and they were updated in parallel.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also this has been backported to release-17.03 #32772

Copy link
Member

Choose a reason for hiding this comment

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

I guess this means the answer is no, you didn't test it.

Please do.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, done.

Copy link
Member

@peti peti left a comment

Choose a reason for hiding this comment

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

Please verify that the modified code still works on a machine running nixos-17.09.

@vaibhavsagar
Copy link
Member Author

This works without any issues:

let
  inherit (import <nixpkgs> {}) fetchFromGitHub fetchurl lib stdenv;
  patch = fetchurl {
    url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/32096.diff";
    sha256 = "1pxx8br2b9h4fwk8kskhq4i5f73cbywaf587vpf272z5lgqsb1fd";
  };
  nixpkgs = fetchFromGitHub {
    owner = "NixOS";
    repo = "nixpkgs-channels";
    rev = "0653b73bf61f3a23d28c38ab7e9c69a318d433de";
    sha256 = "0s9m3g6nj7bflmrbhx8pcna6s8c9npn75p8ngyj5s8zbdaj7rs7l";
  };
  patched   = stdenv.mkDerivation {
    name = "patched-nixpkgs";
    src = nixpkgs;
    patches = [ patch ];
    installPhase = ''
      mkdir $out
      cp -R . $out/
    '';
  };
in (import patched {}).pkgs.haskellPackages.callHackage "ipython-kernel" "0.9.0.0" {}

Is there a more comprehensive test you had in mind?

@peti peti merged commit ca67494 into NixOS:release-17.09 Jan 13, 2018
@vaibhavsagar vaibhavsagar deleted the sync-all-cabal-hashes branch January 13, 2018 10:18
@vaibhavsagar
Copy link
Member Author

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

6 participants