Move ntv2 src to a flake input
This commit is contained in:
parent
2cbc0594f6
commit
9e1beef1c8
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
stdenv,
|
||||
callPackage,
|
||||
lib,
|
||||
cmake,
|
||||
aja-src,
|
||||
buildApps ? true,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "ajantv2-dev";
|
||||
src = callPackage ./src.nix {};
|
||||
src = aja-src;
|
||||
nativeBuildInputs = [cmake];
|
||||
|
||||
cmakeFlags =
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
callPackage,
|
||||
stdenv,
|
||||
nukeReferences,
|
||||
kernel,
|
||||
aja-src,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "ajantv2-driver-${kernel.version}";
|
||||
src = callPackage ./src.nix {};
|
||||
src = aja-src;
|
||||
patches = [./lol.patch ./newkernels.patch];
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
buildInputs = [nukeReferences];
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{ fetchFromGitHub }:
|
||||
|
||||
fetchFromGitHub {
|
||||
owner = "aja-video";
|
||||
repo = "ntv2";
|
||||
rev = "refs/heads/main";
|
||||
hash = "sha256-rXjKDhQcZwAxsMjCoL21gpWeLWyIXyK/1y+78mhKgeo=";
|
||||
}
|
17
flake.lock
17
flake.lock
|
@ -1,5 +1,21 @@
|
|||
{
|
||||
"nodes": {
|
||||
"aja-ntv2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1662565853,
|
||||
"narHash": "sha256-rXjKDhQcZwAxsMjCoL21gpWeLWyIXyK/1y+78mhKgeo=",
|
||||
"owner": "aja-video",
|
||||
"repo": "ntv2",
|
||||
"rev": "3a1e91f740e36e43a1ec74ff446a097330e87220",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "aja-video",
|
||||
"repo": "ntv2",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
|
@ -32,6 +48,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"aja-ntv2": "aja-ntv2",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
|
|
26
flake.nix
26
flake.nix
|
@ -1,25 +1,41 @@
|
|||
{
|
||||
description = "AJA video card software";
|
||||
inputs.aja-ntv2 = {
|
||||
url = "github:aja-video/ntv2";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}: (
|
||||
aja-ntv2,
|
||||
}:
|
||||
(
|
||||
flake-utils.lib.eachSystem ["x86_64-linux"] (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
in {
|
||||
packages.aja-ntv2-gst = pkgs.callPackage ./ntv2-gst.nix {
|
||||
ajantv2 = pkgs.callPackage ./aja-ntv2/default.nix { buildApps = false; };
|
||||
ajantv2 = pkgs.callPackage ./aja-ntv2/default.nix {
|
||||
aja-src = aja-ntv2;
|
||||
buildApps = false;
|
||||
};
|
||||
};
|
||||
})
|
||||
)
|
||||
// flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
in {
|
||||
formatter = pkgs.alejandra;
|
||||
})
|
||||
) // {
|
||||
// {
|
||||
overlays.default = final: prev: {
|
||||
ajantv-utils = final.callPackage ./aja-ntv2/default.nix {};
|
||||
ajantv-driver = final.linuxPackages.callPackage ./aja-ntv2/driver.nix {};
|
||||
ajantv-utils = final.callPackage ./aja-ntv2/default.nix {aja-src = aja-ntv2;};
|
||||
ajantv-driver = final.linuxPackages.callPackage ./aja-ntv2/driver.nix {aja-src = aja-ntv2;};
|
||||
aja-ntv2-gst = self.packages.${prev.system}.aja-ntv2-gst;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue