mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
52 lines
1.4 KiB
Nix
52 lines
1.4 KiB
Nix
{ stdenv, fetchFromGitHub, makeWrapper, mono, lib }:
|
|
|
|
stdenv.mkDerivation (attrs: {
|
|
pname = "Nuget";
|
|
version = "6.6.1.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mono";
|
|
repo = "linux-packaging-nuget";
|
|
rev = "upstream/${attrs.version}.bin";
|
|
sha256 = "sha256-9/dSeVshHbpYIgGE/8OzrB4towrWVB3UxDi8Esmbu7Y=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/lib/${attrs.pname}
|
|
cp -r . $out/lib/${attrs.pname}/
|
|
|
|
mkdir -p $out/bin
|
|
makeWrapper \
|
|
"${mono}/bin/mono" \
|
|
"$out/bin/nuget" \
|
|
--add-flags "$out/lib/${attrs.pname}/nuget.exe"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A package manager for the .NET platform";
|
|
mainProgram = "nuget";
|
|
homepage = "https://www.mono-project.com/";
|
|
longDescription = ''
|
|
NuGet is the package manager for the .NET platform.
|
|
This derivation bundles the Mono NuGet CLI, which is mostly used by
|
|
older projects based on .NET Framework.
|
|
|
|
Newer .NET projects can use the dotnet CLI, which has most of this
|
|
packages functionality built-in.
|
|
'';
|
|
# https://learn.microsoft.com/en-us/nuget/resources/nuget-faq#what-is-the-license-for-nuget-exe-
|
|
license = licenses.mit;
|
|
sourceProvenance = [ sourceTypes.binaryBytecode ];
|
|
maintainers = [ maintainers.mdarocha ];
|
|
inherit (mono.meta) platforms;
|
|
};
|
|
})
|