dotnetCorePackages.fetchNupkg: add override mechanism

This commit is contained in:
David McFarland 2024-09-03 23:33:28 -03:00
parent 32ccfdc278
commit 1f6cd35f5e
2 changed files with 70 additions and 56 deletions

View File

@ -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

View File

@ -0,0 +1,9 @@
{ autoPatchelfHook }:
{
# e.g.
# "Package.Id" =
# package:
# package.overrideAttrs (old: {
# buildInputs = old.buildInputs or [ ] ++ [ hello ];
# });
}