pkgs/bmxd: fix build

This commit is contained in:
Astro 2021-01-06 18:24:57 +01:00
parent 02095467fb
commit 488eb40d42
1 changed files with 9 additions and 3 deletions

View File

@ -4,16 +4,22 @@
with pkgs;
let
path = "${src}/feeds/19.07/feeds-own/bmxd";
makefile = builtins.readFile "${path}/Makefile";
path = "feeds/19.07/feeds-own/bmxd";
makefile = builtins.readFile "${src}/${path}/Makefile";
makeDef = name:
builtins.elemAt (builtins.match ".*?${name}:=([^\n]+).*?" makefile) 0;
name = makeDef "PKG_NAME";
version = makeDef "PKG_VERSION";
release = makeDef "PKG_RELEASE";
patch = fetchurl {
url = "https://gitlab.freifunk-dresden.de/firmware-developer/firmware/merge_requests/36.patch";
sha256 = "10gm1fqg2s8c261i0j1py3sfyyzr0h5b6wwdsgg3icn7lfjd6k75";
};
in stdenv.mkDerivation {
name = "${name}-${version}-${release}";
src = "${path}/sources";
inherit src;
patches = [ patch ];
buildPhase = "cd ${path}/sources";
installPhase = ''
make install SBINDIR=$out/sbin
'';