diff --git a/flake.lock b/flake.lock index ff59038..32cfe64 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1693611461, - "narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=", + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", "type": "github" }, "original": { @@ -18,64 +18,50 @@ "type": "github" } }, - "hs_bsb-http-chunked": { - "flake": false, - "locked": { - "lastModified": 1666195516, - "narHash": "sha256-+UDxfywXPjxPuFupcB8veyMYWVQCKha64me9HADtFGg=", - "owner": "sjakobi", - "repo": "bsb-http-chunked", - "rev": "c0ecd72fe2beb1cf7de9340cc8b4a31045460532", - "type": "github" + "flakety": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs", + "singletons_3_2": "singletons_3_2" }, - "original": { - "owner": "sjakobi", - "repo": "bsb-http-chunked", - "rev": "c0ecd72fe2beb1cf7de9340cc8b4a31045460532", - "type": "github" - } - }, - "hs_streaming": { - "flake": false, "locked": { - "lastModified": 1688650566, - "narHash": "sha256-4IYTasNUgN/W4nbS5eNUo9jllkGuG72t/FttQeVdYCs=", - "owner": "haskell-streaming", - "repo": "streaming", - "rev": "804f2ec54fea144faefa691ea3a622cd0d714d98", + "lastModified": 1702313391, + "narHash": "sha256-GJ2xMW+W+P55psOFbA+3f5ZjQCZkCJceR0nQ+JwNkGM=", + "owner": "k0001", + "repo": "flakety", + "rev": "a57cd81831449e5560a239743335baa1e98ef1ce", "type": "github" }, "original": { - "owner": "haskell-streaming", - "ref": "0.2.4.0", - "repo": "streaming", + "owner": "k0001", + "repo": "flakety", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1691766535, - "narHash": "sha256-Ucsfovz9UY+AjOoQR3kJS57N6YGgBPu357OcUV4ou0g=", + "lastModified": 1701539137, + "narHash": "sha256-nVO/5QYpf1GwjvtpXhyxx5M3U/WN0MwBro4Lsk+9mL0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "389cc28963163614765721eda940fd5299f18458", + "rev": "933d7dc155096e7575d207be6fb7792bc9f34f6d", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "389cc28963163614765721eda940fd5299f18458", + "rev": "933d7dc155096e7575d207be6fb7792bc9f34f6d", "type": "github" } }, "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1693471703, - "narHash": "sha256-0l03ZBL8P1P6z8MaSDS/MvuU8E75rVxe5eE1N6gxeTo=", + "lastModified": 1701253981, + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3e52e76b70d5508f3cec70b882a29199f4d1ee85", + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", "type": "github" }, "original": { @@ -88,10 +74,32 @@ }, "root": { "inputs": { - "flake-parts": "flake-parts", - "hs_bsb-http-chunked": "hs_bsb-http-chunked", - "hs_streaming": "hs_streaming", - "nixpkgs": "nixpkgs" + "flake-parts": [ + "flakety", + "flake-parts" + ], + "flakety": "flakety", + "nixpkgs": [ + "flakety", + "nixpkgs" + ] + } + }, + "singletons_3_2": { + "flake": false, + "locked": { + "lastModified": 1678643624, + "narHash": "sha256-LfhcxM5+dRd9cb+kC4WqlgbR1anWvVwZoGsBZQ9MrpE=", + "owner": "goldfirere", + "repo": "singletons", + "rev": "f8a0708bf15289cc92a04c9902c3c2dc620a0b5e", + "type": "github" + }, + "original": { + "owner": "goldfirere", + "ref": "singletons-th-base-3.2", + "repo": "singletons", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 8f95b84..0a2de82 100644 --- a/flake.nix +++ b/flake.nix @@ -1,54 +1,36 @@ { description = "di"; inputs = { - nixpkgs = { - url = "github:NixOS/nixpkgs/389cc28963163614765721eda940fd5299f18458"; - }; - flake-parts = { url = "github:hercules-ci/flake-parts"; }; - hs_bsb-http-chunked = { - url = - "github:sjakobi/bsb-http-chunked/c0ecd72fe2beb1cf7de9340cc8b4a31045460532"; - flake = false; - }; - hs_streaming = { - url = "github:haskell-streaming/streaming/0.2.4.0"; - flake = false; - }; + flakety.url = "github:k0001/flakety"; + nixpkgs.follows = "flakety/nixpkgs"; + flake-parts.follows = "flakety/flake-parts"; }; outputs = inputs@{ ... }: inputs.flake-parts.lib.mkFlake { inherit inputs; } { - flake.overlays.default = final: prev: - let - hsLib = prev.haskell.lib; - hsClean = drv: - hsLib.overrideCabal drv - (old: { src = prev.lib.sources.cleanSource old.src; }); - in { - haskell = prev.haskell // { - packageOverrides = prev.lib.composeExtensions - (prev.haskell.packageOverrides or (_: _: { })) (hself: hsuper: { - df1 = hsClean (hself.callPackage ./df1 { }); - df1-html = hsClean (hself.callPackage ./df1-html { }); - di = hsClean (hself.callPackage ./di { }); - di-core = hsClean (hself.callPackage ./di-core { }); - di-df1 = hsClean (hself.callPackage ./di-df1 { }); - di-handle = hsClean (hself.callPackage ./di-handle { }); - di-monad = hsClean (hself.callPackage ./di-monad { }); - - streaming = - hself.callCabal2nix "streaming" inputs.hs_streaming { }; - - # hoogle stuff - bsb-http-chunked = hself.callCabal2nix "bsb-http-chunked" - inputs.hs_bsb-http-chunked { }; - warp = hsLib.dontCheck (hself.callHackage "warp" "3.3.25" { }); - warp-tls = - hsLib.dontCheck (hself.callHackage "warp-tls" "3.3.6" { }); - recv = hself.callHackage "recv" "0.1.0" { }; - }); - }; - }; + flake.overlays.default = inputs.nixpkgs.lib.composeManyExtensions [ + inputs.flakety.overlays.default + (final: prev: + let + hsLib = prev.haskell.lib; + hsClean = drv: + hsLib.overrideCabal drv + (old: { src = prev.lib.sources.cleanSource old.src; }); + in { + haskell = prev.haskell // { + packageOverrides = prev.lib.composeExtensions + (prev.haskell.packageOverrides or (_: _: { })) (hself: hsuper: { + df1 = hsClean (hself.callPackage ./df1 { }); + df1-html = hsClean (hself.callPackage ./df1-html { }); + di = hsClean (hself.callPackage ./di { }); + di-core = hsClean (hself.callPackage ./di-core { }); + di-df1 = hsClean (hself.callPackage ./di-df1 { }); + di-handle = hsClean (hself.callPackage ./di-handle { }); + di-monad = hsClean (hself.callPackage ./di-monad { }); + }); + }; + }) + ]; systems = [ "x86_64-linux" ]; perSystem = { config, pkgs, system, ... }: { _module.args.pkgs = import inputs.nixpkgs { @@ -69,12 +51,12 @@ config.devShells.ghc ]; }; - inherit (pkgs.haskell.packages.ghc962) + inherit (pkgs.haskell.packages.ghc98) df1 df1-html di di-core di-df1 di-handle di-monad; }; devShells = { default = config.devShells.ghc; - ghc = pkgs.haskell.packages.ghc962.shellFor { + ghc = pkgs.haskell.packages.ghc98.shellFor { packages = p: [ p.df1 p.df1-html