Skip to content

Commit

Permalink
Nix: allow building from pure-eval mode (#2427)
Browse files Browse the repository at this point in the history
* default.nix: allow import with pure-eval enabled

* Update hercules-ci/gitignore

* shell.nix: fix import of default.nix
  • Loading branch information
mvnetbiz authored Aug 16, 2022
1 parent ba3ba9f commit f75e77c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{ system ? builtins.currentSystem }:

let
name =
"postgrest";
Expand Down Expand Up @@ -42,7 +44,7 @@ let

# Evaluated expression of the Nixpkgs repository.
pkgs =
import nixpkgs { inherit overlays; };
import nixpkgs { inherit overlays system; };

postgresqlVersions =
[
Expand All @@ -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 =
Expand Down
4 changes: 2 additions & 2 deletions nix/overlays/gitignore.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions nix/static-haskell-package.nix
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -46,7 +46,7 @@ let

# Apply our overlay to nixpkgs.
normalPkgs =
import nixpkgs { inherit overlays; };
import nixpkgs { inherit overlays system; };

defaultCabalPackageVersionComingWithGhc =
{
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}:
let
postgrest =
import ./default.nix;
import ./default.nix { };

inherit (postgrest) pkgs;

Expand Down

0 comments on commit f75e77c

Please sign in to comment.