Skip to content

Commit

Permalink
Merge pull request #25 from adetokunbo/update-nix-dev-env
Browse files Browse the repository at this point in the history
Updated the nix pin to a commit on 2023/11/23
  • Loading branch information
adetokunbo authored Jan 18, 2024
2 parents 0be9d9a + 2cedf7f commit c272a93
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 23 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.1.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.1.1/direnvrc" "sha256-b6qJ4r34rbE23yWjMqbmu3ia2z4b2wIlZUksBke/ol0="
fi
use nix
watch_file cabal.project wai-middleware-delegate.cabal h8x.nix
26 changes: 5 additions & 21 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
let
# Pin haskell-nix to a recent (as of 2023/07/20) commit
h8x-pin = "https://github.com/input-output-hk/haskell.nix/archive/3ae883bb7864ba85c3aab30f8f488b9a7d84afc8.tar.gz";
h8x-src = builtins.fetchTarball h8x-pin;
h8x = import h8x-src {};

# Import nixpkgs and pass the haskell.nix provided nixpkgsArgs
pkgs = import

# haskell.nix provides access to the nixpkgs pins which are used by our CI,
# hence you will be more likely to get cache hits when using these. But you
# can also just use your own, e.g. '<nixpkgs>'.

h8x.sources.nixpkgs-2305

# These arguments passed to nixpkgs, include some patches and also the
# haskell.nix functionality itself as an overlay.

h8x.nixpkgsArgs;

in pkgs.haskell-nix.cabalProject {
pkgsNix = import ./h8x.nix;
in
{ pkgs ? pkgsNix
} : pkgs.haskell-nix.cabalProject {
# 'cleanGit' cleans a source directory based on the files known by git
src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "wai-middleware-delegate";
Expand All @@ -29,5 +13,5 @@ in pkgs.haskell-nix.cabalProject {
compiler-nix-name = "ghc928";

# Specify the hackage index state
index-state = "2023-07-20T00:00:00Z";
index-state = "2023-11-24T00:00:00Z";
}
20 changes: 20 additions & 0 deletions h8x.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
let
# Pin haskell-nix to a recent (as of 2023/11/24) commit
h8x-commit = "c6e3c91844e91f86cb64015258eed2ed8545d2a9";
h8x-pin = "https://github.com/input-output-hk/haskell.nix/archive/${h8x-commit}.tar.gz";
h8x-src = builtins.fetchTarball h8x-pin;
h8x = import h8x-src {};

in
import

# haskell.nix provides access to the nixpkgs pins which are used by our CI,
# hence you will be more likely to get cache hits when using these. But you
# can also just use your own, e.g. '<nixpkgs>'.

h8x.sources.nixpkgs-unstable

# These arguments passed to nixpkgs, include some patches and also the
# haskell.nix functionality itself as an overlay.

h8x.nixpkgsArgs
4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let
project = import ./default.nix;
project = import ./default.nix {};
in
project.shellFor {
# Builds a Hoogle documentation index of all dependencies,
Expand All @@ -12,7 +12,7 @@ in
hlint = "latest"; # Selects the latest version in the hackage.nix snapshot
haskell-language-server = "latest";
ghcid = "latest";
fourmolu = "latest";
fourmolu = "0.14.0.0";
cabal-fmt = "latest";
};
# See overlays/tools.nix for more details
Expand Down

0 comments on commit c272a93

Please sign in to comment.