Parametrize systems
using github:nix-systems
(#97)
This commit is contained in:
parent
2cc75cb614
commit
06e75e55e3
4 changed files with 22 additions and 16 deletions
10
.github/workflows/ci.yaml
vendored
10
.github/workflows/ci.yaml
vendored
|
@ -24,15 +24,9 @@ jobs:
|
|||
nix build -j auto -L
|
||||
- name: Flake checks 🧪
|
||||
run: |
|
||||
# Because 'nix flake check' is not system-aware
|
||||
# See https://srid.ca/haskell-template/checks
|
||||
nix run nixpkgs#sd \
|
||||
'systems = nixpkgs.lib.systems.flakeExposed' \
|
||||
'systems = [ "x86_64-linux" ]' \
|
||||
flake.nix
|
||||
|
||||
# Sandbox must be disabed for:
|
||||
# https://github.com/srid/haskell-flake/issues/21
|
||||
nix \
|
||||
--option sandbox false \
|
||||
flake check -L
|
||||
flake check -L \
|
||||
--override-input systems github:nix-systems/x86_64-linux
|
||||
|
|
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
|
@ -14,17 +14,12 @@ pipeline {
|
|||
stage ('Flake checks') {
|
||||
steps {
|
||||
sh '''
|
||||
# Because 'nix flake check' is not system-aware
|
||||
# See https://srid.ca/haskell-template/checks
|
||||
nix run nixpkgs#sd \
|
||||
'systems = nixpkgs.lib.systems.flakeExposed' \
|
||||
'systems = [ "x86_64-linux" ]' \
|
||||
flake.nix
|
||||
# Sandbox must be disabed for:
|
||||
# https://github.com/srid/haskell-flake/issues/21
|
||||
nix \
|
||||
--option sandbox false \
|
||||
flake check -L
|
||||
flake check -L \
|
||||
--override-input systems github:nix-systems/x86_64-linux
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
16
flake.lock
generated
16
flake.lock
generated
|
@ -104,9 +104,25 @@
|
|||
"haskell-flake": "haskell-flake",
|
||||
"mission-control": "mission-control",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
description = "srid/haskell-template: Nix template for Haskell projects";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
systems.url = "github:nix-systems/default";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
haskell-flake.url = "github:srid/haskell-flake";
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
|
@ -12,7 +13,7 @@
|
|||
|
||||
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = nixpkgs.lib.systems.flakeExposed;
|
||||
systems = import inputs.systems;
|
||||
imports = [
|
||||
inputs.haskell-flake.flakeModule
|
||||
inputs.treefmt-nix.flakeModule
|
||||
|
|
Loading…
Reference in a new issue