From ed604b3f41dd2910272897c1cc60483093da1b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20B=C3=A4renz?= Date: Tue, 8 Aug 2023 18:03:05 +0200 Subject: [PATCH] Update jupyter environment A few haskell packages can't be built, so some notebooks will not compile. Still, we're in a better place than before. I also had to remove jupyterEnvironment from the mkShell, otherwise there would be an infinite loop: (https://github.com/tweag/jupyenv/issues/525) Further, I had to remove haskell-flake-utils, it seems not to be supported sufficiently. This dropped cabal-docspec support. --- flake.lock | 675 ++------------------------------------------ flake.nix | 32 +-- kernels/haskell.nix | 84 +++--- 3 files changed, 84 insertions(+), 707 deletions(-) diff --git a/flake.lock b/flake.lock index 3e933e6a..4c9ec286 100644 --- a/flake.lock +++ b/flake.lock @@ -1,153 +1,5 @@ { "nodes": { - "HTTP": { - "flake": false, - "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", - "type": "github" - }, - "original": { - "owner": "phadej", - "repo": "HTTP", - "type": "github" - } - }, - "cabal-32": { - "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": { - "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": { - "lastModified": 1641652457, - "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", - "owner": "haskell", - "repo": "cabal", - "rev": "f27667f8ec360c475027dcaee0138c937477b070", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" - } - }, - "cabal-extras": { - "flake": false, - "locked": { - "lastModified": 1653501499, - "narHash": "sha256-7MWKfeckChBpb69viOdNCc25o6QSxVhKSkD9SwigKOI=", - "owner": "phadej", - "repo": "cabal-extras", - "rev": "7a8f07aafcdbbeaeefcbb5f7e8e0e12f91b59fcb", - "type": "github" - }, - "original": { - "owner": "phadej", - "repo": "cabal-extras", - "type": "github" - } - }, - "cabal-fmt": { - "flake": false, - "locked": { - "lastModified": 1630338999, - "narHash": "sha256-qeBMWynb1GTOU0GvhT5bVIKtiWkNuy88Zg5+GpXB/qc=", - "owner": "phadej", - "repo": "cabal-fmt", - "rev": "6651ffdccdfce71330f2b5cde9f8f23b616abf82", - "type": "github" - }, - "original": { - "owner": "phadej", - "repo": "cabal-fmt", - "type": "github" - } - }, - "cardano-shell": { - "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" - } - }, - "ekg-json": { - "flake": false, - "locked": { - "lastModified": 1651484342, - "narHash": "sha256-fVwKxGgM0S4Kv/4egVAAiAjV7QB5PBqMVMCfsv7otIQ=", - "owner": "pepeiborra", - "repo": "ekg-json", - "rev": "7a0af7a8fd38045fd15fb13445bdcc7085325460", - "type": "github" - }, - "original": { - "owner": "pepeiborra", - "repo": "ekg-json", - "rev": "7a0af7a8fd38045fd15fb13445bdcc7085325460", - "type": "github" - } - }, - "eventlog2html": { - "flake": false, - "locked": { - "lastModified": 1638797777, - "narHash": "sha256-NBf85qpjpipEqWANMoubaJ5B4bvKN/rzMRdchNGP444=", - "owner": "mpickering", - "repo": "eventlog2html", - "rev": "e959fdf879c2b404a9843d962b726af499b27cb8", - "type": "github" - }, - "original": { - "owner": "mpickering", - "repo": "eventlog2html", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -231,21 +83,6 @@ } }, "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" - } - }, - "flake-utils_3": { "locked": { "lastModified": 1629481132, "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", @@ -260,56 +97,6 @@ "type": "github" } }, - "gentle-introduction": { - "flake": false, - "locked": { - "lastModified": 1652884085, - "narHash": "sha256-ZQDOUxZrh282STOQMJTHsH/pAQMFpO4QRDmdNHVVUCs=", - "owner": "phadej", - "repo": "gentle-introduction", - "rev": "949a99b4d2d8c556bdd455f0e4c4d94f0402ea63", - "type": "github" - }, - "original": { - "owner": "phadej", - "repo": "gentle-introduction", - "rev": "949a99b4d2d8c556bdd455f0e4c4d94f0402ea63", - "type": "github" - } - }, - "ghc-8.6.5-iohk": { - "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" - } - }, - "ghcid": { - "flake": false, - "locked": { - "lastModified": 1648294714, - "narHash": "sha256-u+thoDJf+Aga2PK0h5ACJ3vwn4TPhrDOwb9kgFIBVWw=", - "owner": "ndmitchell", - "repo": "ghcid", - "rev": "f48626bf5b64067a84b644bcc56afac686046966", - "type": "github" - }, - "original": { - "owner": "ndmitchell", - "repo": "ghcid", - "type": "github" - } - }, "gitignore": { "flake": false, "locked": { @@ -329,7 +116,7 @@ "gitignore_2": { "inputs": { "nixpkgs": [ - "jupyterWith", + "jupyenv", "pre-commit-hooks", "nixpkgs" ] @@ -369,129 +156,12 @@ "type": "github" } }, - "hackage": { - "flake": false, - "locked": { - "lastModified": 1657588428, - "narHash": "sha256-uPH+NzcuPgkNdDAbxZiWZDUK2RQQhs1b/Y4Sv2KEDJc=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "f596b29505d4a1b5d561c7c270a9c3b147534468", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "haskell-language-server": { - "flake": false, - "locked": { - "lastModified": 1657513475, - "narHash": "sha256-7g/R1o/5UIBnpYykE/Vw5HsyDrwX5K6Gs9hyUxpgUgQ=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "445192e21daa4f4973e60a13e748ffa910819e79", - "type": "github" - }, - "original": { - "owner": "haskell", - "repo": "haskell-language-server", - "type": "github" - } - }, - "haskell-nix": { - "inputs": { - "HTTP": "HTTP", - "cabal-32": "cabal-32", - "cabal-34": "cabal-34", - "cabal-36": "cabal-36", - "cardano-shell": "cardano-shell", - "flake-utils": "flake-utils_2", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", - "hackage": "hackage", - "hpc-coveralls": "hpc-coveralls", - "hydra": "hydra", - "nix-tools": "nix-tools", - "nixpkgs": [ - "haskell-nix-utils", - "haskell-nix", - "nixpkgs-unstable" - ], - "nixpkgs-2003": "nixpkgs-2003", - "nixpkgs-2105": "nixpkgs-2105", - "nixpkgs-2111": "nixpkgs-2111", - "nixpkgs-unstable": "nixpkgs-unstable", - "old-ghc-nix": "old-ghc-nix", - "stackage": "stackage" - }, - "locked": { - "lastModified": 1657588997, - "narHash": "sha256-H4tJEWdaYsZqDUn+VYotVVHwSaQR7IVZMPPfGzPrGA4=", - "owner": "input-output-hk", - "repo": "haskell.nix", - "rev": "66ae51e640c624519ba1bb1559a9ef2deccd9726", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskell-nix-utils": { - "inputs": { - "cabal-extras": "cabal-extras", - "cabal-fmt": "cabal-fmt", - "ekg-json": "ekg-json", - "eventlog2html": "eventlog2html", - "gentle-introduction": "gentle-introduction", - "ghcid": "ghcid", - "haskell-language-server": "haskell-language-server", - "haskell-nix": "haskell-nix", - "hindent": "hindent", - "hooglite": "hooglite", - "pointfree": "pointfree", - "warp-wo-x509": "warp-wo-x509", - "weeder": "weeder" - }, - "locked": { - "lastModified": 1657624578, - "narHash": "sha256-PFBuj0uJWGkCa70C9smsF51qu4EexTNVZSrBPjQ5rho=", - "owner": "TerrorJack", - "repo": "haskell-nix-utils", - "rev": "f6fafb5f7ad7ab100bc897e9a278caabab38505d", - "type": "github" - }, - "original": { - "owner": "TerrorJack", - "repo": "haskell-nix-utils", - "type": "github" - } - }, - "hindent": { - "flake": false, - "locked": { - "lastModified": 1656218644, - "narHash": "sha256-+RrB/7Ql7wj/wPePgSoaygEgNdehEh44M71ZILeSVTo=", - "owner": "mihaimaruseac", - "repo": "hindent", - "rev": "4c2ea034f4365cd784539f223282907c9e734fba", - "type": "github" - }, - "original": { - "owner": "mihaimaruseac", - "repo": "hindent", - "type": "github" - } - }, "hls": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "gitignore": "gitignore", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "pre-commit-hooks": "pre-commit-hooks" }, "locked": { @@ -508,76 +178,19 @@ "type": "github" } }, - "hooglite": { - "flake": false, - "locked": { - "lastModified": 1640807650, - "narHash": "sha256-awshX2MluKr4AE+IcyIGujVLs9m1r8yB6+VBh8dQag8=", - "owner": "phadej", - "repo": "hooglite", - "rev": "18856375932f6744cac7849bd1e816538537863f", - "type": "github" - }, - "original": { - "owner": "phadej", - "repo": "hooglite", - "rev": "18856375932f6744cac7849bd1e816538537863f", - "type": "github" - } - }, - "hpc-coveralls": { - "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", - "nixpkgs": [ - "haskell-nix-utils", - "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" - } - }, "ihaskell": { "inputs": { "flake-compat": [ - "jupyterWith", + "jupyenv", "flake-compat" ], "flake-utils": [ - "jupyterWith", + "jupyenv", "flake-utils" ], "hls": "hls", "nixpkgs": [ - "jupyterWith", + "jupyenv", "nixpkgs" ] }, @@ -595,7 +208,7 @@ "type": "github" } }, - "jupyterWith": { + "jupyenv": { "inputs": { "flake-compat": [ "flake-compat" @@ -619,29 +232,13 @@ "lastModified": 1694467933, "narHash": "sha256-GtTvrKF0hknXQeaE6GXcXJgbqIXbaB9ze35TRxV7c0E=", "owner": "tweag", - "repo": "jupyterWith", + "repo": "jupyenv", "rev": "97f76f92fa14814e955a4f6847eaa4198525a19e", "type": "github" }, "original": { "owner": "tweag", - "repo": "jupyterWith", - "type": "github" - } - }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", + "repo": "jupyenv", "type": "github" } }, @@ -661,35 +258,14 @@ "type": "github" } }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs", - "nixpkgs-regression": "nixpkgs-regression" - }, - "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" - } - }, "nix-dart": { "inputs": { "flake-utils": [ - "jupyterWith", + "jupyenv", "flake-utils" ], "nixpkgs": [ - "jupyterWith", + "jupyenv", "nixpkgs" ], "pub2nix": "pub2nix" @@ -708,98 +284,20 @@ "type": "github" } }, - "nix-tools": { - "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" - } - }, "nixpkgs": { "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" - } - }, - "nixpkgs-2003": { - "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, - "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, - "narHash": "sha256-bYe1dFJAXovjqiaPKrmAbSBEK5KUkgwVaZcTbSoJ7hg=", + "lastModified": 1630887066, + "narHash": "sha256-0ecIlrLsNIIa+zrNmzXXmbMBLZlmHU/aWFsa4bq99Hk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0a58eebd8ec65ffdef2ce9562784123a73922052", + "rev": "5e47a07e9f2d7ed999f2c7943b0896f5f7321ca3", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", "type": "github" - }, - "original": { - "id": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "indirect" } }, "nixpkgs-stable": { @@ -850,39 +348,7 @@ "type": "github" } }, - "nixpkgs-unstable": { - "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": 1630887066, - "narHash": "sha256-0ecIlrLsNIIa+zrNmzXXmbMBLZlmHU/aWFsa4bq99Hk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5e47a07e9f2d7ed999f2c7943b0896f5f7321ca3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1696019113, "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=", @@ -914,36 +380,19 @@ "type": "github" } }, - "old-ghc-nix": { - "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" - } - }, "opam-nix": { "inputs": { "flake-compat": [ - "jupyterWith", + "jupyenv", "flake-compat" ], "flake-utils": [ - "jupyterWith", + "jupyenv", "flake-utils" ], "mirage-opam-overlays": "mirage-opam-overlays", "nixpkgs": [ - "jupyterWith", + "jupyenv", "nixpkgs" ], "opam-overlays": "opam-overlays", @@ -1000,7 +449,7 @@ "opam2json": { "inputs": { "nixpkgs": [ - "jupyterWith", + "jupyenv", "opam-nix", "nixpkgs" ] @@ -1022,11 +471,11 @@ "poetry2nix": { "inputs": { "flake-utils": [ - "jupyterWith", + "jupyenv", "flake-utils" ], "nixpkgs": [ - "jupyterWith", + "jupyenv", "nixpkgs" ] }, @@ -1044,32 +493,16 @@ "type": "github" } }, - "pointfree": { - "flake": false, - "locked": { - "lastModified": 1618073819, - "narHash": "sha256-Jdroo9fI47DQq/fcn/horjePVPbluPZIpr+rOBue7pk=", - "owner": "bmillwood", - "repo": "pointfree", - "rev": "2fb1b2e1a48b7297b4f157eb4f3085ad6fa40443", - "type": "github" - }, - "original": { - "owner": "bmillwood", - "repo": "pointfree", - "type": "github" - } - }, "pre-commit-hooks": { "inputs": { "flake-utils": [ - "jupyterWith", + "jupyenv", "ihaskell", "hls", "flake-utils" ], "nixpkgs": [ - "jupyterWith", + "jupyenv", "ihaskell", "hls", "nixpkgs" @@ -1093,12 +526,12 @@ "inputs": { "flake-compat": "flake-compat_3", "flake-utils": [ - "jupyterWith", + "jupyenv", "flake-utils" ], "gitignore": "gitignore_2", "nixpkgs": [ - "jupyterWith", + "jupyenv", "nixpkgs" ], "nixpkgs-stable": "nixpkgs-stable_2" @@ -1163,20 +596,19 @@ "inputs": { "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "haskell-nix-utils": "haskell-nix-utils", - "jupyterWith": "jupyterWith", - "nixpkgs": "nixpkgs_3", + "jupyenv": "jupyenv", + "nixpkgs": "nixpkgs_2", "pre-commit-hooks": "pre-commit-hooks_3" } }, "rust-overlay": { "inputs": { "flake-utils": [ - "jupyterWith", + "jupyenv", "flake-utils" ], "nixpkgs": [ - "jupyterWith", + "jupyenv", "nixpkgs" ] }, @@ -1194,22 +626,6 @@ "type": "github" } }, - "stackage": { - "flake": false, - "locked": { - "lastModified": 1657588524, - "narHash": "sha256-XFAxAa46SPmk2I5u7HCNsi6kFx2y5A5mgI8TLUFSIJ8=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "cfa19244bdb8ac3562780a0199fccae1a9220b43", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, @@ -1224,39 +640,6 @@ "repo": "default", "type": "github" } - }, - "warp-wo-x509": { - "flake": false, - "locked": { - "lastModified": 1636911472, - "narHash": "sha256-w8UWW/rOIhzDAF54RkXyb21/39GPA8trJY7U4pHppXY=", - "owner": "phadej", - "repo": "warp-wo-x509", - "rev": "98648f7520d228e6a14747223f0bbd68620b9318", - "type": "github" - }, - "original": { - "owner": "phadej", - "repo": "warp-wo-x509", - "rev": "98648f7520d228e6a14747223f0bbd68620b9318", - "type": "github" - } - }, - "weeder": { - "flake": false, - "locked": { - "lastModified": 1653221206, - "narHash": "sha256-aYcaFfu9ocwiSnFndfE9Ro70QDY560lrrT6w+uJY5eY=", - "owner": "ocharles", - "repo": "weeder", - "rev": "c58ed2a8c66dcf0b469f8343efb6b6f61c7c40f3", - "type": "github" - }, - "original": { - "owner": "ocharles", - "repo": "weeder", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 0f653b8a..be05a567 100644 --- a/flake.nix +++ b/flake.nix @@ -3,11 +3,11 @@ nixConfig = { extra-substituters = [ "https://tweag-monad-bayes.cachix.org" - "https://tweag-wasm.cachix.org" + "https://tweag-jupyter.cachix.org" ]; extra-trusted-public-keys = [ "tweag-monad-bayes.cachix.org-1:tmmTZ+WvtUMpYWD4LAkfSuNKqSuJyL3N8ZVm/qYtqdc=" - "tweag-wasm.cachix.org-1:Eu5eBNIJvleiWMEzRBmH3/fzA6a604Umt4lZguKtAU4=" + "tweag-jupyter.cachix.org-1:UtNH4Zs6hVUFpFBTLaA4ejYavPo5EFFqgd7G7FxGW9g=" ]; }; inputs = { @@ -24,9 +24,8 @@ flake-utils.follows = "flake-utils"; }; }; - haskell-nix-utils.url = "github:TerrorJack/haskell-nix-utils"; - jupyterWith = { - url = "github:tweag/jupyterWith"; + jupyenv = { + url = "github:tweag/jupyenv"; inputs = { nixpkgs.follows = "nixpkgs"; flake-compat.follows = "flake-compat"; @@ -37,11 +36,10 @@ outputs = { self, nixpkgs, - jupyterWith, + jupyenv, flake-compat, flake-utils, pre-commit-hooks, - haskell-nix-utils, } @ inputs: flake-utils.lib.eachSystem [ @@ -55,7 +53,7 @@ ( system: let inherit (nixpkgs) lib; - inherit (jupyterWith.lib.${system}) mkJupyterlabFromPath; + inherit (jupyenv.lib.${system}) mkJupyterlabNew; pkgs = import nixpkgs { inherit system; config.allowBroken = true; @@ -96,17 +94,11 @@ monad-bayes-all-ghcs = pkgs.linkFarm "monad-bayes-all-ghcs" monad-bayes-per-ghc; - jupyterEnvironment = mkJupyterlabFromPath ./kernels {inherit pkgs monad-bayes;}; - - cabal-docspec = let - ce = - haskell-nix-utils.packages.${system}.pkgs.callPackage - (import "${haskell-nix-utils}/project/cabal-extras.nix") { - self = haskell-nix-utils; - inherit (haskell-nix-utils.packages.${system}) compiler-nix-name index-state; - }; - in - ce.cabal-docspec.components.exes.cabal-docspec; + jupyterEnvironment = mkJupyterlabNew { + imports = [ + (import ./kernels/haskell.nix {inherit monad-bayes;}) + ]; + }; monad-bayes-dev = pkgs.mkShell { inputsFrom = [monad-bayes.env]; @@ -115,8 +107,6 @@ cabal-fmt hlint ormolu - cabal-docspec - jupyterEnvironment ]; shellHook = pre-commit.shellHook; }; diff --git a/kernels/haskell.nix b/kernels/haskell.nix index 3eeb457a..5886c72d 100644 --- a/kernels/haskell.nix +++ b/kernels/haskell.nix @@ -1,41 +1,45 @@ -{ - name, - availableKernels, - extraArgs, -}: -availableKernels.haskell { - inherit (extraArgs) system; - name = "custom-${name}"; # must be unique - displayName = "custom ${name}"; - extraHaskellPackages = p: [ - p.hvega - p.lens - p.log-domain - p.katip - p.ihaskell-hvega - p.ihaskell-diagrams - p.text - p.diagrams - p.diagrams-cairo - p.aeson - p.lens - p.lens-aeson - p.pretty-simple - p.monad-loops - p.hamilton - p.hmatrix - p.vector-sized - p.linear - p.recursion-schemes - p.data-fix - p.free - p.comonad - p.adjunctions - p.distributive - p.vector - p.megaparsec - p.histogram-fill - p.gloss - extraArgs.monad-bayes - ]; +{monad-bayes}: + +{pkgs, ...}: { + kernel.haskell.monad-bayes = { + enable = true; + name = "monad-bayes"; + displayName = "monad-bayes"; + extraHaskellPackages = p: [ + p.hvega + p.lens + p.log-domain + p.katip + p.ihaskell-hvega + p.ihaskell-diagrams + p.diagrams + p.diagrams-cairo + p.aeson + p.lens + p.lens-aeson + p.pretty-simple + p.monad-loops + # hamilton seems unmaintained, unclear whether we can keep it. See https://github.com/tweag/monad-bayes/issues/300 + # p.hamilton + p.hmatrix + p.vector-sized + p.linear + p.recursion-schemes + p.data-fix + p.free + p.comonad + p.adjunctions + p.distributive + p.vector + p.megaparsec + p.histogram-fill + # Strange build error which I can't fix: + # > Configuring gloss-rendering-1.13.1.2... + # > + # > Setup: Encountered missing or private dependencies: + # > bytestring >=0.11 && <0.12 + # p.gloss + monad-bayes + ]; + }; }