WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 86abfdf

Browse files
committed
fix flake.nix
1 parent 46c0fc2 commit 86abfdf

File tree

3 files changed

+61
-5
lines changed

3 files changed

+61
-5
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
name: inguncache
2020
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
2121
- run: |
22-
nix run "github:input-output-hk/haskell.nix#hix" -- init
23-
echo "------ Content of flake.nix ------"
24-
cat flake.nix
25-
echo "----- Content of nix/hix.nix -----"
26-
cat nix/hix.nix
22+
# nix run "github:input-output-hk/haskell.nix#hix" -- init
23+
# echo "------ Content of flake.nix ------"
24+
# cat flake.nix
25+
# echo "----- Content of nix/hix.nix -----"
26+
# cat nix/hix.nix
2727
nix build .#answers-script:exe:answers-script

flake.nix

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
# This is a template created by `hix init`
3+
inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
4+
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
5+
inputs.flake-utils.url = "github:numtide/flake-utils";
6+
outputs = { self, nixpkgs, flake-utils, haskellNix }:
7+
let
8+
supportedSystems = [
9+
"x86_64-linux"
10+
# "x86_64-darwin"
11+
# "aarch64-linux"
12+
# "aarch64-darwin"
13+
];
14+
in
15+
flake-utils.lib.eachSystem supportedSystems (system:
16+
let
17+
overlays = [ haskellNix.overlay
18+
(final: _prev: {
19+
hixProject =
20+
final.haskell-nix.hix.project {
21+
src = ./.;
22+
# uncomment with your current system for `nix flake show` to work:
23+
#evalSystem = "x86_64-linux";
24+
};
25+
})
26+
];
27+
pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
28+
flake = pkgs.hixProject.flake {};
29+
in flake // {
30+
legacyPackages = pkgs;
31+
});
32+
# --- Flake Local Nix Configuration ----------------------------
33+
nixConfig = {
34+
# This sets the flake to use the IOG nix cache.
35+
# Nix should ask for permission before using it,
36+
# but remove it here if you do not want it to.
37+
extra-substituters = ["https://cache.iog.io"];
38+
extra-trusted-public-keys = ["hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="];
39+
allow-import-from-derivation = "true";
40+
};
41+
}

nix/hix.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{pkgs, ...}: {
2+
# name = "project-name";
3+
compiler-nix-name = "ghc9121"; # Version of GHC to use
4+
# Cross compilation support:
5+
# crossPlatforms = p: pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86_64 ([
6+
# p.mingwW64
7+
# p.ghcjs
8+
# ] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [
9+
# p.musl64
10+
# ]);
11+
# Tools to include in the development shell
12+
shell.tools.cabal = "latest";
13+
# shell.tools.hlint = "latest";
14+
# shell.tools.haskell-language-server = "latest";
15+
}

0 commit comments

Comments
 (0)