mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-10 01:26:59 +00:00
Merge pull request #132842 from qowoz/hashiflags
nomad, vault: buildFlagsArray -> tags
This commit is contained in:
commit
54d33add5f
@ -6,6 +6,7 @@
|
|||||||
, nvidiaGpuSupport
|
, nvidiaGpuSupport
|
||||||
, patchelf
|
, patchelf
|
||||||
, nvidia_x11
|
, nvidia_x11
|
||||||
|
, nixosTests
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
@ -29,16 +30,7 @@ buildGoPackage rec {
|
|||||||
# ui:
|
# ui:
|
||||||
# Nomad release commits include the compiled version of the UI, but the file
|
# Nomad release commits include the compiled version of the UI, but the file
|
||||||
# is only included if we build with the ui tag.
|
# is only included if we build with the ui tag.
|
||||||
preBuild =
|
tags = [ "ui" ] ++ lib.optional (!nvidiaGpuSupport) "nonvidia";
|
||||||
let
|
|
||||||
tags = [ "ui" ] ++ lib.optional (!nvidiaGpuSupport) "nonvidia";
|
|
||||||
tagsString = lib.concatStringsSep " " tags;
|
|
||||||
in
|
|
||||||
''
|
|
||||||
export buildFlagsArray=(
|
|
||||||
-tags="${tagsString}"
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
|
|
||||||
# The dependency on NVML isn't explicit. We have to make it so otherwise the
|
# The dependency on NVML isn't explicit. We have to make it so otherwise the
|
||||||
# binary will not know where to look for the relevant symbols.
|
# binary will not know where to look for the relevant symbols.
|
||||||
@ -48,6 +40,8 @@ buildGoPackage rec {
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.tests.nomad = nixosTests.nomad;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.nomadproject.io/";
|
homepage = "https://www.nomadproject.io/";
|
||||||
description = "A Distributed, Highly Available, Datacenter-Aware Scheduler";
|
description = "A Distributed, Highly Available, Datacenter-Aware Scheduler";
|
||||||
|
@ -21,7 +21,7 @@ buildGoModule rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
||||||
|
|
||||||
buildFlagsArray = [ "-tags=vault" ];
|
tags = [ "vault" ];
|
||||||
|
|
||||||
ldflags = [
|
ldflags = [
|
||||||
"-s" "-w"
|
"-s" "-w"
|
||||||
|
Loading…
Reference in New Issue
Block a user