diff --git a/nix/sources.json b/nix/sources.json index 48ef1d16..08af6366 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -24,15 +24,15 @@ "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { - "branch": "nixos-20.09", + "branch": "nixos-23.05", "description": "Nix Packages collection", "homepage": null, "owner": "nixos", "repo": "nixpkgs", - "rev": "1c1f5649bb9c1b0d98637c8c365228f57126f361", - "sha256": "0f2nvdijyxfgl5kwyb4465pppd5vkhqxddx6v40k2s0z9jfhj0xl", + "rev": "e11142026e2cef35ea52c9205703823df225c947", + "sha256": "1w5bp7vv56878g4zzykgbcvqib40dwg4fn9mxrwlg6gc8gdjimfx", "type": "tarball", - "url": "https://github.com/nixos/nixpkgs/archive/1c1f5649bb9c1b0d98637c8c365228f57126f361.tar.gz", + "url": "https://github.com/nixos/nixpkgs/archive/e11142026e2cef35ea52c9205703823df225c947.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } diff --git a/shell.nix b/shell.nix index 754dd42b..080f8216 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1,29 @@ let sources = import ./nix/sources.nix; - pkgs = import sources.nixpkgs { overlays = [ ]; }; + hsPkgs = import ./default.nix; + + haskellNix = import sources."haskell.nix" { }; + nixpkgsSrc = haskellNix.sources.nixpkgs-unstable; + nixpkgsArgs = haskellNix.nixpkgsArgs; + compiler-nix-name = "ghc943"; + + haskell-nix = (import nixpkgsSrc nixpkgsArgs).haskell-nix; + + ch-hs-imports = + let + project = haskell-nix.project { + src = sources.ch-hs-imports; + inherit compiler-nix-name; + }; + in + project.hsPkgs.ch-hs-imports.components.exes.ch-hs-imports; + + pkgs = import sources.nixpkgs { overlays = [ ]; }; in hsPkgs.shellFor { withHoogle = false; - tools = { cabal = "latest"; }; + tools = { cabal = "latest"; fourmolu = "latest"; cabal-fmt = "latest"; }; exactDeps = false; - buildInputs = [ pkgs.postgresql pkgs.pythonPackages.sphinx ]; + buildInputs = [ pkgs.nixpkgs-fmt pkgs.postgresql pkgs.treefmt ]; }