File tree 3 files changed +19
-13
lines changed
3 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 8
8
writeText ,
9
9
nodejs ,
10
10
compilers ,
11
+ purs-versions ,
11
12
dhall ,
12
13
dhall-json ,
13
14
git ,
76
77
'' ;
77
78
postFixup = ''
78
79
wrapProgram $out/bin/${ name } \
79
- --set PATH ${ lib . makeBinPath [ compilers dhall dhall-json licensee git coreutils gzip gnutar ] }
80
+ --set PATH ${ lib . makeBinPath [ compilers purs-versions dhall dhall-json licensee git coreutils gzip gnutar ] }
80
81
'' ;
81
82
} ;
82
83
109
110
'' ;
110
111
postFixup = ''
111
112
wrapProgram $out/bin/${ name } \
112
- --set PATH ${ lib . makeBinPath [ compilers dhall dhall-json licensee git coreutils gzip gnutar ] }
113
+ --set PATH ${ lib . makeBinPath [ compilers purs-versions dhall dhall-json licensee git coreutils gzip gnutar ] }
113
114
'' ;
114
115
} ;
115
116
}
Original file line number Diff line number Diff line change 71
71
#
72
72
# To add a new compiler to the list, just update the flake:
73
73
# $ nix flake update
74
- compilers = let
75
- # Only include the compiler at normal MAJOR.MINOR.PATCH versions.
76
- stableOnly =
77
- prev . lib . filterAttrs ( name : _ : ( builtins . match "^purs-[0-9]+_[0-9]+_[0-9]+$" name != null ) )
78
- prev . purs-bin ;
79
- in
74
+ supportedCompilers = prev . lib . filterAttrs ( name : _ : ( builtins . match "^purs-[0-9]+_[0-9]+_[0-9]+$" name != null ) ) prev . purs-bin ;
75
+
76
+ # An attrset containing all the PureScript binaries we want to make
77
+ # available.
78
+ compilers =
80
79
prev . symlinkJoin {
81
80
name = "purs-compilers" ;
82
81
paths = prev . lib . mapAttrsToList ( name : drv :
83
82
prev . writeShellScriptBin name ''
84
83
exec ${ drv } /bin/purs "$@"
85
84
'' )
86
- stableOnly ;
85
+ supportedCompilers ;
87
86
} ;
87
+
88
+ purs-versions = prev . writeShellScriptBin "purs-versions" ''
89
+ echo ${ prev . lib . concatMapStringsSep " " ( x : prev . lib . removePrefix "purs-" ( builtins . replaceStrings [ "_" ] [ "." ] x ) ) ( prev . lib . attrNames supportedCompilers ) }
90
+ '' ;
88
91
in {
89
92
apps = prev . callPackages ./app {
90
- inherit compilers package-lock spago-lock ;
93
+ inherit compilers purs-versions package-lock spago-lock ;
91
94
} ;
92
95
scripts = prev . callPackages ./scripts {
93
- inherit compilers package-lock spago-lock ;
96
+ inherit compilers purs-versions package-lock spago-lock ;
94
97
} ;
95
- inherit compilers package-lock spago-lock ;
98
+ inherit purs-versions compilers package-lock spago-lock ;
96
99
} ;
97
100
} ;
98
101
in
278
281
packages = with pkgs ; [
279
282
# All stable PureScript compilers
280
283
registry . compilers
284
+ registry . purs-versions
281
285
282
286
# TODO: Hacky, remove when I can run spago test in a pure env
283
287
run-tests-script
Original file line number Diff line number Diff line change 7
7
nodejs ,
8
8
writeText ,
9
9
compilers ,
10
+ purs-versions ,
10
11
dhall ,
11
12
dhall-json ,
12
13
licensee ,
48
49
'' ;
49
50
postFixup = ''
50
51
wrapProgram $out/bin/${ name } \
51
- --set PATH ${ lib . makeBinPath [ compilers dhall dhall-json licensee git coreutils gzip gnutar ] }
52
+ --set PATH ${ lib . makeBinPath [ compilers purs-versions dhall dhall-json licensee git coreutils gzip gnutar ] }
52
53
'' ;
53
54
} ;
54
55
in {
You can’t perform that action at this time.
0 commit comments