mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-03-05 23:02:22 +00:00
build-dotnet-package: add optional makeWrapperArgs argument
3 lines of code are shamelessly stolen from buildPythonPackage
This commit is contained in:
parent
f67184e9a9
commit
dc70fcd94b
|
@ -9,6 +9,9 @@ attrsOrig @
|
||||||
, outputFiles ? [ "bin/Release/*" ]
|
, outputFiles ? [ "bin/Release/*" ]
|
||||||
, dllFiles ? [ "*.dll" ]
|
, dllFiles ? [ "*.dll" ]
|
||||||
, exeFiles ? [ "*.exe" ]
|
, exeFiles ? [ "*.exe" ]
|
||||||
|
# Additional arguments to pass to the makeWrapper function, which wraps
|
||||||
|
# generated binaries.
|
||||||
|
, makeWrapperArgs ? [ ]
|
||||||
, ... }:
|
, ... }:
|
||||||
let
|
let
|
||||||
arrayToShell = (a: toString (map (lib.escape (lib.stringToCharacters "\\ ';$`()|<>\t") ) a));
|
arrayToShell = (a: toString (map (lib.escape (lib.stringToCharacters "\\ ';$`()|<>\t") ) a));
|
||||||
|
@ -98,7 +101,10 @@ attrsOrig @
|
||||||
[ -f "$exe" ] || continue
|
[ -f "$exe" ] || continue
|
||||||
mkdir -p "$out"/bin
|
mkdir -p "$out"/bin
|
||||||
commandName="$(basename -s .exe "$(echo "$exe" | tr "[A-Z]" "[a-z]")")"
|
commandName="$(basename -s .exe "$(echo "$exe" | tr "[A-Z]" "[a-z]")")"
|
||||||
makeWrapper "${mono}/bin/mono \"$exe\"" "$out"/bin/"$commandName"
|
makeWrapper \
|
||||||
|
"${mono}/bin/mono \"$exe\"" \
|
||||||
|
"$out"/bin/"$commandName" \
|
||||||
|
''${makeWrapperArgs}
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue