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
File tree Expand file tree Collapse file tree 2 files changed +46
-6
lines changed
Expand file tree Collapse file tree 2 files changed +46
-6
lines changed Original file line number Diff line number Diff line change 66 steps :
77 - uses : actions/checkout@v4
88 - uses : cachix/install-nix-action@v31
9- # with:
10- # extra_nix_config: |
11- # trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
12- # substituters = https://cache.iog.io/ https://cache.nixos.org/
9+ with :
10+ extra_nix_config : |
11+ trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
12+ substituters = https://cache.iog.io/ https://cache.nixos.org/
13+ nix_path : nixpkgs=channel:nixos-unstable
1314 - uses : cachix/cachix-action@v15
1415 with :
1516 name : inguncache
1617 authToken : " ${{ secrets.CACHIX_AUTH_TOKEN }}"
1718 - run : |
18- nix-shell -p cabal2nix --run "cabal2nix . > default.nix"
19- cat default.nix
2019 nix-build
Original file line number Diff line number Diff line change 1+ {
2+ description = "A very basic flake" ;
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+ flake-utils . lib . eachSystem [ "x86_64-linux" "x86_64-darwin" ] ( system :
8+ let
9+ overlays = [ haskellNix . overlay
10+ ( final : _prev : {
11+ # This overlay adds our project to pkgs
12+ helloProject =
13+ final . haskell-nix . project' {
14+ src = ./. ;
15+ compiler-nix-name = "ghc9121" ;
16+ # This is used by `nix develop .` to open a shell for use with
17+ # `cabal`, `hlint` and `haskell-language-server`
18+ shell . tools = {
19+ cabal = { } ;
20+ # hlint = {};
21+ # haskell-language-server = {};
22+ } ;
23+ # Non-Haskell shell tools go here
24+ shell . buildInputs = with pkgs ; [
25+ nixpkgs-fmt
26+ ] ;
27+ # This adds `js-unknown-ghcjs-cabal` to the shell.
28+ # shell.crossPlatforms = p: [p.ghcjs];
29+ } ;
30+ } )
31+ ] ;
32+ pkgs = import nixpkgs { inherit system overlays ; inherit ( haskellNix ) config ; } ;
33+ flake = pkgs . helloProject . flake {
34+ # This adds support for `nix build .#js-unknown-ghcjs:hello:exe:hello`
35+ # crossPlatforms = p: [p.ghcjs];
36+ } ;
37+ in flake // {
38+ # Built by `nix build .`
39+ packages . default = flake . packages . "answers-script:exe:answers-script" ;
40+ } ) ;
41+ }
You can’t perform that action at this time.
0 commit comments