Skip to content

Commit faf199a

Browse files
committed
Install GHC via Nix
1 parent cf2e995 commit faf199a

File tree

3 files changed

+29
-14
lines changed

3 files changed

+29
-14
lines changed

devenv.lock

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,27 @@
8989
"type": "github"
9090
}
9191
},
92+
"nixpkgs-unstable": {
93+
"locked": {
94+
"lastModified": 1742923925,
95+
"owner": "nixos",
96+
"repo": "nixpkgs",
97+
"rev": "25d1b84f5c90632a623c48d83a2faf156451e6b1",
98+
"type": "github"
99+
},
100+
"original": {
101+
"owner": "nixos",
102+
"ref": "nixpkgs-unstable",
103+
"repo": "nixpkgs",
104+
"type": "github"
105+
}
106+
},
92107
"root": {
93108
"inputs": {
94109
"devenv": "devenv",
95110
"git-hooks": "git-hooks",
96111
"nixpkgs": "nixpkgs",
112+
"nixpkgs-unstable": "nixpkgs-unstable",
97113
"pre-commit-hooks": [
98114
"git-hooks"
99115
]

devenv.nix

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
{ pkgs, lib, config, inputs, ... }:
1+
{ pkgs, inputs, ... }:
22

3+
let
4+
pkgs-unstable = import inputs.nixpkgs-unstable {
5+
system = pkgs.stdenv.system;
6+
};
7+
in
38
{
4-
59
packages = [
6-
pkgs.stack
10+
pkgs-unstable.haskell.compiler.ghc984
711
];
12+
13+
scripts.stack.exec = ''
14+
${pkgs.stack}/bin/stack --system-ghc "$@"
15+
'';
816
}

devenv.yaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,5 @@
22
inputs:
33
nixpkgs:
44
url: github:cachix/devenv-nixpkgs/rolling
5-
6-
# If you're using non-OSS software, you can set allowUnfree to true.
7-
# allowUnfree: true
8-
9-
# If you're willing to use a package that's vulnerable
10-
# permittedInsecurePackages:
11-
# - "openssl-1.1.1w"
12-
13-
# If you have more than one devenv you can merge them
14-
#imports:
15-
# - ./backend
5+
nixpkgs-unstable:
6+
url: github:nixos/nixpkgs/nixpkgs-unstable

0 commit comments

Comments
 (0)