diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-10-25 12:01:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 12:01:31 +0000 |
commit | 0336295c415fe1f3df00f42a68242e2b023ef902 (patch) | |
tree | 879635bd57b2c1e8d586f3c2cf7ef165cbe674b7 /pkgs/build-support | |
parent | 20ecf5770423a03d979f5e07eeae34d0a6745f50 (diff) | |
parent | 44f2fc42d39f3bb8c8e01fe96eb7b85bf5a9a9aa (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/build-dotnet-module/default.nix | 18 | ||||
-rw-r--r-- | pkgs/build-support/docker/test-dummy/hello.txt | 1 | ||||
-rw-r--r-- | pkgs/build-support/fetchpatch/tests.nix | 8 |
3 files changed, 19 insertions, 8 deletions
diff --git a/pkgs/build-support/build-dotnet-module/default.nix b/pkgs/build-support/build-dotnet-module/default.nix index 0161c101e5bf2..3701f254d0ca4 100644 --- a/pkgs/build-support/build-dotnet-module/default.nix +++ b/pkgs/build-support/build-dotnet-module/default.nix @@ -51,6 +51,8 @@ let }); package = stdenv.mkDerivation (args // { + inherit buildType; + nativeBuildInputs = args.nativeBuildInputs or [] ++ [ dotnet-sdk dotnetPackages.Nuget cacert makeWrapper ]; # Stripping breaks the executable @@ -71,7 +73,7 @@ let mkdir -p $HOME/.nuget/NuGet cp $HOME/.config/NuGet/NuGet.Config $HOME/.nuget/NuGet - dotnet restore ${lib.escapeShellArg projectFile} \ + dotnet restore "$projectFile" \ ${lib.optionalString (!enableParallelBuilding) "--disable-parallel"} \ -p:ContinuousIntegrationBuild=true \ -p:Deterministic=true \ @@ -85,13 +87,13 @@ let buildPhase = args.buildPhase or '' runHook preBuild - dotnet build ${lib.escapeShellArg projectFile} \ + dotnet build "$projectFile" \ -maxcpucount:${if enableParallelBuilding then "$NIX_BUILD_CORES" else "1"} \ -p:BuildInParallel=${if enableParallelBuilding then "true" else "false"} \ -p:ContinuousIntegrationBuild=true \ -p:Deterministic=true \ -p:Version=${args.version} \ - --configuration ${buildType} \ + --configuration "$buildType" \ --no-restore \ "''${dotnetBuildFlags[@]}" \ "''${dotnetFlags[@]}" @@ -102,17 +104,17 @@ let installPhase = args.installPhase or '' runHook preInstall - dotnet publish ${lib.escapeShellArg projectFile} \ + dotnet publish "$projectFile" \ -p:ContinuousIntegrationBuild=true \ -p:Deterministic=true \ --output $out/lib/${args.pname} \ - --configuration ${buildType} \ + --configuration "$buildType" \ --no-build \ --no-self-contained \ "''${dotnetInstallFlags[@]}" \ "''${dotnetFlags[@]}" '' + (if executables != null then '' - for executable in ''${executables}; do + for executable in $executables; do execPath="$out/lib/${args.pname}/$executable" if [[ -f "$execPath" && -x "$execPath" ]]; then @@ -120,7 +122,7 @@ let --set DOTNET_ROOT "${dotnet-runtime}" \ --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" \ "''${gappsWrapperArgs[@]}" \ - ''${makeWrapperArgs} + "''${makeWrapperArgs[@]}" else echo "Specified binary \"$executable\" is either not an executable, or does not exist!" exit 1 @@ -133,7 +135,7 @@ let --set DOTNET_ROOT "${dotnet-runtime}" \ --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" \ "''${gappsWrapperArgs[@]}" \ - ''${makeWrapperArgs} + "''${makeWrapperArgs[@]}" fi done '') + '' diff --git a/pkgs/build-support/docker/test-dummy/hello.txt b/pkgs/build-support/docker/test-dummy/hello.txt new file mode 100644 index 0000000000000..495cc9fa8f9c1 --- /dev/null +++ b/pkgs/build-support/docker/test-dummy/hello.txt @@ -0,0 +1 @@ +Hello there! diff --git a/pkgs/build-support/fetchpatch/tests.nix b/pkgs/build-support/fetchpatch/tests.nix new file mode 100644 index 0000000000000..4240b325d6563 --- /dev/null +++ b/pkgs/build-support/fetchpatch/tests.nix @@ -0,0 +1,8 @@ +{ invalidateFetcherByDrvHash, fetchpatch, ... }: + +{ + simple = invalidateFetcherByDrvHash fetchpatch { + url = "https://github.com/facebook/zstd/pull/2724/commits/e1f85dbca3a0ed5ef06c8396912a0914db8dea6a.patch"; + sha256 = "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg="; + }; +} |