From f75e77cf60c415ea7ce789c5d5e53cf8857ba8d3 Mon Sep 17 00:00:00 2001 From: Matt Votava Date: Mon, 15 Aug 2022 18:44:02 -0700 Subject: [PATCH] Nix: allow building from pure-eval mode (#2427) * default.nix: allow import with pure-eval enabled * Update hercules-ci/gitignore * shell.nix: fix import of default.nix --- default.nix | 6 ++++-- nix/overlays/gitignore.nix | 4 ++-- nix/static-haskell-package.nix | 4 ++-- shell.nix | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/default.nix b/default.nix index d5615c317..478e424e1 100644 --- a/default.nix +++ b/default.nix @@ -1,3 +1,5 @@ +{ system ? builtins.currentSystem }: + let name = "postgrest"; @@ -42,7 +44,7 @@ let # Evaluated expression of the Nixpkgs repository. pkgs = - import nixpkgs { inherit overlays; }; + import nixpkgs { inherit overlays system; }; postgresqlVersions = [ @@ -64,7 +66,7 @@ let # Function that derives a fully static Haskell package based on # nh2/static-haskell-nix staticHaskellPackage = - import nix/static-haskell-package.nix { inherit nixpkgs compiler patches allOverlays; }; + import nix/static-haskell-package.nix { inherit nixpkgs system compiler patches allOverlays; }; # Options passed to cabal in dev tools and tests devCabalOptions = diff --git a/nix/overlays/gitignore.nix b/nix/overlays/gitignore.nix index 4b5e742d4..7c8342c89 100644 --- a/nix/overlays/gitignore.nix +++ b/nix/overlays/gitignore.nix @@ -12,8 +12,8 @@ self: super: gitignoreSrc = super.fetchFromGitHub { owner = "hercules-ci"; repo = "gitignore"; - rev = "211907489e9f198594c0eb0ca9256a1949c9d412"; - sha256 = "06j7wpvj54khw0z10fjyi31kpafkr6hi1k0di13k1xp8kywvfyx8"; + rev = "a20de23b925fd8264fd7fad6454652e142fd7f73"; + sha256 = "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8="; }; in (super.callPackage gitignoreSrc { }).gitignoreSource; diff --git a/nix/static-haskell-package.nix b/nix/static-haskell-package.nix index 21b5a9bac..209b5bf91 100644 --- a/nix/static-haskell-package.nix +++ b/nix/static-haskell-package.nix @@ -1,5 +1,5 @@ # Derive a fully static Haskell package based on musl instead of glibc. -{ nixpkgs, compiler, patches, allOverlays }: +{ nixpkgs, system, compiler, patches, allOverlays }: name: src: let @@ -46,7 +46,7 @@ let # Apply our overlay to nixpkgs. normalPkgs = - import nixpkgs { inherit overlays; }; + import nixpkgs { inherit overlays system; }; defaultCabalPackageVersionComingWithGhc = { diff --git a/shell.nix b/shell.nix index a07398250..f8ce614fe 100644 --- a/shell.nix +++ b/shell.nix @@ -11,7 +11,7 @@ }: let postgrest = - import ./default.nix; + import ./default.nix { }; inherit (postgrest) pkgs;