mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-12 07:30:04 +03:00
dotnetCorePackages.fetchNupkg: add override mechanism
This commit is contained in:
parent
32ccfdc278
commit
1f6cd35f5e
@ -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
pkgs/build-support/dotnet/fetch-nupkg/overrides.nix
Normal file
9
pkgs/build-support/dotnet/fetch-nupkg/overrides.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ autoPatchelfHook }:
|
||||
{
|
||||
# e.g.
|
||||
# "Package.Id" =
|
||||
# package:
|
||||
# package.overrideAttrs (old: {
|
||||
# buildInputs = old.buildInputs or [ ] ++ [ hello ];
|
||||
# });
|
||||
}
|
Loading…
Reference in New Issue
Block a user