-
-
Notifications
You must be signed in to change notification settings - Fork 15k
/
Copy pathdefault.nix
58 lines (54 loc) · 1.26 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
lib,
stdenv,
callPackage,
fetchFromGitHub,
buildDotnetModule,
buildGoModule,
dotnetCorePackages,
}:
let
version = "4.0.5455";
src = fetchFromGitHub {
owner = "Azure";
repo = "azure-functions-core-tools";
rev = version;
sha256 = "sha256-Ip1m0/l0YWFosYfp8UeREg9DP5pnvRnXyAaAuch7Op4=";
};
gozip = buildGoModule {
pname = "gozip";
inherit version;
src = src + "/tools/go/gozip";
vendorHash = null;
};
in
buildDotnetModule rec {
pname = "azure-functions-core-tools";
inherit src version;
dotnet-runtime = dotnetCorePackages.sdk_6_0;
nugetDeps = ./deps.nix;
useDotnetFromEnv = true;
executables = [ "func" ];
postPatch = ''
substituteInPlace src/Azure.Functions.Cli/Common/CommandChecker.cs \
--replace "CheckExitCode(\"/bin/bash" "CheckExitCode(\"${stdenv.shell}"
'';
postInstall = ''
mkdir -p $out/bin
ln -s ${gozip}/bin/gozip $out/bin/gozip
'';
meta = with lib; {
homepage = "https://github.com/Azure/azure-functions-core-tools";
description = "Command line tools for Azure Functions";
license = licenses.mit;
maintainers = with maintainers; [
mdarocha
detegr
];
platforms = [
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
};
}