Skip to content

Conversation

@Anton-Latukha
Copy link
Contributor

@Anton-Latukha Anton-Latukha commented Jul 8, 2021

These were blocked due to mutual desigion during me<>sternenseemann
discussion.

In short:

I shipped my own work (to support GHC 9.0) in the 0.5 releases of
hnix-store-{core,remote}.

These packages are really used only by hnix itself, and instead of maintaining
them in Nixpkgs & reacting on hnix release, we decided to hold them back &
switch to these versions when hnix provides support for them.

I just (today) released hnix 0.14 & it requires hnix-store-{core,remote}
0.5.

If you would look at dependency tree:
https://packdeps.haskellers.com/reverse/hnix-store-core
https://packdeps.haskellers.com/reverse/hnix-store-remote

It shows that hnix currently is the only alive use of these projects.

Motivation for this change
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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Relase notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Jul 8, 2021
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jul 8, 2021
@sternenseemann
Copy link
Member

If you run ./maintainers/scripts/haskell/regenerate-hackage-packages.sh you should be able to see the effects of your changes and test them as well (it generates pkgs/development/haskell-modules/hackage-packages.nix).

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jul 8, 2021

Recieved a clean diff:

diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index 364581829a7..a00deb16fff 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -131462,41 +131462,10 @@ self: {
        ];
        description = "Haskell implementation of the Nix language";
        license = lib.licenses.bsd3;
+       maintainers = with lib.maintainers; [ Anton-Latukha ];
      }) {};
 
   "hnix-store-core" = callPackage
-    ({ mkDerivation, algebraic-graphs, attoparsec, base
-     , base16-bytestring, base64-bytestring, binary, bytestring, cereal
-     , containers, cryptohash-md5, cryptohash-sha1, cryptohash-sha256
-     , cryptohash-sha512, directory, filepath, hashable, hspec
-     , lifted-base, monad-control, mtl, nix-derivation, process, saltine
-     , tasty, tasty-discover, tasty-golden, tasty-hspec, tasty-hunit
-     , tasty-quickcheck, temporary, text, time, unix
-     , unordered-containers, vector
-     }:
-     mkDerivation {
-       pname = "hnix-store-core";
-       version = "0.4.3.0";
-       sha256 = "17l7198s3dzjx416nplinyghbqgignvpvxkww241gjv4p23izf77";
-       libraryHaskellDepends = [
-         algebraic-graphs attoparsec base base16-bytestring
-         base64-bytestring bytestring cereal containers cryptohash-md5
-         cryptohash-sha1 cryptohash-sha256 cryptohash-sha512 directory
-         filepath hashable lifted-base monad-control mtl nix-derivation
-         saltine text time unix unordered-containers vector
-       ];
-       testHaskellDepends = [
-         attoparsec base base16-bytestring base64-bytestring binary
-         bytestring containers directory filepath hspec process tasty
-         tasty-golden tasty-hspec tasty-hunit tasty-quickcheck temporary
-         text unix
-       ];
-       testToolDepends = [ tasty-discover ];
-       description = "Core effects for interacting with the Nix store";
-       license = lib.licenses.asl20;
-     }) {};
-
-  "hnix-store-core_0_5_0_0" = callPackage
     ({ mkDerivation, algebraic-graphs, attoparsec, base
      , base16-bytestring, base64-bytestring, binary, bytestring, cereal
      , containers, cryptonite, directory, filepath, hashable, hspec
@@ -131526,27 +131495,10 @@ self: {
        testToolDepends = [ tasty-discover ];
        description = "Core effects for interacting with the Nix store";
        license = lib.licenses.asl20;
-       hydraPlatforms = lib.platforms.none;
+       maintainers = with lib.maintainers; [ Anton-Latukha ];
      }) {};
 
   "hnix-store-remote" = callPackage
-    ({ mkDerivation, attoparsec, base, binary, bytestring, containers
-     , hnix-store-core, mtl, network, nix-derivation, text, time
-     , unordered-containers
-     }:
-     mkDerivation {
-       pname = "hnix-store-remote";
-       version = "0.4.3.1";
-       sha256 = "1wp6z5f13fkgh3mdzr1zcqdvsx1j90l5isf671gsg43brsv4c2vl";
-       libraryHaskellDepends = [
-         attoparsec base binary bytestring containers hnix-store-core mtl
-         network nix-derivation text time unordered-containers
-       ];
-       description = "Remote hnix store";
-       license = lib.licenses.asl20;
-     }) {};
-
-  "hnix-store-remote_0_5_0_0" = callPackage
     ({ mkDerivation, attoparsec, base, binary, bytestring, containers
      , cryptonite, hnix-store-core, mtl, network, nix-derivation, text
      , time, unordered-containers
@@ -131562,7 +131514,7 @@ self: {
        ];
        description = "Remote hnix store";
        license = lib.licenses.asl20;
-       hydraPlatforms = lib.platforms.none;
+       maintainers = with lib.maintainers; [ Anton-Latukha ];
      }) {};
 
   "hnn" = callPackage

@sternenseemann
Copy link
Member

Feel free to commit this as well here (or right before unmarking as WIP to avoid merge conflicts).

@Anton-Latukha Anton-Latukha marked this pull request as ready for review July 8, 2021 14:36
@Anton-Latukha Anton-Latukha marked this pull request as draft July 8, 2021 14:37
@Anton-Latukha Anton-Latukha force-pushed the haskellPackages.upd-hnix-0.14 branch from e7173ec to 020e343 Compare July 8, 2021 14:41
@Anton-Latukha Anton-Latukha marked this pull request as ready for review July 8, 2021 14:42
@Anton-Latukha
Copy link
Contributor Author

Just an idea: if to produce a lot of files (maybe a file per project/package) - there probably would be drastically fewer regeneration diff conflicts (I think).

@sternenseemann
Copy link
Member

@ofborg build haskellPackages.hnix

@sternenseemann
Copy link
Member

When was the hnix release supporting the store packages?

@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jul 8, 2021
@maralorn
Copy link
Member

maralorn commented Jul 8, 2021

Just an idea: if to produce a lot of files (maybe a file per project/package) - there probably would be drastically fewer regeneration diff conflicts (I think).

I don‘t think this is necessary. Merge conflicts in the hackage-packages.nix are not that common in the first place.
I have never noticed a merge conflict caused by two unrelated packages. I assume the 99% of all our merge conflicts come from changes to the same package. And those are honest, real merge conflicts.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jul 8, 2021

When was the hnix release supporting the store packages?

Today. After releases to Hackage, if I can - I go & contribute patches to Nixpkgs.

@Gabriella439
Copy link
Contributor

I believe this is safe to merge into haskell-updates as the latest version of hnix on Hackage supports the latest versions of hnix-store-{core,remote}. I can merge this myself tomorrow if nobody objects

@sternenseemann
Copy link
Member

I guess we'll need to decide what to do about our hnix patches as well. The commits I originally reverted no longer apply with 0.14.*, so we either need update these patches and vendor them in or bite the bullet and override relude_1_0_0_1 and semialign_1_2, but I have no idea if this causes any issues in reverse dependencies…

Anton-Latukha and others added 4 commits July 18, 2021 11:15
These were blocked due to mutual desigion during me<>`sternenseemann`
discussion.
haskell-nix/hnix#952

In short:

I shipped my own work (to support GHC 9.0) in the 0.5 releases of
`hnix-store-{core,remote}`.

These packages are really used only by `hnix` itself, and instead of maintaining
them in Nixpkgs & reacting on `hnix` release, we decided to hold them back &
switch to these versions when `hnix` provides support for them.

I just (today) released `hnix` 0.14 & it requires `hnix-store-{core,remote}`
0.5.

If you would look at dependency tree:
https://packdeps.haskellers.com/reverse/hnix-store-core
https://packdeps.haskellers.com/reverse/hnix-store-remote

It shows that `hnix` currently is the only alive use of these projects.
hnix needs these versions since 0.13, but we previously patched it to
use the versions tracked in stackage because that reduces the risk of
multiple versions of a package being propagated in the dependency tree
and breaking a build.

One major release later, patching hnix has become quite cumbersome, so
we'll bite the bullet for now and return to this approach if any
problems come up.
Change to pname is necessary in order to not confuse jailbreak-cabal.
@sternenseemann sternenseemann force-pushed the haskellPackages.upd-hnix-0.14 branch from 020e343 to ff83117 Compare July 18, 2021 09:41
@sternenseemann
Copy link
Member

@ofborg build haskellPackages.nix-linter haskellPackages.dhall-nix haskellPackages.dhall-nixpkgs haskellPackages.yarn2nix

(update-nix-fetchgit builds locally, but its test suite fails, I guess that is something @expipiplus1 can have a look at later.)

@Gabriella439 Gabriella439 merged commit c2b2762 into NixOS:haskell-updates Jul 18, 2021
@Anton-Latukha Anton-Latukha deleted the haskellPackages.upd-hnix-0.14 branch July 18, 2021 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants