formula: simplify postFixup
This commit is contained in:
parent
6cd4d4a971
commit
38a5cfb2fb
@ -1,6 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
buildDotnetModule,
|
||||
dotnetCorePackages,
|
||||
@ -25,16 +25,14 @@ buildDotnetModule (finalAttrs: {
|
||||
projectFile = "Src/CommandLine/CommandLine.csproj";
|
||||
|
||||
postFixup =
|
||||
if stdenv.hostPlatform.isLinux then
|
||||
''
|
||||
mv $out/bin/CommandLine $out/bin/formula
|
||||
''
|
||||
else
|
||||
lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
makeWrapper ${dotnetCorePackages.runtime_8_0}/bin/dotnet $out/bin/formula \
|
||||
--add-flags "$out/lib/formula-dotnet/CommandLine.dll" \
|
||||
--prefix DYLD_LIBRARY_PATH : $out/lib/formula-dotnet/runtimes/macos/native
|
||||
'';
|
||||
lib.optionalString stdenvNoCC.isLinux ''
|
||||
mv $out/bin/CommandLine $out/bin/formula
|
||||
''
|
||||
+ lib.optionalString stdenvNoCC.isDarwin ''
|
||||
makeWrapper ${dotnetCorePackages.runtime_8_0}/bin/dotnet $out/bin/formula \
|
||||
--add-flags "$out/lib/formula-dotnet/CommandLine.dll" \
|
||||
--prefix DYLD_LIBRARY_PATH : $out/lib/formula-dotnet/runtimes/macos/native
|
||||
'';
|
||||
|
||||
passthru.updateScript = unstableGitUpdater { url = finalAttrs.meta.homepage; };
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
buildDotnetModule,
|
||||
dotnetCorePackages,
|
||||
@ -23,13 +23,13 @@ buildDotnetModule (finalAttrs: rec {
|
||||
[
|
||||
powershell
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
|
||||
++ lib.optionals (stdenvNoCC.hostPlatform.isDarwin && stdenvNoCC.hostPlatform.isAarch64) [
|
||||
autoSignDarwinBinariesHook
|
||||
];
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/38991
|
||||
# bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
|
||||
env.LOCALE_ARCHIVE = lib.optionalString stdenv.hostPlatform.isLinux "${glibcLocales}/lib/locale/locale-archive";
|
||||
env.LOCALE_ARCHIVE = lib.optionalString stdenvNoCC.hostPlatform.isLinux "${glibcLocales}/lib/locale/locale-archive";
|
||||
|
||||
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user