File tree Expand file tree Collapse file tree 4 files changed +28
-4
lines changed Expand file tree Collapse file tree 4 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 1
1
{ ...} @args :
2
2
3
3
let
4
+ pins = ( __fromJSON ( __readFile ./flake.lock ) ) . nodes ;
5
+ nixpkgsPin = pins . nixpkgs-2205 . locked ;
6
+ flakeCompatPin = pins . flake-compat . locked ;
4
7
nixpkgsSrc =
5
8
builtins . fetchTarball {
6
- url = "https://github.com/NixOS/nixpkgs/archive/110a2c9ebbf5d4a94486854f18a37a938cfacbbb .tar.gz" ;
7
- sha256 = "sha256-leWXLchbAbqOlLT6tju631G40SzQWPqaAXQG3zH1Imw=" ;
9
+ url = "https://github.com/NixOS/nixpkgs/archive/${ nixpkgsPin . rev } .tar.gz" ;
10
+ sha256 = nixpkgsPin . narHash ;
8
11
} ;
9
12
pkgs = args . pkgs or ( import nixpkgsSrc { } ) ;
10
13
flake-compat =
11
14
pkgs . fetchzip {
12
- url = "https://github.com/edolstra/flake-compat/archive/5523c47f13259b981c49b26e28499724a5125fd8 .tar.gz" ;
13
- sha256 = "sha256-7IySNHriQjzOZ88DDk6VDPf1GoUaOrOeUdukY62o52o=" ;
15
+ url = "https://github.com/edolstra/flake-compat/archive/{flakeCompatPin.rev} .tar.gz" ;
16
+ sha256 = flakeCompatPin . narHash ;
14
17
} ;
15
18
self = import flake-compat {
16
19
# We bypass flake-compat's rootSrc cleaning by evading its detection of this as a git
Original file line number Diff line number Diff line change 8
8
nixpkgs-2111 = { url = "github:NixOS/nixpkgs/nixpkgs-21.11-darwin" ; } ;
9
9
nixpkgs-2205 = { url = "github:NixOS/nixpkgs/nixpkgs-22.05-darwin" ; } ;
10
10
nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable" ; } ;
11
+ flake-compat = { url = "github:hamishmack/flake-compat/hkm/pkgs-fetch" ; flake = false ; } ;
11
12
flake-utils = { url = "github:numtide/flake-utils" ; } ;
12
13
hydra . url = "hydra" ;
13
14
hackage = {
Original file line number Diff line number Diff line change 39
39
40
40
if [ " $TESTS " == " unit-tests" ] || [ " $TESTS " == " all" ]; then
41
41
printf " *** Running the unit tests... " >& 2
42
+ # Running nix build first avoids `error: path '/nix/store/X-hackage-to-nix-ghcjs-overlay.drv' is not valid`
43
+ nix-build ./default.nix --argstr compiler-nix-name $GHC -A unit.tests
42
44
res=$( nix-instantiate --eval --json --strict ./default.nix --argstr compiler-nix-name $GHC -A unit.tests)
43
45
num_failed=$( jq length <<< " $res" )
44
46
if [ $num_failed -eq 0 ]; then
You can’t perform that action at this time.
0 commit comments