mirror of
https://github.com/ocharles/weeder.git
synced 2024-11-27 02:33:03 +03:00
Upgrade Haskell.nix and switch to GHC 9.2.5 (#107)
This commit is contained in:
parent
c58ed2a8c6
commit
de84d6dd52
20
.github/workflows/nix-build.yml
vendored
20
.github/workflows/nix-build.yml
vendored
@ -1,17 +1,23 @@
|
|||||||
name: "Test"
|
name: Build
|
||||||
on:
|
on: [push, pull_request, release]
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2.3.4
|
||||||
- uses: cachix/install-nix-action@v16
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- uses: cachix/install-nix-action@v14.1
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
|
extra_nix_config: |
|
||||||
|
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
|
||||||
|
substituters = https://cache.nixos.org/ https://cache.iog.io
|
||||||
- uses: cachix/cachix-action@v10
|
- uses: cachix/cachix-action@v10
|
||||||
with:
|
with:
|
||||||
name: weeder
|
name: weeder
|
||||||
signingKey: 7Pn6R7tF95HC2INHlVsphnqzZNT8Zmx3GBoqtwIvvH5F1SYlqVocPnR8aDds2qw4aYbNFGpMhpyY8G79e2OXcg==
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
|
||||||
- run: nix-build -A hsPkgs.weeder.components.exes
|
- run: nix-build -A hsPkgs.weeder.components.exes
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ compiler-nix-name ? "ghc922" }:
|
{ compiler-nix-name ? "ghc925" }:
|
||||||
let
|
let
|
||||||
haskellNix = import (import ./nix/sources.nix)."haskell.nix" {};
|
haskellNix = import (import ./nix/sources.nix)."haskell.nix" {};
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
"homepage": "https://input-output-hk.github.io/haskell.nix",
|
"homepage": "https://input-output-hk.github.io/haskell.nix",
|
||||||
"owner": "input-output-hk",
|
"owner": "input-output-hk",
|
||||||
"repo": "haskell.nix",
|
"repo": "haskell.nix",
|
||||||
"rev": "a226667e1a2a77b50baa2481a5bc3e51a6fee792",
|
"rev": "e339ff5b2862443f19971c524a09169c10706aaa",
|
||||||
"sha256": "1kyhxg4iy3sx021d8da84xdal6a9q109ff96fi3kg2j8n2jcgi2k",
|
"sha256": "0r6sjxl89i297ibvqx4zs5dvkjd9hhp4zyspalva94mbzaxl8404",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/input-output-hk/haskell.nix/archive/a226667e1a2a77b50baa2481a5bc3e51a6fee792.tar.gz",
|
"url": "https://github.com/input-output-hk/haskell.nix/archive/e339ff5b2862443f19971c524a09169c10706aaa.tar.gz",
|
||||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
},
|
},
|
||||||
"niv": {
|
"niv": {
|
||||||
|
@ -31,8 +31,28 @@ let
|
|||||||
if spec ? branch then "refs/heads/${spec.branch}" else
|
if spec ? branch then "refs/heads/${spec.branch}" else
|
||||||
if spec ? tag then "refs/tags/${spec.tag}" else
|
if spec ? tag then "refs/tags/${spec.tag}" else
|
||||||
abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!";
|
abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!";
|
||||||
|
submodules = if spec ? submodules then spec.submodules else false;
|
||||||
|
submoduleArg =
|
||||||
|
let
|
||||||
|
nixSupportsSubmodules = builtins.compareVersions builtins.nixVersion "2.4" >= 0;
|
||||||
|
emptyArgWithWarning =
|
||||||
|
if submodules == true
|
||||||
|
then
|
||||||
|
builtins.trace
|
||||||
|
(
|
||||||
|
"The niv input \"${name}\" uses submodules "
|
||||||
|
+ "but your nix's (${builtins.nixVersion}) builtins.fetchGit "
|
||||||
|
+ "does not support them"
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
else {};
|
||||||
in
|
in
|
||||||
builtins.fetchGit { url = spec.repo; inherit (spec) rev; inherit ref; };
|
if nixSupportsSubmodules
|
||||||
|
then { inherit submodules; }
|
||||||
|
else emptyArgWithWarning;
|
||||||
|
in
|
||||||
|
builtins.fetchGit
|
||||||
|
({ url = spec.repo; inherit (spec) rev; inherit ref; } // submoduleArg);
|
||||||
|
|
||||||
fetch_local = spec: spec.path;
|
fetch_local = spec: spec.path;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user