Added firmware package
This commit is contained in:
parent
2c53327c28
commit
1f965038fc
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
result
|
33
MMDVMFirmware/default.nix
Normal file
33
MMDVMFirmware/default.nix
Normal 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
|
||||
'';
|
||||
|
||||
|
||||
|
||||
}
|
11
flake.nix
11
flake.nix
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "A flake for mmdvm DL0XK patches.";
|
||||
description = "A flake for MMDVMHost for DB0KL.";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/24.05";
|
||||
};
|
||||
|
@ -14,13 +14,14 @@
|
|||
|
||||
packages = {
|
||||
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, ... }: {
|
||||
imports = [ ./module.nix ];
|
||||
_module.args.mmdvm_host = self.packages;
|
||||
nixosModules.MMDVMHost = { config, pkgs, ... }: {
|
||||
imports = [ ./MMDVMHost/module.nix ];
|
||||
_module.args.mmdvm_host = self.packages.x86_64-linux.MMDVMHost;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue