File tree Expand file tree Collapse file tree 4 files changed +49
-9
lines changed Expand file tree Collapse file tree 4 files changed +49
-9
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ node_modules
10
10
public
11
11
dist
12
12
dist-newstyle
13
+ .direnv
13
14
14
15
build
15
16
Original file line number Diff line number Diff line change 11
11
safe-coloured-text . flake = false ;
12
12
sydtest . url = "github:NorfairKing/sydtest" ;
13
13
sydtest . flake = false ;
14
+ flake-utils . url = "github:numtide/flake-utils" ;
14
15
} ;
15
16
16
17
outputs =
21
22
, safe-coloured-text
22
23
, sydtest
23
24
, autodocodec
25
+ , flake-utils
24
26
} :
27
+ flake-utils . lib . eachDefaultSystem ( system :
25
28
let
26
- system = "x86_64-linux" ;
27
29
pkgsFor = nixpkgs : import nixpkgs {
28
30
inherit system ;
29
31
overlays = [
38
40
39
41
in
40
42
{
41
- overlays . ${ system } = import ./nix/overlay.nix ;
42
- packages . ${ system } . default = pkgs . openapi3-code-generator ;
43
- checks . ${ system } =
43
+ overlays = import ./nix/overlay.nix ;
44
+ packages . default = pkgs . openapi3-code-generator ;
45
+ checks =
44
46
let tests = import ./nix/tests.nix { inherit pkgs ; } ;
45
47
in
46
48
{
88
90
} ;
89
91
} ;
90
92
} ;
91
- devShells . ${ system } . default = pkgs . haskellPackages . shellFor {
93
+ devShells . default = pkgs . haskellPackages . shellFor {
92
94
name = "openapi-code-generator-shell" ;
93
95
packages = ( p :
94
96
[ p . openapi3-code-generator ]
98
100
buildInputs = ( with pkgs ; [
99
101
zlib
100
102
cabal-install
103
+ stack
101
104
] ) ++ ( with pre-commit-hooks . packages . ${ system } ;
102
105
[
103
106
hlint
108
111
] ) ;
109
112
shellHook = self . checks . ${ system } . pre-commit . shellHook ;
110
113
} ;
111
- } ;
114
+ } ) ;
112
115
}
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- nix build .\# checks.x86_64-linux.testGoldenGenerate
3
+ system=$( nix eval --impure --raw --expr ' builtins.currentSystem' )
4
+
5
+ nix build .\# checks.${system} .testGoldenGenerate
4
6
rm -rf testing/golden-output
5
7
mkdir -p testing/golden-output
6
8
cp -R result/* testing/golden-output
7
9
chmod -R 764 testing/golden-output
8
10
9
11
10
- nix build .\# checks.x86_64-linux .exampleGenerate
12
+ nix build .\# checks.${system} .exampleGenerate
11
13
rm -rf example/generatedCode
12
14
mkdir -p example/generatedCode
13
15
cp -R result/* example/generatedCode
You can’t perform that action at this time.
0 commit comments