File tree Expand file tree Collapse file tree 3 files changed +21
-9
lines changed
Expand file tree Collapse file tree 3 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 2727 archiveLockFile ,
2828 inputOverrides ,
2929 elispPackagePins ,
30+ defaultMainIsAscii ,
3031 } : mode : let
3132 toLockData = {
3233 nodes ,
9293 ) ;
9394
9495 getPackageData = revDep : ename :
95- lib . makeExtensible ( import ./package.nix { inherit lib linkFarm ; }
96+ lib . makeExtensible ( import ./package.nix { inherit lib linkFarm defaultMainIsAscii ; }
9697 ename
9798 # It would be nice if it were possible to set the pin from inside
9899 # overrideInputs, but it causes infinite recursion unfortunately :(
Original file line number Diff line number Diff line change 2222 isFunction
2323 ;
2424in
25- { lib , linkFarm } : ename : mkAttrs : self : let
25+ {
26+ lib ,
27+ linkFarm ,
28+ defaultMainIsAscii ,
29+ } : ename : mkAttrs : self : let
2630 attrs =
2731 if isAttrs mkAttrs
2832 then mkAttrs
6367 lib . parseElispHeaders
6468 (
6569 # Add support for an option to remove IFD.
66- if self . mainIsAscii or false
70+ if self . mainIsAscii or defaultMainIsAscii
6771 then builtins . readFile ( self . src + "/${ self . mainFile } " )
6872 else
6973 ( lib . readFirstBytes
8892 # If the source if a single-file archive from ELPA or MELPA, src will be
8993 # a file, and not a directory, so the file should be put in a directory.
9094 if attrs . inventory . type == "archive" && attrs . archive . type == "file"
91- then linkFarm ( ename + ".el" ) [
92- {
93- name = ename + ".el" ;
94- path = attrs . src ;
95- }
96- ]
95+ then
96+ linkFarm ( ename + ".el" ) [
97+ {
98+ name = ename + ".el" ;
99+ path = attrs . src ;
100+ }
101+ ]
97102 else attrs . src ;
98103
99104 files = attrs . files or ( lib . expandMelpaRecipeFiles self . src null ) ;
Original file line number Diff line number Diff line change 3636 if wantExtraOutputs
3737 then [ "info" ]
3838 else [ ] ,
39+ # Assume the main files of all packages contain only ASCII characters. This is
40+ # a requirement for avoiding IFD, but some libraries actually contain
41+ # non-ASCII characters, which cannot be parsed with `builtins.readFile`
42+ # function of Nix.
43+ defaultMainIsAscii ? false ,
3944 # Export a manifest file of of the package set from the wrapper
4045 # (experimental). Needed if you use the hot-reloading feature of twist.el.
4146 exportManifest ? false ,
101106 archiveLockFile
102107 builtinLibraries
103108 inputOverrides
109+ defaultMainIsAscii
104110 ;
105111 # Just remap the name
106112 inventories = registries ;
You can’t perform that action at this time.
0 commit comments