Commit 1f6cd35f authored by David McFarland's avatar David McFarland
Browse files

dotnetCorePackages.fetchNupkg: add override mechanism

parent 32ccfdc2
Loading
Loading
Loading
Loading
+52 −47
Original line number Diff line number Diff line
@@ -6,6 +6,8 @@
  unzip,
  patchNupkgs,
  nugetPackageHook,
  callPackage,
  overrides ? callPackage ./overrides.nix { },
}:
{
  pname,
@@ -15,7 +17,8 @@
  url ? "https://www.nuget.org/api/v2/package/${pname}/${version}",
  installable ? false,
}:
stdenvNoCC.mkDerivation rec {
let
  package = stdenvNoCC.mkDerivation rec {
    inherit pname version;

    src = fetchurl {
@@ -72,4 +75,6 @@ stdenvNoCC.mkDerivation rec {
    '';

    createInstallableNugetSource = installable;
}
  };
in
overrides.${pname} or lib.id package
+9 −0
Original line number Diff line number Diff line
{ autoPatchelfHook }:
{
  # e.g.
  # "Package.Id" =
  #   package:
  #   package.overrideAttrs (old: {
  #     buildInputs = old.buildInputs or [ ] ++ [ hello ];
  #   });
}