···11-{ pkgs, buildPackages, lib, stdenv, libiconv, mkNugetDeps, mkNugetSource, gixy }:11+{22+ buildPackages,33+ gixy,44+ lib,55+ libiconv,66+ makeBinaryWrapper,77+ mkNugetDeps,88+ mkNugetSource,99+ pkgs,1010+ stdenv,1111+}:212let313 inherit (lib)414 concatMapStringsSep···166 escapeShellArg177 last188 optionalString1919- stringLength209 strings2110 types2211 ;···2718 # Examples:2819 # writeBash = makeScriptWriter { interpreter = "${pkgs.bash}/bin/bash"; }2920 # makeScriptWriter { interpreter = "${pkgs.dash}/bin/dash"; } "hello" "echo hello world"3030- makeScriptWriter = { interpreter, check ? "" }: nameOrPath: content:2121+ makeScriptWriter = { interpreter, check ? "", makeWrapperArgs ? [], }: nameOrPath: content:3122 assert lib.or (types.path.check nameOrPath) (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);3223 assert lib.or (types.path.check content) (types.str.check content);3324 let2525+ nameIsPath = types.path.check nameOrPath;3426 name = last (builtins.split "/" nameOrPath);3535- in2727+ path = if nameIsPath then nameOrPath else "/bin/${name}";2828+ # The inner derivation which creates the executable under $out/bin (never at $out directly)2929+ # This is required in order to support wrapping, as wrapped programs consist of at least two files: the executable and the wrapper.3030+ inner =3131+ pkgs.runCommandLocal name (3232+ {3333+ inherit makeWrapperArgs;3434+ nativeBuildInputs = [3535+ makeBinaryWrapper3636+ ];3737+ meta.mainProgram = name;3838+ }3939+ // (4040+ if (types.str.check content) then {4141+ inherit content interpreter;4242+ passAsFile = [ "content" ];4343+ } else {4444+ inherit interpreter;4545+ contentPath = content;4646+ }4747+ )4848+ )4949+ ''5050+ # On darwin a script cannot be used as an interpreter in a shebang but5151+ # there doesn't seem to be a limit to the size of shebang and multiple5252+ # arguments to the interpreter are allowed.5353+ if [[ -n "${toString pkgs.stdenvNoCC.isDarwin}" ]] && isScript $interpreter5454+ then5555+ wrapperInterpreterLine=$(head -1 "$interpreter" | tail -c+3)5656+ # Get first word from the line (note: xargs echo remove leading spaces)5757+ wrapperInterpreter=$(echo "$wrapperInterpreterLine" | xargs echo | cut -d " " -f1)36583737- pkgs.runCommandLocal name (3838- lib.optionalAttrs (nameOrPath == "/bin/${name}") {3939- meta.mainProgram = name;4040- }4141- // (4242- if (types.str.check content) then {4343- inherit content interpreter;4444- passAsFile = [ "content" ];4545- } else {4646- inherit interpreter;4747- contentPath = content;4848- }4949- )5050- )5151- ''5252- # On darwin a script cannot be used as an interpreter in a shebang but5353- # there doesn't seem to be a limit to the size of shebang and multiple5454- # arguments to the interpreter are allowed.5555- if [[ -n "${toString pkgs.stdenvNoCC.isDarwin}" ]] && isScript $interpreter5656- then5757- wrapperInterpreterLine=$(head -1 "$interpreter" | tail -c+3)5858- # Get first word from the line (note: xargs echo remove leading spaces)5959- wrapperInterpreter=$(echo "$wrapperInterpreterLine" | xargs echo | cut -d " " -f1)5959+ if isScript $wrapperInterpreter6060+ then6161+ echo "error: passed interpreter ($interpreter) is a script which has another script ($wrapperInterpreter) as an interpreter, which is not supported."6262+ exit 16363+ fi60646161- if isScript $wrapperInterpreter6262- then6363- echo "error: passed interpreter ($interpreter) is a script which has another script ($wrapperInterpreter) as an interpreter, which is not supported."6464- exit 16565- fi6565+ # This should work as long as wrapperInterpreter is a shell, which is6666+ # the case for programs wrapped with makeWrapper, like6767+ # python3.withPackages etc.6868+ interpreterLine="$wrapperInterpreterLine $interpreter"6969+ else7070+ interpreterLine=$interpreter7171+ fi66726767- # This should work as long as wrapperInterpreter is a shell, which is6868- # the case for programs wrapped with makeWrapper, like6969- # python3.withPackages etc.7070- interpreterLine="$wrapperInterpreterLine $interpreter"7171- else7272- interpreterLine=$interpreter7373- fi7373+ echo "#! $interpreterLine" > $out7474+ cat "$contentPath" >> $out7575+ ${optionalString (check != "") ''7676+ ${check} $out7777+ ''}7878+ chmod +x $out74797575- echo "#! $interpreterLine" > $out7676- cat "$contentPath" >> $out7777- ${optionalString (check != "") ''7878- ${check} $out7979- ''}8080- chmod +x $out8181- ${optionalString (types.path.check nameOrPath) ''8282- mv $out tmp8383- mkdir -p $out/$(dirname "${nameOrPath}")8484- mv tmp $out/${nameOrPath}8585- ''}8686- '';8080+ # Relocate executable8181+ # Wrap it if makeWrapperArgs are specified8282+ mv $out tmp8383+ mkdir -p $out/$(dirname "${path}")8484+ mv tmp $out/${path}8585+ if [ -n "''${makeWrapperArgs+''${makeWrapperArgs[@]}}" ]; then8686+ wrapProgram $out/${path} ''${makeWrapperArgs[@]}8787+ fi8888+ '';8989+ in9090+ if nameIsPath9191+ then inner9292+ # In case nameOrPath is a name, the user intends the executable to be located at $out.9393+ # This is achieved by creating a separate derivation containing a symlink at $out linking to ${inner}/bin/${name}.9494+ # This breaks the override pattern.9595+ # In case this turns out to be a problem, we can still add more magic9696+ else pkgs.runCommandLocal name {} ''9797+ ln -s ${inner}/bin/${name} $out9898+ '';9999+8710088101 # Base implementation for compiled executables.89102 # Takes a compile script, which in turn takes the name as an argument.90103 #91104 # Examples:92105 # writeSimpleC = makeBinWriter { compileScript = name: "gcc -o $out $contentPath"; }9393- makeBinWriter = { compileScript, strip ? true }: nameOrPath: content:106106+ makeBinWriter = { compileScript, strip ? true, makeWrapperArgs ? [] }: nameOrPath: content:94107 assert lib.or (types.path.check nameOrPath) (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);95108 assert lib.or (types.path.check content) (types.str.check content);96109 let110110+ nameIsPath = types.path.check nameOrPath;97111 name = last (builtins.split "/" nameOrPath);112112+ path = if nameIsPath then nameOrPath else "/bin/${name}";113113+ # The inner derivation which creates the executable under $out/bin (never at $out directly)114114+ # This is required in order to support wrapping, as wrapped programs consist of at least two files: the executable and the wrapper.115115+ inner =116116+ pkgs.runCommandLocal name (117117+ {118118+ inherit makeWrapperArgs;119119+ nativeBuildInputs = [120120+ makeBinaryWrapper121121+ ];122122+ meta.mainProgram = name;123123+ }124124+ // (125125+ if (types.str.check content) then {126126+ inherit content;127127+ passAsFile = [ "content" ];128128+ } else {129129+ contentPath = content;130130+ }131131+ )132132+ )133133+ ''134134+ ${compileScript}135135+ ${lib.optionalString strip136136+ "${lib.getBin buildPackages.bintools-unwrapped}/bin/${buildPackages.bintools-unwrapped.targetPrefix}strip -S $out"}137137+ # Sometimes binaries produced for darwin (e. g. by GHC) won't be valid138138+ # mach-o executables from the get-go, but need to be corrected somehow139139+ # which is done by fixupPhase.140140+ ${lib.optionalString pkgs.stdenvNoCC.hostPlatform.isDarwin "fixupPhase"}141141+ mv $out tmp142142+ mkdir -p $out/$(dirname "${path}")143143+ mv tmp $out/${path}144144+ if [ -n "''${makeWrapperArgs+''${makeWrapperArgs[@]}}" ]; then145145+ wrapProgram $out/${path} ''${makeWrapperArgs[@]}146146+ fi147147+ '';98148 in9999- pkgs.runCommand name ((if (types.str.check content) then {100100- inherit content;101101- passAsFile = [ "content" ];102102- } else {103103- contentPath = content;104104- }) // lib.optionalAttrs (nameOrPath == "/bin/${name}") {105105- meta.mainProgram = name;106106- }) ''107107- ${compileScript}108108- ${lib.optionalString strip109109- "${lib.getBin buildPackages.bintools-unwrapped}/bin/${buildPackages.bintools-unwrapped.targetPrefix}strip -S $out"}110110- # Sometimes binaries produced for darwin (e. g. by GHC) won't be valid111111- # mach-o executables from the get-go, but need to be corrected somehow112112- # which is done by fixupPhase.113113- ${lib.optionalString pkgs.stdenvNoCC.hostPlatform.isDarwin "fixupPhase"}114114- ${optionalString (types.path.check nameOrPath) ''115115- mv $out tmp116116- mkdir -p $out/$(dirname "${nameOrPath}")117117- mv tmp $out/${nameOrPath}118118- ''}119119- '';149149+ if nameIsPath150150+ then inner151151+ # In case nameOrPath is a name, the user intends the executable to be located at $out.152152+ # This is achieved by creating a separate derivation containing a symlink at $out linking to ${inner}/bin/${name}.153153+ # This breaks the override pattern.154154+ # In case this turns out to be a problem, we can still add more magic155155+ else pkgs.runCommandLocal name {} ''156156+ ln -s ${inner}/bin/${name} $out157157+ '';120158121159 # Like writeScript but the first line is a shebang to bash122160 #123123- # Example:161161+ # Can be called with or without extra arguments.162162+ #163163+ # Example without arguments:124164 # writeBash "example" ''125165 # echo hello world126166 # ''127127- writeBash = makeScriptWriter {128128- interpreter = "${lib.getExe pkgs.bash}";129129- };167167+ #168168+ # Example with arguments:169169+ # writeBash "example"170170+ # {171171+ # makeWrapperArgs = [172172+ # "--prefix" "PATH" ":" "${pkgs.hello}/bin"173173+ # ];174174+ # }175175+ # ''176176+ # hello177177+ # ''178178+ writeBash = name: argsOrScript:179179+ if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript180180+ then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.bash}"; }) name181181+ else makeScriptWriter { interpreter = "${lib.getExe pkgs.bash}"; } name argsOrScript;130182131183 # Like writeScriptBin but the first line is a shebang to bash184184+ #185185+ # Can be called with or without extra arguments.186186+ #187187+ # Example without arguments:188188+ # writeBashBin "example" ''189189+ # echo hello world190190+ # ''191191+ #192192+ # Example with arguments:193193+ # writeBashBin "example"194194+ # {195195+ # makeWrapperArgs = [196196+ # "--prefix", "PATH", ":", "${pkgs.hello}/bin",197197+ # ];198198+ # }199199+ # ''200200+ # hello201201+ # ''132202 writeBashBin = name:133203 writeBash "/bin/${name}";134204135205 # Like writeScript but the first line is a shebang to dash136206 #137137- # Example:207207+ # Can be called with or without extra arguments.208208+ #209209+ # Example without arguments:138210 # writeDash "example" ''139211 # echo hello world140212 # ''141141- writeDash = makeScriptWriter {142142- interpreter = "${lib.getExe pkgs.dash}";143143- };213213+ #214214+ # Example with arguments:215215+ # writeDash "example"216216+ # {217217+ # makeWrapperArgs = [218218+ # "--prefix", "PATH", ":", "${pkgs.hello}/bin",219219+ # ];220220+ # }221221+ # ''222222+ # hello223223+ # ''224224+ writeDash = name: argsOrScript:225225+ if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript226226+ then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.dash}"; }) name227227+ else makeScriptWriter { interpreter = "${lib.getExe pkgs.dash}"; } name argsOrScript;144228145229 # Like writeScriptBin but the first line is a shebang to dash230230+ #231231+ # Can be called with or without extra arguments.232232+ #233233+ # Example without arguments:234234+ # writeDashBin "example" ''235235+ # echo hello world236236+ # ''237237+ #238238+ # Example with arguments:239239+ # writeDashBin "example"240240+ # {241241+ # makeWrapperArgs = [242242+ # "--prefix", "PATH", ":", "${pkgs.hello}/bin",243243+ # ];244244+ # }245245+ # ''246246+ # hello247247+ # ''146248 writeDashBin = name:147249 writeDash "/bin/${name}";148250149251 # Like writeScript but the first line is a shebang to fish150252 #151151- # Example:253253+ # Can be called with or without extra arguments.254254+ #255255+ # Example without arguments:152256 # writeFish "example" ''153257 # echo hello world154258 # ''155155- writeFish = makeScriptWriter {156156- interpreter = "${lib.getExe pkgs.fish} --no-config";157157- check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only158158- };259259+ #260260+ # Example with arguments:261261+ # writeFish "example"262262+ # {263263+ # makeWrapperArgs = [264264+ # "--prefix", "PATH", ":", "${pkgs.hello}/bin",265265+ # ];266266+ # }267267+ # ''268268+ # hello269269+ # ''270270+ writeFish = name: argsOrScript:271271+ if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript272272+ then makeScriptWriter (argsOrScript // {273273+ interpreter = "${lib.getExe pkgs.fish} --no-config";274274+ check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only275275+ }) name276276+ else makeScriptWriter {277277+ interpreter = "${lib.getExe pkgs.fish} --no-config";278278+ check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only279279+ } name argsOrScript;159280160281 # Like writeScriptBin but the first line is a shebang to fish282282+ #283283+ # Can be called with or without extra arguments.284284+ #285285+ # Example without arguments:286286+ # writeFishBin "example" ''287287+ # echo hello world288288+ # ''289289+ #290290+ # Example with arguments:291291+ # writeFishBin "example"292292+ # {293293+ # makeWrapperArgs = [294294+ # "--prefix", "PATH", ":", "${pkgs.hello}/bin",295295+ # ];296296+ # }297297+ # ''298298+ # hello299299+ # ''161300 writeFishBin = name:162301 writeFish "/bin/${name}";163302···319162 # main = launchMissiles320163 # '';321164 writeHaskell = name: {322322- libraries ? [],323165 ghc ? pkgs.ghc,324166 ghcArgs ? [],167167+ libraries ? [],168168+ makeWrapperArgs ? [],169169+ strip ? true,325170 threadedRuntime ? true,326326- strip ? true327171 }:328172 let329173 appendIfNotSet = el: list: if elem el list then list else list ++ [ el ];···336178 ${(ghc.withPackages (_: libraries ))}/bin/ghc ${lib.escapeShellArgs ghcArgs'} tmp.hs337179 mv tmp $out338180 '';339339- inherit strip;181181+ inherit makeWrapperArgs strip;340182 } name;341183342184 # writeHaskellBin takes the same arguments as writeHaskell but outputs a directory (like writeScriptBin)···345187346188 # Like writeScript but the first line is a shebang to nu347189 #348348- # Example:190190+ # Can be called with or without extra arguments.191191+ #192192+ # Example without arguments:349193 # writeNu "example" ''350194 # echo hello world351195 # ''352352- writeNu = makeScriptWriter {353353- interpreter = "${lib.getExe pkgs.nushell} --no-config-file";354354- };196196+ #197197+ # Example with arguments:198198+ # writeNu "example"199199+ # {200200+ # makeWrapperArgs = [201201+ # "--prefix", "PATH", ":", "${pkgs.hello}/bin",202202+ # ];203203+ # }204204+ # ''205205+ # hello206206+ # ''207207+ writeNu = name: argsOrScript:208208+ if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript209209+ then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.nushell} --no-config-file"; }) name210210+ else makeScriptWriter { interpreter = "${lib.getExe pkgs.nushell} --no-config-file"; } name argsOrScript;211211+355212356213 # Like writeScriptBin but the first line is a shebang to nu214214+ #215215+ # Can be called with or without extra arguments.216216+ #217217+ # Example without arguments:218218+ # writeNuBin "example" ''219219+ # echo hello world220220+ # ''221221+ #222222+ # Example with arguments:223223+ # writeNuBin "example"224224+ # {225225+ # makeWrapperArgs = [226226+ # "--prefix", "PATH", ":", "${pkgs.hello}/bin",227227+ # ];228228+ # }229229+ # ''230230+ # hello231231+ # ''357232 writeNuBin = name:358233 writeNu "/bin/${name}";359234360235 # makeRubyWriter takes ruby and compatible rubyPackages and produces ruby script writer,361236 # If any libraries are specified, ruby.withPackages is used as interpreter, otherwise the "bare" ruby is used.362362- makeRubyWriter = ruby: rubyPackages: buildRubyPackages: name: { libraries ? [], }:363363- makeScriptWriter {364364- interpreter =365365- if libraries == []366366- then "${ruby}/bin/ruby"367367- else "${(ruby.withPackages (ps: libraries))}/bin/ruby";368368- # Rubocop doesnt seem to like running in this fashion.369369- #check = (writeDash "rubocop.sh" ''370370- # exec ${lib.getExe buildRubyPackages.rubocop} "$1"371371- #'');372372- } name;237237+ makeRubyWriter = ruby: rubyPackages: buildRubyPackages: name: { libraries ? [], ... } @ args:238238+ makeScriptWriter (239239+ (builtins.removeAttrs args ["libraries"])240240+ // {241241+ interpreter =242242+ if libraries == []243243+ then "${ruby}/bin/ruby"244244+ else "${(ruby.withPackages (ps: libraries))}/bin/ruby";245245+ # Rubocop doesn't seem to like running in this fashion.246246+ #check = (writeDash "rubocop.sh" ''247247+ # exec ${lib.getExe buildRubyPackages.rubocop} "$1"248248+ #'');249249+ }250250+ ) name;373251374252 # Like writeScript but the first line is a shebang to ruby375253 #376254 # Example:377377- # writeRuby "example" ''255255+ # writeRuby "example" { libraries = [ pkgs.rubyPackages.git ]; } ''378256 # puts "hello world"379257 # ''380258 writeRuby = makeRubyWriter pkgs.ruby pkgs.rubyPackages buildPackages.rubyPackages;···421227 # makeLuaWriter takes lua and compatible luaPackages and produces lua script writer,422228 # which validates the script with luacheck at build time. If any libraries are specified,423229 # lua.withPackages is used as interpreter, otherwise the "bare" lua is used.424424- makeLuaWriter = lua: luaPackages: buildLuaPackages: name: { libraries ? [], }:425425- makeScriptWriter {426426- interpreter = lua.interpreter;427427- # if libraries == []428428- # then lua.interpreter429429- # else (lua.withPackages (ps: libraries)).interpreter430430- # This should support packages! I just cant figure out why some dependency collision happens whenever I try to run this.431431- check = (writeDash "luacheck.sh" ''432432- exec ${buildLuaPackages.luacheck}/bin/luacheck "$1"433433- '');434434- } name;230230+ makeLuaWriter = lua: luaPackages: buildLuaPackages: name: { libraries ? [], ... } @ args:231231+ makeScriptWriter (232232+ (builtins.removeAttrs args ["libraries"])233233+ // {234234+ interpreter = lua.interpreter;235235+ # if libraries == []236236+ # then lua.interpreter237237+ # else (lua.withPackages (ps: libraries)).interpreter238238+ # This should support packages! I just cant figure out why some dependency collision happens whenever I try to run this.239239+ check = (writeDash "luacheck.sh" ''240240+ exec ${buildLuaPackages.luacheck}/bin/luacheck "$1"241241+ '');242242+ }243243+ ) name;435244436245 # writeLua takes a name an attributeset with libraries and some lua source code and437246 # returns an executable (should also work with luajit)···462265 writeLua "/bin/${name}";463266464267 writeRust = name: {465465- rustc ? pkgs.rustc,466466- rustcArgs ? [],467467- strip ? true268268+ makeWrapperArgs ? [],269269+ rustc ? pkgs.rustc,270270+ rustcArgs ? [],271271+ strip ? true,468272 }:469273 let470274 darwinArgs = lib.optionals stdenv.isDarwin [ "-L${lib.getLib libiconv}/lib" ];···475277 cp "$contentPath" tmp.rs476278 PATH=${lib.makeBinPath [pkgs.gcc]} ${rustc}/bin/rustc ${lib.escapeShellArgs rustcArgs} ${lib.escapeShellArgs darwinArgs} -o "$out" tmp.rs477279 '';478478- inherit strip;280280+ inherit makeWrapperArgs strip;479281 } name;480282481283 writeRustBin = name:···535337 # use boolean;536338 # print "Howdy!\n" if true;537339 # ''538538- writePerl = name: { libraries ? [] }:539539- makeScriptWriter {540540- interpreter = "${lib.getExe (pkgs.perl.withPackages (p: libraries))}";541541- } name;340340+ writePerl = name: { libraries ? [], ... } @ args:341341+ makeScriptWriter (342342+ (builtins.removeAttrs args ["libraries"])343343+ // {344344+ interpreter = "${lib.getExe (pkgs.perl.withPackages (p: libraries))}";345345+ }346346+ ) name;542347543348 # writePerlBin takes the same arguments as writePerl but outputs a directory (like writeScriptBin)544349 writePerlBin = name:···550349 # makePythonWriter takes python and compatible pythonPackages and produces python script writer,551350 # which validates the script with flake8 at build time. If any libraries are specified,552351 # python.withPackages is used as interpreter, otherwise the "bare" python is used.553553- makePythonWriter = python: pythonPackages: buildPythonPackages: name: { libraries ? [], flakeIgnore ? [] }:352352+ makePythonWriter = python: pythonPackages: buildPythonPackages: name: { libraries ? [], flakeIgnore ? [], ... } @ args:554353 let555354 ignoreAttribute = optionalString (flakeIgnore != []) "--ignore ${concatMapStringsSep "," escapeShellArg flakeIgnore}";556355 in557557- makeScriptWriter {558558- interpreter =559559- if pythonPackages != pkgs.pypy2Packages || pythonPackages != pkgs.pypy3Packages then560560- if libraries == []561561- then python.interpreter562562- else (python.withPackages (ps: libraries)).interpreter563563- else python.interpreter564564- ;565565- check = optionalString python.isPy3k (writeDash "pythoncheck.sh" ''566566- exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1"567567- '');568568- } name;356356+ makeScriptWriter357357+ (358358+ (builtins.removeAttrs args ["libraries" "flakeIgnore"])359359+ // {360360+ interpreter =361361+ if pythonPackages != pkgs.pypy2Packages || pythonPackages != pkgs.pypy3Packages then362362+ if libraries == []363363+ then python.interpreter364364+ else (python.withPackages (ps: libraries)).interpreter365365+ else python.interpreter366366+ ;367367+ check = optionalString python.isPy3k (writeDash "pythoncheck.sh" ''368368+ exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1"369369+ '');370370+ }371371+ )372372+ name;569373570374 # writePyPy2 takes a name an attributeset with libraries and some pypy2 sourcecode and571375 # returns an executable···627421 writePyPy3 "/bin/${name}";628422629423630630- makeFSharpWriter = { dotnet-sdk ? pkgs.dotnet-sdk, fsi-flags ? "", libraries ? _: [] }: nameOrPath:424424+ makeFSharpWriter = { dotnet-sdk ? pkgs.dotnet-sdk, fsi-flags ? "", libraries ? _: [], ... } @ args: nameOrPath:631425 let632426 fname = last (builtins.split "/" nameOrPath);633427 path = if strings.hasSuffix ".fsx" nameOrPath then nameOrPath else "${nameOrPath}.fsx";···648442 ${lib.getExe dotnet-sdk} fsi --quiet --nologo --readline- ${fsi-flags} "$@" < "$script"649443 '';650444651651- in content: makeScriptWriter {652652- interpreter = fsi;653653- } path445445+ in content: makeScriptWriter (446446+ (builtins.removeAttrs args ["dotnet-sdk" "fsi-flags" "libraries"])447447+ // {448448+ interpreter = fsi;449449+ }450450+ ) path654451 ''655452 #i "nuget: ${nuget-source}/lib"656453 ${ content }···665456666457 writeFSharpBin = name:667458 writeFSharp "/bin/${name}";668668-669459}