Skip to content

Commit 6059341

Browse files
Update Nix configuration
1 parent b68218f commit 6059341

File tree

3 files changed

+36
-23
lines changed

3 files changed

+36
-23
lines changed

default.nix

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,35 @@
1-
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc883" }:
2-
nixpkgs.pkgs.haskell.packages.${compiler}.callPackage ./queue-sheet.nix { }
1+
let
2+
3+
nixpkgsRev = "cd63096d6d88";
4+
compilerVersion = "ghc884";
5+
6+
githubTarball = owner: repo: rev:
7+
builtins.fetchTarball { url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; };
8+
9+
gitIgnore = pkgs.nix-gitignore.gitignoreSourcePure;
10+
11+
config = {
12+
packageOverrides = super: let self = super.pkgs; in rec {
13+
haskell = super.haskell // {
14+
packageOverrides = self: super: {
15+
haskell-nix = super.callCabal2nix "haskell-nix" (gitIgnore [./.gitignore] ./.) {};
16+
};
17+
};
18+
};
19+
};
20+
21+
pkgs = import (githubTarball "NixOS" "nixpkgs" nixpkgsRev) { inherit config; };
22+
compilerSet = pkgs.haskell.packages."${compilerVersion}";
23+
24+
in {
25+
26+
inherit pkgs;
27+
28+
shell = compilerSet.shellFor {
29+
packages = p: [p.haskell-nix];
30+
buildInputs = with pkgs; [
31+
compilerSet.cabal-install
32+
];
33+
};
34+
35+
}

queue-sheet.nix

Lines changed: 0 additions & 19 deletions
This file was deleted.

shell.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc883" }:
2-
(import ./default.nix { inherit nixpkgs compiler; }).env
1+
(import ./default.nix).shell

0 commit comments

Comments
 (0)