Added firmware package

This commit is contained in:
Sebastian 2024-11-07 21:53:00 +01:00
parent 2c53327c28
commit 1f965038fc
9 changed files with 41 additions and 7 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
result

33
MMDVMFirmware/default.nix Normal file
View file

@ -0,0 +1,33 @@
{ stdenv, fetchFromGitHub, gcc-arm-embedded, ... }:
stdenv.mkDerivation {
pname = "MMDVMFirmware";
version = "yolo";
src = fetchFromGitHub {
owner = "g4klx";
repo = "MMDVM";
rev = "c3246dbcb771c0f9ead3bbe40e78fba1bfe5debc";
sha256 = "sha256-UKhdSYvOZQNgOCjEOv+Q7cLB/+PrFQl8kKVkQOKrK5M=";
fetchSubmodules = true;
};
buildInputs = [ gcc-arm-embedded ];
buildPhase = ''
cat Makefile
make f4m
'';
installPhase = ''
runHook preInstall
mkdir -p $out/firmware
cp -v bin/* $out/firmware/
runHook postInstall
'';
}

View file

@ -1,5 +1,5 @@
{ {
description = "A flake for mmdvm DL0XK patches."; description = "A flake for MMDVMHost for DB0KL.";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/24.05"; nixpkgs.url = "github:NixOS/nixpkgs/24.05";
}; };
@ -14,13 +14,14 @@
packages = { packages = {
x86_64-linux = { x86_64-linux = {
default = nixpkgs.legacyPackages.x86_64-linux.callPackage ./default.nix { }; MMDVMHost = nixpkgs.legacyPackages.x86_64-linux.callPackage ./MMDVMHost/default.nix { };
MMDVMFirmware = nixpkgs.legacyPackages.x86_64-linux.callPackage ./MMDVMFirmware/default.nix { };
}; };
}; };
nixosModules.default = { config, pkgs, ... }: { nixosModules.MMDVMHost = { config, pkgs, ... }: {
imports = [ ./module.nix ]; imports = [ ./MMDVMHost/module.nix ];
_module.args.mmdvm_host = self.packages; _module.args.mmdvm_host = self.packages.x86_64-linux.MMDVMHost;
}; };
}; };
} }

1
result
View file

@ -1 +0,0 @@
/nix/store/qq596qk2sm7jkn7kwpagq38aq4pggmph-MMDVMHost-yolo