diff --git a/pkgs/os-specific/linux/batman-adv/alfred.nix b/pkgs/os-specific/linux/batman-adv/alfred.nix index eccb3e716603..fa2be46688cb 100644 --- a/pkgs/os-specific/linux/batman-adv/alfred.nix +++ b/pkgs/os-specific/linux/batman-adv/alfred.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, pkgconfig, gpsd, libcap, libnl }: -let - ver = "2019.5"; -in +let cfg = import ./version.nix; in + stdenv.mkDerivation rec { - name = "alfred-${ver}"; + pname = "alfred"; + inherit (cfg) version; src = fetchurl { - url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${ver}/${name}.tar.gz"; - sha256 = "09npizg89ks1wm19l5xz0pq1ljpsbwy030xnprqnd0p53976wywa"; + url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${version}/${pname}-${version}.tar.gz"; + sha256 = cfg.sha256.${pname}; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/os-specific/linux/batman-adv/batctl.nix b/pkgs/os-specific/linux/batman-adv/batctl.nix index 537010dea53d..57bafb398d1e 100644 --- a/pkgs/os-specific/linux/batman-adv/batctl.nix +++ b/pkgs/os-specific/linux/batman-adv/batctl.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, pkgconfig, libnl }: -let - ver = "2019.3"; -in +let cfg = import ./version.nix; in + stdenv.mkDerivation rec { - name = "batctl-${ver}"; + pname = "batctl"; + inherit (cfg) version; src = fetchurl { - url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${ver}/${name}.tar.gz"; - sha256 = "0307a01n72kg7vcm60mi8jna6bydiin2cr3ylrixra1596hkzn9b"; + url = "https://downloads.open-mesh.org/batman/releases/batman-adv-${version}/${pname}-${version}.tar.gz"; + sha256 = cfg.sha256.${pname}; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/os-specific/linux/batman-adv/default.nix b/pkgs/os-specific/linux/batman-adv/default.nix index 456872cdbd48..796be1e5d484 100644 --- a/pkgs/os-specific/linux/batman-adv/default.nix +++ b/pkgs/os-specific/linux/batman-adv/default.nix @@ -1,13 +1,14 @@ { stdenv, fetchurl, kernel }: -let base = "batman-adv-2019.2"; in +let cfg = import ./version.nix; in -stdenv.mkDerivation { - name = "${base}-${kernel.version}"; +stdenv.mkDerivation rec { + pname = "batman-adv"; + version = "${cfg.version}-${kernel.version}"; src = fetchurl { - url = "http://downloads.open-mesh.org/batman/releases/${base}/${base}.tar.gz"; - sha256 = "1j5day3hia5nd21kb3msjblrybfr5sjnhrx7h5bb5ll8rykgdhvh"; + url = "http://downloads.open-mesh.org/batman/releases/${pname}-${cfg.version}/${pname}-${cfg.version}.tar.gz"; + sha256 = cfg.sha256.${pname}; }; nativeBuildInputs = kernel.moduleBuildDependencies; diff --git a/pkgs/os-specific/linux/batman-adv/version.nix b/pkgs/os-specific/linux/batman-adv/version.nix new file mode 100644 index 000000000000..287106fa8d2f --- /dev/null +++ b/pkgs/os-specific/linux/batman-adv/version.nix @@ -0,0 +1,9 @@ +{ + version = "2019.4"; + + sha256 = { + batman-adv = "1j5day3hia5nd21kb3msjblrybfr5sjnhrx7h5bb5ll8rykgdhvh"; + alfred = "1shqdashi9y87z2brmb67qk91aqsvvwyphas6da4c04mclwmnlmm"; + batctl = "11bndsjq8xrqrdgsr2a670vwihkljjrg58ngq0nkadbkfawlwmm3"; + }; +}