From eebbda8f287eb36689c145d5bb95b3f527d88fcb Mon Sep 17 00:00:00 2001 From: Marc Scholten Date: Sun, 4 Jun 2023 17:01:14 +0200 Subject: [PATCH] Improved b.c. support for nix-build --- default.nix | 22 +++++++++------------- flake.nix | 2 +- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/default.nix b/default.nix index e430fd8..e778a7a 100644 --- a/default.nix +++ b/default.nix @@ -1,13 +1,9 @@ -let - ihp = builtins.fetchGit { - url = "https://github.com/digitallyinduced/ihp.git"; - ref = "refs/tags/v1.0.1"; - }; - haskellEnv = import "${ihp}/NixSupport/default.nix" { - ihp = ihp; - haskellDeps = (import ./devenv.nix { pkgs = {}; inputs = {}; config = {}; }).ihp.haskellPackages; - otherDeps = pkgs: (import ./devenv.nix { inherit pkgs; inputs = {}; config = {}; }).packages; - projectPath = ./.; - }; -in - haskellEnv +# For backwards compatibility using flake.nix +(import + ( + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/12c64ca55c1014cdc1b16ed5a804aa8576601ff2.tar.gz"; + sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5"; + } + ) +{ src = ./.; }).defaultNix \ No newline at end of file diff --git a/flake.nix b/flake.nix index 58d3f55..6d77c35 100644 --- a/flake.nix +++ b/flake.nix @@ -62,7 +62,7 @@ }; }); # Binaries for deploying IHP apps. These are used by `nix build --impure` - packages = forEachSystem (system: { default = releaseEnv nixpkgs.legacyPackages.${system}; }); + defaultPackage = forEachSystem (system: releaseEnv nixpkgs.legacyPackages.${system}); }; # The following is needed to use the IHP binary cache.