diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
commit | 99fcaeccb89621dd492203ce1f2d551c06f228ed (patch) | |
tree | 41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix | |
parent | 59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff) | |
parent | 75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff) | |
download | nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2 nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/config/console.nix nixpkgs/nixos/modules/services/mail/mailman.nix nixpkgs/nixos/modules/services/mail/public-inbox.nix nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/nixos/modules/services/networking/ssh/sshd.nix nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix nixpkgs/pkgs/applications/networking/irc/weechat/default.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/interpreters/python/default.nix nixpkgs/pkgs/development/node-packages/overrides.nix nixpkgs/pkgs/development/tools/b4/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix nixpkgs/pkgs/servers/mail/public-inbox/default.nix nixpkgs/pkgs/tools/security/pinentry/default.nix nixpkgs/pkgs/tools/text/unoconv/default.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix b/nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix new file mode 100644 index 000000000000..998f7f6069a0 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix @@ -0,0 +1,78 @@ +{ lib +, buildGoModule +, buildGo120Module +, fetchFromGitHub +, nixosTests +, installShellFiles +}: + +let + generic = + { buildGoModule, version, sha256, vendorSha256, ... }@attrs: + let attrs' = builtins.removeAttrs attrs [ "buildGoModule" "version" "sha256" "vendorSha256" ]; + in + buildGoModule (rec { + pname = "nomad"; + inherit version vendorSha256; + + subPackages = [ "." ]; + + src = fetchFromGitHub { + owner = "hashicorp"; + repo = pname; + rev = "v${version}"; + inherit sha256; + }; + + nativeBuildInputs = [ installShellFiles ]; + + # ui: + # Nomad release commits include the compiled version of the UI, but the file + # is only included if we build with the ui tag. + tags = [ "ui" ]; + + postInstall = '' + echo "complete -C $out/bin/nomad nomad" > nomad.bash + installShellCompletion nomad.bash + ''; + + meta = with lib; { + homepage = "https://www.nomadproject.io/"; + description = "A Distributed, Highly Available, Datacenter-Aware Scheduler"; + platforms = platforms.unix; + license = licenses.mpl20; + maintainers = with maintainers; [ rushmorem pradeepchhetri endocrimes maxeaubrey techknowlogick ]; + }; + } // attrs'); +in +rec { + # Nomad never updates major go versions within a release series and is unsupported + # on Go versions that it did not ship with. Due to historic bugs when compiled + # with different versions we pin Go for all versions. + # Upstream partially documents used Go versions here + # https://github.com/hashicorp/nomad/blob/master/contributing/golang.md + + nomad = nomad_1_4; + + nomad_1_2 = generic { + buildGoModule = buildGo120Module; + version = "1.2.16"; + sha256 = "sha256-fhfUpcG91EgIzJ4mCS7geyIJyTSHS2e8t4yYiI3PqpQ="; + vendorSha256 = "sha256-kwCDsGFw+25Mimgt/cTK/Z2H7Qh5n4rjr3kIBvjcPL8="; + }; + + nomad_1_3 = generic { + buildGoModule = buildGo120Module; + version = "1.3.9"; + sha256 = "sha256-xfoIzLDG/OfqAPQqeLvQZ11uESWFNyOyLP6Imi+S96w="; + vendorSha256 = "sha256-kW0goicoM1lM1NEHPTfozg2EKR1daf33UxT/mVabyfY="; + }; + + nomad_1_4 = generic { + buildGoModule = buildGo120Module; + version = "1.4.6"; + sha256 = "sha256-l4GvQIS5JSSgjBjPivAKAb7gKlVLw4WoZpPR8LxnLNc="; + vendorSha256 = "sha256-05BhKF6kx0wbu74cidpTFhUN668R/AxV6qWmchCm/WE="; + passthru.tests.nomad = nixosTests.nomad; + }; +} |