Commit 370fce7 1 parent 8f4caf1 commit 370fce7 Copy full SHA for 370fce7
File tree 3 files changed +24
-0
lines changed
3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ with lib;
33
33
type = types . attrsOf types . package ;
34
34
default = { } ;
35
35
} ;
36
+
37
+ extraBinDirs = mkOption {
38
+ type = types . attrsOf ( types . listOf types . package ) ;
39
+ default = { } ;
40
+ } ;
36
41
} ;
37
42
38
43
config = {
Original file line number Diff line number Diff line change 2
2
, lib
3
3
, fetchgit
4
4
, fetchFromGitHub
5
+ , runCommand
5
6
, symlinkJoin
6
7
, system
7
8
, writeTextDir
65
66
meta = chooseMeta pkg ;
66
67
} ;
67
68
69
+ linkBinaries = newBin : inputs : runCommand "${ name } -${ newBin } " { } ''
70
+ mkdir -p "$out/${ newBin } "
71
+
72
+ for input in ${ builtins . toString inputs } ; do
73
+ find "$input/bin" -type f -executable | while read -r executable; do
74
+ ln -s "$executable" "$out/${ newBin } /$(basename "$executable")"
75
+ done
76
+ done
77
+ '' ;
78
+
68
79
in
69
80
70
81
symlinkJoin {
@@ -74,6 +85,7 @@ symlinkJoin {
74
85
++ attrValues evaluated . config . builtLanguageServers
75
86
++ lib . optionals ( builtins . length exporters > 0 ) [ ( writeTextDir "lib/codedown/exporters.yaml" ( lib . generators . toYAML { } exporters ) ) ]
76
87
++ attrValues evaluated . config . packages
88
+ ++ lib . mapAttrsToList linkBinaries evaluated . config . extraBinDirs
77
89
;
78
90
79
91
passthru = rec {
Original file line number Diff line number Diff line change 1
1
{ codedown
2
+ , pkgsStable
2
3
, ...
3
4
} :
4
5
5
6
codedown . makeEnvironment {
6
7
kernels . bash . enable = true ;
8
+
9
+ extraBinDirs = {
10
+ "runner_bin" = [
11
+ pkgsStable . tmux
12
+ ] ;
13
+ } ;
7
14
}
You can’t perform that action at this time.
0 commit comments