batman-adv: refactor

This commit is contained in:
Franz Pletz 2020-01-01 20:26:23 +01:00
parent f197a51583
commit 8b3427ad87
No known key found for this signature in database
GPG Key ID: 846FDED7792617B4
4 changed files with 27 additions and 17 deletions

View File

@ -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 ];

View File

@ -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 ];

View File

@ -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;

View File

@ -0,0 +1,9 @@
{
version = "2019.4";
sha256 = {
batman-adv = "1j5day3hia5nd21kb3msjblrybfr5sjnhrx7h5bb5ll8rykgdhvh";
alfred = "1shqdashi9y87z2brmb67qk91aqsvvwyphas6da4c04mclwmnlmm";
batctl = "11bndsjq8xrqrdgsr2a670vwihkljjrg58ngq0nkadbkfawlwmm3";
};
}