fan2go: 0.10.0 -> 0.11.1 (#461568)
This commit is contained in:
@@ -1,18 +0,0 @@
|
|||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index c92df71..724911a 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -10,11 +10,12 @@ DATE ?= $(shell date -u -d @${SOURCE_DATE_EPOCH} +"%Y-%m-%dT%H:%M:%SZ")
|
|
||||||
VERSION ?= 0.10.0
|
|
||||||
|
|
||||||
test: ## Run all tests
|
|
||||||
- @go clean --testcache && go test -v ./...
|
|
||||||
+ @go clean --testcache && go test -ldflags -extldflags=-Wl,-z,lazy -v ./...
|
|
||||||
|
|
||||||
build: ## Builds the CLI
|
|
||||||
@go build ${GO_FLAGS} \
|
|
||||||
-ldflags "-w -s \
|
|
||||||
+ -extldflags=-Wl,-z,lazy \
|
|
||||||
-X ${NAME}/cmd/global.Version=${VERSION} \
|
|
||||||
-X ${PACKAGE}/cmd/global.Version=${VERSION} \
|
|
||||||
-X ${NAME}/cmd/global.Commit=${GIT_REV} \
|
|
||||||
@@ -1,19 +1,22 @@
|
|||||||
{
|
{
|
||||||
|
config,
|
||||||
buildGoModule,
|
buildGoModule,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
lib,
|
lib,
|
||||||
lm_sensors,
|
lm_sensors,
|
||||||
|
autoAddDriverRunpath,
|
||||||
|
enableNVML ? config.cudaSupport,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "fan2go";
|
pname = "fan2go";
|
||||||
version = "0.10.0";
|
version = "0.11.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "markusressel";
|
owner = "markusressel";
|
||||||
repo = "fan2go";
|
repo = "fan2go";
|
||||||
tag = version;
|
tag = version;
|
||||||
hash = "sha256-mLypuOGjYrXFf3BGCDggEDk1+PVx2CgsxAjZQ7uiSW0=";
|
hash = "sha256-CHBJhG10RD5rQW1SFk7ffV9M4t6LtJR6xQrw47KQzC0=";
|
||||||
leaveDotGit = true;
|
leaveDotGit = true;
|
||||||
postFetch = ''
|
postFetch = ''
|
||||||
cd $out
|
cd $out
|
||||||
@@ -22,12 +25,14 @@ buildGoModule rec {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = "sha256-IJJTolpOtstVov8MNel6EOJqv1oCkTOTiPyW42ElQjc=";
|
vendorHash = "sha256-BSZwvD9psXtSmoUPBxMVuvbcpqDSpFEKVskJo05e4fo=";
|
||||||
|
|
||||||
|
nativeBuildInputs = lib.optionals enableNVML [
|
||||||
|
autoAddDriverRunpath
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [ lm_sensors ];
|
buildInputs = [ lm_sensors ];
|
||||||
|
|
||||||
patches = [ ./lazy-binding.patch ];
|
|
||||||
|
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
substituteInPlace vendor/github.com/md14454/gosensors/gosensors.go \
|
substituteInPlace vendor/github.com/md14454/gosensors/gosensors.go \
|
||||||
--replace-fail '"/etc/sensors3.conf"' '"${lib.getLib lm_sensors}/etc/sensors3.conf"'
|
--replace-fail '"/etc/sensors3.conf"' '"${lib.getLib lm_sensors}/etc/sensors3.conf"'
|
||||||
@@ -41,7 +46,7 @@ buildGoModule rec {
|
|||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
make build GIT_REV="$(cat GIT_REV)"
|
make build${lib.optionalString (!enableNVML) "-no-nvml"} GIT_REV="$(cat GIT_REV)"
|
||||||
|
|
||||||
dir="$GOPATH/bin"
|
dir="$GOPATH/bin"
|
||||||
mkdir -p "$dir"
|
mkdir -p "$dir"
|
||||||
@@ -50,6 +55,10 @@ buildGoModule rec {
|
|||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postFixup = lib.optionalString enableNVML ''
|
||||||
|
patchelf --add-needed libnvidia-ml.so "$out/bin/fan2go"
|
||||||
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
make test
|
make test
|
||||||
|
|||||||
Reference in New Issue
Block a user