diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2020-01-01 20:26:23 +0100 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2020-01-01 20:29:35 +0100 |
commit | 8b3427ad87c7c3da974dfc9f43fbfcd5c6c19374 (patch) | |
tree | e5be5a12e8d53e37d0b1e8184b216b21853da56a /pkgs/os-specific/linux/batman-adv | |
parent | f197a51583ecb5f021fa60b86cc120bdae2769d7 (diff) |
batman-adv: refactor
Diffstat (limited to 'pkgs/os-specific/linux/batman-adv')
-rw-r--r-- | pkgs/os-specific/linux/batman-adv/alfred.nix | 12 | ||||
-rw-r--r-- | pkgs/os-specific/linux/batman-adv/batctl.nix | 12 | ||||
-rw-r--r-- | pkgs/os-specific/linux/batman-adv/default.nix | 11 | ||||
-rw-r--r-- | pkgs/os-specific/linux/batman-adv/version.nix | 9 |
4 files changed, 27 insertions, 17 deletions
diff --git a/pkgs/os-specific/linux/batman-adv/alfred.nix b/pkgs/os-specific/linux/batman-adv/alfred.nix index eccb3e716603e..fa2be46688cb3 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 537010dea53d0..57bafb398d1eb 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 456872cdbd489..796be1e5d484a 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 0000000000000..287106fa8d2fd --- /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"; + }; +} |