From eddd889ebc4e93a89fe93d90ce5a69bdbb9a3131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Boros?= Date: Mon, 9 May 2022 11:03:51 +0300 Subject: [PATCH 1/6] extra-hackages wip --- flake.lock | 25 +++++++++++++++++++++++++ flake.nix | 24 ++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index d8ccfacb..9fe5f577 100644 --- a/flake.lock +++ b/flake.lock @@ -389,6 +389,30 @@ "type": "github" } }, + "haskell-nix-extra-hackage": { + "inputs": { + "haskell-nix": [ + "haskell-nix" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1653405678, + "narHash": "sha256-fPpPxuCZDF5b/iQgmUg2jspPObsK0mpcchUti/LR8D0=", + "owner": "mlabs-haskell", + "repo": "haskell-nix-extra-hackage", + "rev": "cf4613eb0d883a8c12c86d7cdbdaaf15fdc70128", + "type": "github" + }, + "original": { + "owner": "mlabs-haskell", + "ref": "main", + "repo": "haskell-nix-extra-hackage", + "type": "github" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -726,6 +750,7 @@ "flat": "flat", "goblins": "goblins", "haskell-nix": "haskell-nix", + "haskell-nix-extra-hackage": "haskell-nix-extra-hackage", "iohk-monitoring-framework": "iohk-monitoring-framework", "iohk-nix": "iohk-nix", "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 8017cc67..8a162b24 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,12 @@ nixpkgs.follows = "haskell-nix/nixpkgs-unstable"; + haskell-nix-extra-hackage = { + url = "github:mlabs-haskell/haskell-nix-extra-hackage/main"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.haskell-nix.follows = "haskell-nix"; + }; + iohk-nix.url = "github:input-output-hk/iohk-nix"; iohk-nix.flake = false; # Bad Nix code @@ -335,16 +341,31 @@ } ]; + extraHackagePackages = with nixpkgs.lib; + (concatLists (map + (extraSource: (map + (subdir: + if subdir == "." then extraSource.src.outPath else "${extraSource.src.outPath}/${subdir}") + extraSource.subdirs)) + extraSources)); + projectFor = system: let pkgs = nixpkgsFor system; pkgs' = nixpkgsFor' system; + # Usage: + extraHackage = inputs.haskell-nix-extra-hackage.mkHackage.${system} extraHackagePackages; in pkgs.haskell-nix.cabalProject' { src = ./.; - inherit cabalProjectLocal extraSources; + inherit cabalProjectLocal; name = "bot-plutus-interface"; compiler-nix-name = "ghc8107"; + + extra-hackages = [ (import extraHackage.hackageNix) ]; + extra-hackage-tarballs = [{ name = "extraHackage"; index = extraHackage.hackageTarball; }]; + modules = [ extraHackage.module ] ++ haskellModules; + shell = { additional = ps: [ ps.plutus-pab @@ -364,7 +385,6 @@ nixpkgs-fmt ]; }; - modules = haskellModules; }; formatCheckFor = system: From cc99c39106f0ea6b32e986b275a6788e24df4c99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Boros?= Date: Mon, 13 Jun 2022 12:39:37 +0300 Subject: [PATCH 2/6] use separate hackages --- flake.lock | 416 +++++++++++++++++++++++++++++++++++++++++++++++++++-- flake.nix | 27 ++-- 2 files changed, 412 insertions(+), 31 deletions(-) diff --git a/flake.lock b/flake.lock index 9fe5f577..6b1c2970 100644 --- a/flake.lock +++ b/flake.lock @@ -16,6 +16,22 @@ "type": "github" } }, + "HTTP_2": { + "flake": false, + "locked": { + "lastModified": 1451647621, + "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", + "owner": "phadej", + "repo": "HTTP", + "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "type": "github" + }, + "original": { + "owner": "phadej", + "repo": "HTTP", + "type": "github" + } + }, "Win32-network": { "flake": false, "locked": { @@ -50,6 +66,23 @@ "type": "github" } }, + "cabal-32_2": { + "flake": false, + "locked": { + "lastModified": 1603716527, + "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", + "owner": "haskell", + "repo": "cabal", + "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.2", + "repo": "cabal", + "type": "github" + } + }, "cabal-34": { "flake": false, "locked": { @@ -67,6 +100,23 @@ "type": "github" } }, + "cabal-34_2": { + "flake": false, + "locked": { + "lastModified": 1640353650, + "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", + "owner": "haskell", + "repo": "cabal", + "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.4", + "repo": "cabal", + "type": "github" + } + }, "cabal-36": { "flake": false, "locked": { @@ -84,6 +134,23 @@ "type": "github" } }, + "cabal-36_2": { + "flake": false, + "locked": { + "lastModified": 1641652457, + "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", + "owner": "haskell", + "repo": "cabal", + "rev": "f27667f8ec360c475027dcaee0138c937477b070", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.6", + "repo": "cabal", + "type": "github" + } + }, "cardano-addresses": { "flake": false, "locked": { @@ -219,6 +286,22 @@ "type": "github" } }, + "cardano-shell_2": { + "flake": false, + "locked": { + "lastModified": 1608537748, + "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", + "owner": "input-output-hk", + "repo": "cardano-shell", + "rev": "9392c75087cb9a3d453998f4230930dea3a95725", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-shell", + "type": "github" + } + }, "cardano-wallet": { "flake": false, "locked": { @@ -284,6 +367,21 @@ "type": "github" } }, + "flake-utils_2": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "flat": { "flake": false, "locked": { @@ -318,6 +416,23 @@ "type": "github" } }, + "ghc-8.6.5-iohk_2": { + "flake": false, + "locked": { + "lastModified": 1600920045, + "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", + "owner": "input-output-hk", + "repo": "ghc", + "rev": "95713a6ecce4551240da7c96b6176f980af75cae", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "release/8.6.5-iohk", + "repo": "ghc", + "type": "github" + } + }, "goblins": { "flake": false, "locked": { @@ -351,6 +466,22 @@ "type": "github" } }, + "hackage_2": { + "flake": false, + "locked": { + "lastModified": 1653354979, + "narHash": "sha256-9plpFM3DkPb13FW25LVyfCpqnzs5nzMMWw42SOZpzGE=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "b63711c848a8d2ec8ae189ad291ce54bb041874d", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "hackage.nix", + "type": "github" + } + }, "haskell-nix": { "inputs": { "HTTP": "HTTP", @@ -376,43 +507,82 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1652698457, - "narHash": "sha256-o9UvhU9QwdzXTFOnRB+MTQ0+fP5DblInxHoXqN6DplA=", - "owner": "mlabs-haskell", + "lastModified": 1657243185, + "narHash": "sha256-NBRXxHfUZ2Ti5FeGaLLVh/RYOh7+Y7KUzQpO55N+tZ8=", + "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "269936645c92aa74b8b0695e96a1c92fd108f8aa", + "rev": "3dadce6f09711ef473ea97d782ec2fe001903872", "type": "github" }, "original": { - "owner": "mlabs-haskell", + "owner": "input-output-hk", "repo": "haskell.nix", "type": "github" } }, "haskell-nix-extra-hackage": { "inputs": { - "haskell-nix": [ - "haskell-nix" - ], + "haskell-nix": "haskell-nix_2", "nixpkgs": [ - "nixpkgs" + "haskell-nix-extra-hackage", + "haskell-nix", + "nixpkgs-unstable" ] }, "locked": { - "lastModified": 1653405678, - "narHash": "sha256-fPpPxuCZDF5b/iQgmUg2jspPObsK0mpcchUti/LR8D0=", + "lastModified": 1655143375, + "narHash": "sha256-yU+HPLwGPf5IeLj9IBQ1zrPBTYEwvYbuMnADs4T8RLQ=", "owner": "mlabs-haskell", "repo": "haskell-nix-extra-hackage", - "rev": "cf4613eb0d883a8c12c86d7cdbdaaf15fdc70128", + "rev": "03ee7afdc1ad982e059e3941db80f7a5b30a2757", "type": "github" }, "original": { "owner": "mlabs-haskell", - "ref": "main", + "ref": "separate-hackages", "repo": "haskell-nix-extra-hackage", "type": "github" } }, + "haskell-nix_2": { + "inputs": { + "HTTP": "HTTP_2", + "cabal-32": "cabal-32_2", + "cabal-34": "cabal-34_2", + "cabal-36": "cabal-36_2", + "cardano-shell": "cardano-shell_2", + "flake-utils": "flake-utils_2", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_2", + "hackage": "hackage_2", + "hpc-coveralls": "hpc-coveralls_2", + "hydra": "hydra_2", + "nix-tools": "nix-tools_2", + "nixpkgs": [ + "haskell-nix-extra-hackage", + "haskell-nix", + "nixpkgs-unstable" + ], + "nixpkgs-2003": "nixpkgs-2003_2", + "nixpkgs-2105": "nixpkgs-2105_2", + "nixpkgs-2111": "nixpkgs-2111_2", + "nixpkgs-unstable": "nixpkgs-unstable_2", + "old-ghc-nix": "old-ghc-nix_2", + "stackage": "stackage_2" + }, + "locked": { + "lastModified": 1653394713, + "narHash": "sha256-zPiZPoPn37t71QcpYjImboI9WV8ctXCcHPPhV++O+pI=", + "owner": "input-output-hk", + "repo": "haskell.nix", + "rev": "449d80f722a49e6bb893dbc8533e9ec2d4bd7072", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "haskell.nix", + "type": "github" + } + }, "hpc-coveralls": { "flake": false, "locked": { @@ -429,6 +599,22 @@ "type": "github" } }, + "hpc-coveralls_2": { + "flake": false, + "locked": { + "lastModified": 1607498076, + "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", + "type": "github" + }, + "original": { + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "type": "github" + } + }, "hydra": { "inputs": { "nix": "nix", @@ -452,6 +638,30 @@ "type": "indirect" } }, + "hydra_2": { + "inputs": { + "nix": "nix_2", + "nixpkgs": [ + "haskell-nix-extra-hackage", + "haskell-nix", + "hydra", + "nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1646878427, + "narHash": "sha256-KtbrofMtN8GlM7D+n90kixr7QpSlVmdN+vK5CA/aRzc=", + "owner": "NixOS", + "repo": "hydra", + "rev": "28b682b85b7efc5cf7974065792a1f22203a5927", + "type": "github" + }, + "original": { + "id": "hydra", + "type": "indirect" + } + }, "iohk-monitoring-framework": { "flake": false, "locked": { @@ -501,6 +711,22 @@ "type": "github" } }, + "lowdown-src_2": { + "flake": false, + "locked": { + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "repo": "lowdown", + "type": "github" + } + }, "nix": { "inputs": { "lowdown-src": "lowdown-src", @@ -538,6 +764,43 @@ "type": "github" } }, + "nix-tools_2": { + "flake": false, + "locked": { + "lastModified": 1649424170, + "narHash": "sha256-XgKXWispvv5RCvZzPb+p7e6Hy3LMuRjafKMl7kXzxGw=", + "owner": "input-output-hk", + "repo": "nix-tools", + "rev": "e109c94016e3b6e0db7ed413c793e2d4bdb24aa7", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "nix-tools", + "type": "github" + } + }, + "nix_2": { + "inputs": { + "lowdown-src": "lowdown-src_2", + "nixpkgs": "nixpkgs_2", + "nixpkgs-regression": "nixpkgs-regression_2" + }, + "locked": { + "lastModified": 1643066034, + "narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=", + "owner": "NixOS", + "repo": "nix", + "rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "2.6.0", + "repo": "nix", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1632864508, @@ -569,6 +832,22 @@ "type": "github" } }, + "nixpkgs-2003_2": { + "locked": { + "lastModified": 1620055814, + "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-20.03-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-2105": { "locked": { "lastModified": 1645296114, @@ -585,6 +864,22 @@ "type": "github" } }, + "nixpkgs-2105_2": { + "locked": { + "lastModified": 1645296114, + "narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-2111": { "locked": { "lastModified": 1648744337, @@ -601,6 +896,22 @@ "type": "github" } }, + "nixpkgs-2111_2": { + "locked": { + "lastModified": 1648744337, + "narHash": "sha256-bYe1dFJAXovjqiaPKrmAbSBEK5KUkgwVaZcTbSoJ7hg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0a58eebd8ec65ffdef2ce9562784123a73922052", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -616,6 +927,21 @@ "type": "indirect" } }, + "nixpkgs-regression_2": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "indirect" + } + }, "nixpkgs-unstable": { "locked": { "lastModified": 1648219316, @@ -632,6 +958,37 @@ "type": "github" } }, + "nixpkgs-unstable_2": { + "locked": { + "lastModified": 1648219316, + "narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1632864508, + "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-21.05-small", + "type": "indirect" + } + }, "old-ghc-nix": { "flake": false, "locked": { @@ -649,6 +1006,23 @@ "type": "github" } }, + "old-ghc-nix_2": { + "flake": false, + "locked": { + "lastModified": 1631092763, + "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", + "owner": "angerman", + "repo": "old-ghc-nix", + "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "type": "github" + }, + "original": { + "owner": "angerman", + "ref": "master", + "repo": "old-ghc-nix", + "type": "github" + } + }, "optparse-applicative": { "flake": false, "locked": { @@ -797,6 +1171,22 @@ "repo": "stackage.nix", "type": "github" } + }, + "stackage_2": { + "flake": false, + "locked": { + "lastModified": 1653355076, + "narHash": "sha256-mQdOgAyFkLUJBPrVDZmZQ2JRtgHKOQkil//SDdcjP1U=", + "owner": "input-output-hk", + "repo": "stackage.nix", + "rev": "71b16ca68d6acd639121db43238896357fe53f54", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "stackage.nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 8a162b24..50dd35ad 100644 --- a/flake.nix +++ b/flake.nix @@ -2,16 +2,9 @@ description = "bot-plutus-interface"; inputs = { - haskell-nix.url = "github:mlabs-haskell/haskell.nix"; - + haskell-nix.url = "github:input-output-hk/haskell.nix"; nixpkgs.follows = "haskell-nix/nixpkgs-unstable"; - - haskell-nix-extra-hackage = { - url = "github:mlabs-haskell/haskell-nix-extra-hackage/main"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.haskell-nix.follows = "haskell-nix"; - }; - + haskell-nix-extra-hackage.url = "github:mlabs-haskell/haskell-nix-extra-hackage/separate-hackages"; iohk-nix.url = "github:input-output-hk/iohk-nix"; iohk-nix.flake = false; # Bad Nix code @@ -349,22 +342,20 @@ extraSource.subdirs)) extraSources)); + compiler-nix-name = "ghc8107"; + projectFor = system: let pkgs = nixpkgsFor system; pkgs' = nixpkgsFor' system; - # Usage: - extraHackage = inputs.haskell-nix-extra-hackage.mkHackage.${system} extraHackagePackages; + extraHackages = inputs.haskell-nix-extra-hackage.mkHackagesFor system compiler-nix-name extraHackagePackages; in pkgs.haskell-nix.cabalProject' { - src = ./.; - inherit cabalProjectLocal; name = "bot-plutus-interface"; - compiler-nix-name = "ghc8107"; - - extra-hackages = [ (import extraHackage.hackageNix) ]; - extra-hackage-tarballs = [{ name = "extraHackage"; index = extraHackage.hackageTarball; }]; - modules = [ extraHackage.module ] ++ haskellModules; + src = ./.; + inherit compiler-nix-name cabalProjectLocal; + inherit (extraHackages) extra-hackages extra-hackage-tarballs; + modules = extraHackages.modules ++ haskellModules; shell = { additional = ps: [ From 938bc554082307832e93d21e24818be04040a07d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Boros?= Date: Sat, 9 Jul 2022 17:46:16 +0300 Subject: [PATCH 3/6] update haskell.nix --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 6b1c2970..ac791f07 100644 --- a/flake.lock +++ b/flake.lock @@ -453,11 +453,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1652663624, - "narHash": "sha256-WeZYALZ6wjXJaMi0ZiSLq5A/ybvES8vN3zPozUgzkFs=", + "lastModified": 1657331142, + "narHash": "sha256-66DTZat0R4GOdn0hhe6s+P1Dr+PvFNPBSB8GlBYJmn0=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "70c6780e617190a1ecc26bd004ece9ea67dcc260", + "rev": "0a0c08cfa874869f45b6057396c304ee963abd0a", "type": "github" }, "original": { @@ -507,11 +507,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1657243185, - "narHash": "sha256-NBRXxHfUZ2Ti5FeGaLLVh/RYOh7+Y7KUzQpO55N+tZ8=", + "lastModified": 1657331255, + "narHash": "sha256-hcoaMYyd9Kw8XOFBiWyM+niC0eQRVoHRfaGHOasWc5I=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "3dadce6f09711ef473ea97d782ec2fe001903872", + "rev": "76d714fb6a51766e1c57a1d89bfc6daf1f26914f", "type": "github" }, "original": { @@ -1159,11 +1159,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1652577319, - "narHash": "sha256-zZxCo7vIdyjZueJD3VoR7YImsS54dRhqqVRcsLqUBP0=", + "lastModified": 1657158738, + "narHash": "sha256-OB0dqydyccjQzpYKj8i5FHWYMVCvnA5bK9VTbhALUPk=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "49dfbc9cbf38cbf8180a432fcd6d390326c74fba", + "rev": "8593d6930e22f759aa5ee0c11068396ae6e5ba8a", "type": "github" }, "original": { From 31c32c107b61da56c1324ef3db0d2ff4194b764f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Boros?= Date: Thu, 28 Jul 2022 17:21:56 +0300 Subject: [PATCH 4/6] cleanup --- flake.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 50dd35ad..4ecd7527 100644 --- a/flake.nix +++ b/flake.nix @@ -348,14 +348,14 @@ let pkgs = nixpkgsFor system; pkgs' = nixpkgsFor' system; - extraHackages = inputs.haskell-nix-extra-hackage.mkHackagesFor system compiler-nix-name extraHackagePackages; + myHackages = inputs.haskell-nix-extra-hackage.mkHackagesFor system compiler-nix-name extraHackagePackages; in pkgs.haskell-nix.cabalProject' { name = "bot-plutus-interface"; src = ./.; inherit compiler-nix-name cabalProjectLocal; - inherit (extraHackages) extra-hackages extra-hackage-tarballs; - modules = extraHackages.modules ++ haskellModules; + inherit (myHackages) extra-hackages extra-hackage-tarballs; + modules = myHackages.modules ++ haskellModules; shell = { additional = ps: [ From 5f63aa490f79874d1513c4728579e0ba37ffb106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Boros?= Date: Thu, 28 Jul 2022 17:22:26 +0300 Subject: [PATCH 5/6] disable withHoogle to avoid wl-pprint-text error --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 4ecd7527..483736cc 100644 --- a/flake.nix +++ b/flake.nix @@ -361,7 +361,7 @@ additional = ps: [ ps.plutus-pab ]; - withHoogle = true; + withHoogle = false; tools.haskell-language-server = { }; exactDeps = true; nativeBuildInputs = with pkgs'; [ From 79d85cfc82ecaba96c73600a1cef8151c08e09be Mon Sep 17 00:00:00 2001 From: mangoiv Date: Mon, 8 Aug 2022 23:11:04 +0200 Subject: [PATCH 6/6] made some progress; apparently cardano-ledger/libs/compact-map is misconfigured --- flake.lock | 78 +++++++++---- flake.nix | 320 ++++++++++++++++++++++------------------------------- 2 files changed, 190 insertions(+), 208 deletions(-) diff --git a/flake.lock b/flake.lock index ac791f07..fae9a5bc 100644 --- a/flake.lock +++ b/flake.lock @@ -453,11 +453,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1657331142, - "narHash": "sha256-66DTZat0R4GOdn0hhe6s+P1Dr+PvFNPBSB8GlBYJmn0=", + "lastModified": 1659921206, + "narHash": "sha256-5LfFJ63AONLNEEV+/NuYNdOP/yvLi74sHC7fOhoWvsw=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "0a0c08cfa874869f45b6057396c304ee963abd0a", + "rev": "e94dd12505fd8dbf45b3725ed2484281780a9219", "type": "github" }, "original": { @@ -502,16 +502,17 @@ "nixpkgs-2003": "nixpkgs-2003", "nixpkgs-2105": "nixpkgs-2105", "nixpkgs-2111": "nixpkgs-2111", + "nixpkgs-2205": "nixpkgs-2205", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", "stackage": "stackage" }, "locked": { - "lastModified": 1657331255, - "narHash": "sha256-hcoaMYyd9Kw8XOFBiWyM+niC0eQRVoHRfaGHOasWc5I=", + "lastModified": 1659921359, + "narHash": "sha256-VVSBPAvel9xFuKAblveuSR0Yc1l7uwhif2c1gE1esOM=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "76d714fb6a51766e1c57a1d89bfc6daf1f26914f", + "rev": "ba13d45d93ccb0a32f3ae397d99f280482083ef4", "type": "github" }, "original": { @@ -751,11 +752,11 @@ "nix-tools": { "flake": false, "locked": { - "lastModified": 1649424170, - "narHash": "sha256-XgKXWispvv5RCvZzPb+p7e6Hy3LMuRjafKMl7kXzxGw=", + "lastModified": 1659569011, + "narHash": "sha256-wHS0H5+TERmDnPCfzH4A+rSR5TvjYMWus9BNeNAMyUM=", "owner": "input-output-hk", "repo": "nix-tools", - "rev": "e109c94016e3b6e0db7ed413c793e2d4bdb24aa7", + "rev": "555d57e1ea81b79945f2608aa261df20f6b602a5", "type": "github" }, "original": { @@ -850,11 +851,11 @@ }, "nixpkgs-2105": { "locked": { - "lastModified": 1645296114, - "narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=", + "lastModified": 1655034179, + "narHash": "sha256-rf1/7AbzuYDw6+8Xvvf3PtEOygymLBrFsFxvext5ZjI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1", + "rev": "046ee4af7a9f016a364f8f78eeaa356ba524ac31", "type": "github" }, "original": { @@ -882,11 +883,11 @@ }, "nixpkgs-2111": { "locked": { - "lastModified": 1648744337, - "narHash": "sha256-bYe1dFJAXovjqiaPKrmAbSBEK5KUkgwVaZcTbSoJ7hg=", + "lastModified": 1656782578, + "narHash": "sha256-1eMCBEqJplPotTo/SZ/t5HU6Sf2I8qKlZi9MX7jv9fw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0a58eebd8ec65ffdef2ce9562784123a73922052", + "rev": "573603b7fdb9feb0eb8efc16ee18a015c667ab1b", "type": "github" }, "original": { @@ -912,6 +913,22 @@ "type": "github" } }, + "nixpkgs-2205": { + "locked": { + "lastModified": 1657876628, + "narHash": "sha256-URmf0O2cQ/3heg2DJOeLyU/JmfVMqG4X5t9crQXMaeY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "549d82bdd40f760a438c3c3497c1c61160f3de55", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-22.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -944,11 +961,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1648219316, - "narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=", + "lastModified": 1657888067, + "narHash": "sha256-GnwJoFBTPfW3+mz7QEeJEEQ9OMHZOiIJ/qDhZxrlKh8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634", + "rev": "65fae659e31098ca4ac825a6fef26d890aaf3f4e", "type": "github" }, "original": { @@ -1136,7 +1153,8 @@ "plutus": "plutus", "plutus-apps": "plutus-apps", "purescript-bridge": "purescript-bridge", - "servant-purescript": "servant-purescript" + "servant-purescript": "servant-purescript", + "wl-pprint-text": "wl-pprint-text" } }, "servant-purescript": { @@ -1159,11 +1177,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1657158738, - "narHash": "sha256-OB0dqydyccjQzpYKj8i5FHWYMVCvnA5bK9VTbhALUPk=", + "lastModified": 1659921295, + "narHash": "sha256-7+4ywHfEXT9BW2YCTuVmRe/874U8DecPO8FmG1IDzzk=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "8593d6930e22f759aa5ee0c11068396ae6e5ba8a", + "rev": "c0d746c9b8d1b0125a25cebbec577a78997d4c2a", "type": "github" }, "original": { @@ -1187,6 +1205,22 @@ "repo": "stackage.nix", "type": "github" } + }, + "wl-pprint-text": { + "flake": false, + "locked": { + "lastModified": 1641715121, + "narHash": "sha256-oNSvaGKmpmYUsnQ4kVunXNGDSkHgRe2GTuyaNJr4VWY=", + "owner": "ivan-m", + "repo": "wl-pprint-text", + "rev": "2b0d0429fe4ca2bb2c29aa908976704ec542d06f", + "type": "github" + }, + "original": { + "owner": "ivan-m", + "repo": "wl-pprint-text", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 483736cc..4cc8b6ea 100644 --- a/flake.nix +++ b/flake.nix @@ -113,6 +113,11 @@ "github:input-output-hk/Win32-network/3825d3abf75f83f406c1f7161883c438dac7277d"; flake = false; }; + + wl-pprint-text = { + url = "github:ivan-m/wl-pprint-text"; + flake = false; + }; }; outputs = { self, nixpkgs, haskell-nix, iohk-nix, ... }@inputs: @@ -156,198 +161,139 @@ ) ]; - extraSources = [ - { - src = inputs.cardano-addresses; - subdirs = [ "core" "command-line" ]; - } - { - src = inputs.cardano-base; - subdirs = [ - "base-deriving-via" - "binary" - "binary/test" - "cardano-crypto-class" - "cardano-crypto-praos" - "cardano-crypto-tests" - "measures" - "orphans-deriving-via" - "slotting" - "strict-containers" - ]; - } - { - src = inputs.cardano-crypto; - subdirs = [ "." ]; - } - { - src = inputs.cardano-ledger; - subdirs = [ - "eras/alonzo/impl" - "eras/byron/chain/executable-spec" - "eras/byron/crypto" - "eras/byron/crypto/test" - "eras/byron/ledger/executable-spec" - "eras/byron/ledger/impl" - "eras/byron/ledger/impl/test" - "eras/shelley/impl" - "eras/shelley-ma/impl" - "eras/shelley/test-suite" - "libs/cardano-data" - "libs/cardano-ledger-core" - "libs/cardano-ledger-pretty" - "libs/cardano-protocol-tpraos" - "libs/compact-map" - "libs/non-integral" - "libs/set-algebra" - "libs/small-steps" - "libs/small-steps-test" - ]; - } - { - src = inputs.cardano-node; - subdirs = [ - "cardano-api" - "cardano-node" - "cardano-cli" - "cardano-git-rev" - "trace-resources" - "trace-forward" - "trace-dispatcher" - ]; - } - { - src = inputs.cardano-config; - subdirs = [ "." ]; - } - { - src = inputs.cardano-prelude; - subdirs = [ "cardano-prelude" "cardano-prelude-test" ]; - } - { - src = inputs.cardano-wallet; - subdirs = [ - "lib/cli" - "lib/core" - "lib/core-integration" - "lib/dbvar" - "lib/launcher" - "lib/numeric" - "lib/shelley" - "lib/strict-non-empty-containers" - "lib/test-utils" - "lib/text-class" - ]; - } - { - src = inputs.ekg-forward; - subdirs = [ "." ]; - } - { - src = inputs.flat; - subdirs = [ "." ]; - } - { - src = inputs.goblins; - subdirs = [ "." ]; - } - { - src = inputs.iohk-monitoring-framework; - subdirs = [ - "iohk-monitoring" - "tracer-transformers" - "contra-tracer" - "plugins/backend-aggregation" - "plugins/backend-ekg" - "plugins/backend-monitoring" - "plugins/backend-trace-forwarder" - "plugins/scribe-systemd" - ]; - } - { - src = inputs.optparse-applicative; - subdirs = [ "." ]; - } - { - src = inputs.ouroboros-network; - subdirs = [ - "io-classes" - "io-sim" - "strict-stm" - "monoidal-synchronisation" - "network-mux" - "ntp-client" - "ouroboros-consensus" - "ouroboros-consensus-byron" - "ouroboros-consensus-cardano" - "ouroboros-consensus-protocol" - "ouroboros-consensus-shelley" - "ouroboros-network" - "ouroboros-network-framework" - "ouroboros-network-testing" - "typed-protocols" - "typed-protocols-cborg" - "typed-protocols-examples" - ]; - } - { - src = inputs.plutus; - subdirs = [ - "plutus-core" - "plutus-ledger-api" - "plutus-tx" - "plutus-tx-plugin" - "prettyprinter-configurable" - "stubs/plutus-ghc-stub" - "word-array" - ]; - } - { - src = inputs.plutus-apps; - subdirs = [ - "doc" - "freer-extras" - "playground-common" - "plutus-chain-index" - "plutus-chain-index-core" - "plutus-contract" - "plutus-ledger" - "plutus-ledger-constraints" - "plutus-pab" - "plutus-playground-server" - "plutus-use-cases" - "quickcheck-dynamic" - "web-ghc" - ]; - } - { - src = inputs.purescript-bridge; - subdirs = [ "." ]; - } - { - src = inputs.servant-purescript; - subdirs = [ "." ]; - } - { - src = inputs.Win32-network; - subdirs = [ "." ]; - } - ]; + extraHackagePackages = [ + "${inputs.Win32-network}" + + "${inputs.cardano-addresses}/command-line" + "${inputs.cardano-addresses}/core" + + "${inputs.cardano-base}/base-deriving-via" + "${inputs.cardano-base}/binary" + "${inputs.cardano-base}/binary/test" + "${inputs.cardano-base}/cardano-crypto-class" + "${inputs.cardano-base}/cardano-crypto-praos" + "${inputs.cardano-base}/cardano-crypto-tests" + "${inputs.cardano-base}/measures" + "${inputs.cardano-base}/orphans-deriving-via" + "${inputs.cardano-base}/slotting" + "${inputs.cardano-base}/strict-containers" + + "${inputs.cardano-config}" + + "${inputs.cardano-crypto}" + + "${inputs.cardano-ledger}/eras/alonzo/impl" + "${inputs.cardano-ledger}/eras/byron/chain/executable-spec" + "${inputs.cardano-ledger}/eras/byron/crypto" + "${inputs.cardano-ledger}/eras/byron/crypto/test" + "${inputs.cardano-ledger}/eras/byron/ledger/executable-spec" + "${inputs.cardano-ledger}/eras/byron/ledger/impl" + "${inputs.cardano-ledger}/eras/byron/ledger/impl/test" + "${inputs.cardano-ledger}/eras/shelley-ma/impl" + "${inputs.cardano-ledger}/eras/shelley/impl" + "${inputs.cardano-ledger}/eras/shelley/test-suite" + "${inputs.cardano-ledger}/libs/cardano-data" + "${inputs.cardano-ledger}/libs/cardano-ledger-core" + "${inputs.cardano-ledger}/libs/cardano-ledger-pretty" + "${inputs.cardano-ledger}/libs/cardano-protocol-tpraos" + "${inputs.cardano-ledger}/libs/compact-map" + "${inputs.cardano-ledger}/libs/non-integral" + "${inputs.cardano-ledger}/libs/set-algebra" + "${inputs.cardano-ledger}/libs/small-steps" + "${inputs.cardano-ledger}/libs/small-steps-test" + + "${inputs.cardano-node}/cardano-api" + "${inputs.cardano-node}/cardano-cli" + "${inputs.cardano-node}/cardano-git-rev" + "${inputs.cardano-node}/cardano-node" + "${inputs.cardano-node}/trace-dispatcher" + "${inputs.cardano-node}/trace-forward" + "${inputs.cardano-node}/trace-resources" + + "${inputs.cardano-prelude}/cardano-prelude" + "${inputs.cardano-prelude}/cardano-prelude-test" + + "${inputs.cardano-wallet}/lib/cli" + "${inputs.cardano-wallet}/lib/core" + "${inputs.cardano-wallet}/lib/core-integration" + "${inputs.cardano-wallet}/lib/dbvar" + "${inputs.cardano-wallet}/lib/launcher" + "${inputs.cardano-wallet}/lib/numeric" + "${inputs.cardano-wallet}/lib/shelley" + "${inputs.cardano-wallet}/lib/strict-non-empty-containers" + "${inputs.cardano-wallet}/lib/test-utils" + "${inputs.cardano-wallet}/lib/text-class" + + "${inputs.ekg-forward}" - extraHackagePackages = with nixpkgs.lib; - (concatLists (map - (extraSource: (map - (subdir: - if subdir == "." then extraSource.src.outPath else "${extraSource.src.outPath}/${subdir}") - extraSource.subdirs)) - extraSources)); + "${inputs.flat}" + + "${inputs.goblins}" + + "${inputs.iohk-monitoring-framework}/contra-tracer" + "${inputs.iohk-monitoring-framework}/iohk-monitoring" + "${inputs.iohk-monitoring-framework}/plugins/backend-aggregation" + "${inputs.iohk-monitoring-framework}/plugins/backend-ekg" + "${inputs.iohk-monitoring-framework}/plugins/backend-monitoring" + "${inputs.iohk-monitoring-framework}/plugins/backend-trace-forwarder" + "${inputs.iohk-monitoring-framework}/plugins/scribe-systemd" + "${inputs.iohk-monitoring-framework}/tracer-transformers" + + "${inputs.optparse-applicative}" + + "${inputs.ouroboros-network}/io-classes" + "${inputs.ouroboros-network}/io-sim" + "${inputs.ouroboros-network}/monoidal-synchronisation" + "${inputs.ouroboros-network}/network-mux" + "${inputs.ouroboros-network}/ntp-client" + "${inputs.ouroboros-network}/ouroboros-consensus" + "${inputs.ouroboros-network}/ouroboros-consensus-byron" + "${inputs.ouroboros-network}/ouroboros-consensus-cardano" + "${inputs.ouroboros-network}/ouroboros-consensus-protocol" + "${inputs.ouroboros-network}/ouroboros-consensus-shelley" + "${inputs.ouroboros-network}/ouroboros-network" + "${inputs.ouroboros-network}/ouroboros-network-framework" + "${inputs.ouroboros-network}/ouroboros-network-testing" + "${inputs.ouroboros-network}/strict-stm" + "${inputs.ouroboros-network}/typed-protocols" + "${inputs.ouroboros-network}/typed-protocols-cborg" + "${inputs.ouroboros-network}/typed-protocols-examples" + + "${inputs.plutus-apps}/doc" + "${inputs.plutus-apps}/freer-extras" + "${inputs.plutus-apps}/playground-common" + "${inputs.plutus-apps}/plutus-chain-index" + "${inputs.plutus-apps}/plutus-chain-index-core" + "${inputs.plutus-apps}/plutus-contract" + "${inputs.plutus-apps}/plutus-ledger" + "${inputs.plutus-apps}/plutus-ledger-constraints" + "${inputs.plutus-apps}/plutus-pab" + "${inputs.plutus-apps}/plutus-playground-server" + "${inputs.plutus-apps}/plutus-use-cases" + "${inputs.plutus-apps}/quickcheck-dynamic" + "${inputs.plutus-apps}/web-ghc" + + "${inputs.plutus}/plutus-core" + "${inputs.plutus}/plutus-ledger-api" + "${inputs.plutus}/plutus-tx" + "${inputs.plutus}/plutus-tx-plugin" + "${inputs.plutus}/prettyprinter-configurable" + "${inputs.plutus}/stubs/plutus-ghc-stub" + "${inputs.plutus}/word-array" + + "${inputs.purescript-bridge}" + + "${inputs.servant-purescript}" + + "${inputs.wl-pprint-text}" + ]; - compiler-nix-name = "ghc8107"; projectFor = system: let pkgs = nixpkgsFor system; pkgs' = nixpkgsFor' system; + compiler-nix-name = "ghc8107"; myHackages = inputs.haskell-nix-extra-hackage.mkHackagesFor system compiler-nix-name extraHackagePackages; in pkgs.haskell-nix.cabalProject' { @@ -357,6 +303,8 @@ inherit (myHackages) extra-hackages extra-hackage-tarballs; modules = myHackages.modules ++ haskellModules; + index-state = "2022-01-22T00:00:00Z"; + shell = { additional = ps: [ ps.plutus-pab @@ -395,7 +343,7 @@ in { - inherit cabalProjectLocal extraSources haskellModules; + inherit cabalProjectLocal extraHackagePackages haskellModules; project = perSystem projectFor; flake = perSystem (system: (projectFor system).flake { });