nomad: restructure to use multiple files

as per request in PR comments, used generic.nix with version files
This commit is contained in:
Maxine E. Aubrey 2020-08-12 23:58:18 +02:00
parent f0ba8274d4
commit 3fa125ba76
No known key found for this signature in database
GPG Key ID: F6FE033DFCB899F7
4 changed files with 15 additions and 18 deletions

View File

@ -0,0 +1,6 @@
{ callPackage }:
callPackage ./generic.nix {
version = "0.11.4";
sha256 = "1sykp9sji6f564s7bz0cvnr9w5x92n0l1r1djf1bl7jvv2mi1mcb";
}

View File

@ -0,0 +1,6 @@
{ callPackage }:
callPackage ./generic.nix {
version = "0.12.2";
sha256 = "1gc286ag6plk5kxw7jzr32cp3n5rwydj1z7rds1rfd0fyq7an404";
}

View File

@ -1,19 +1,4 @@
{ stdenv, buildGoPackage, fetchFromGitHub, majorVersion ? "0.11" }: { stdenv, buildGoPackage, fetchFromGitHub, version, sha256 }:
let
versionMap = {
"0.11" = {
version = "0.11.4";
sha256 = "1sykp9sji6f564s7bz0cvnr9w5x92n0l1r1djf1bl7jvv2mi1mcb";
};
"0.12" = {
version = "0.12.2";
sha256 = "1gc286ag6plk5kxw7jzr32cp3n5rwydj1z7rds1rfd0fyq7an404";
};
};
in
with versionMap.${majorVersion};
buildGoPackage rec { buildGoPackage rec {
pname = "nomad"; pname = "nomad";

View File

@ -5609,8 +5609,8 @@ in
noip = callPackage ../tools/networking/noip { }; noip = callPackage ../tools/networking/noip { };
nomad = nomad_0_11; nomad = nomad_0_11;
nomad_0_11 = callPackage ../applications/networking/cluster/nomad { majorVersion = "0.11"; }; nomad_0_11 = callPackage ../applications/networking/cluster/nomad/0.11.nix { };
nomad_0_12 = callPackage ../applications/networking/cluster/nomad { majorVersion = "0.12"; }; nomad_0_12 = callPackage ../applications/networking/cluster/nomad/0.12.nix { };
notable = callPackage ../applications/misc/notable { }; notable = callPackage ../applications/misc/notable { };