Renaming and refactoring
* Define packages in terms of overlay * rename everything
This commit is contained in:
parent
d44045b415
commit
c8e82b3b4b
|
@ -6,7 +6,7 @@
|
|||
buildApps ? true,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "ajantv2-dev";
|
||||
name = "ntv2";
|
||||
src = ntv2-src;
|
||||
nativeBuildInputs = [cmake];
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
ntv2-src,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "ajantv2-driver-${kernel.version}";
|
||||
name = "ntv2-driver-${kernel.version}";
|
||||
src = ntv2-src;
|
||||
patches = [./lol.patch ./newkernels.patch];
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
|
46
flake.nix
46
flake.nix
|
@ -21,33 +21,23 @@
|
|||
ntv2-src,
|
||||
ntv2-gst-src,
|
||||
}:
|
||||
(
|
||||
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 {
|
||||
inherit ntv2-src;
|
||||
buildApps = false;
|
||||
};
|
||||
inherit ntv2-gst-src;
|
||||
};
|
||||
})
|
||||
)
|
||||
// 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 { inherit ntv2-src; };
|
||||
ajantv-driver = final.linuxPackages.callPackage ./aja-ntv2/driver.nix { inherit ntv2-src; };
|
||||
aja-ntv2-gst = self.packages.${prev.system}.aja-ntv2-gst;
|
||||
};
|
||||
{
|
||||
overlays.default = final: prev: {
|
||||
ntv2 = final.callPackage ./aja-ntv2 { inherit ntv2-src; };
|
||||
ntv2-gst = final.callPackage ./ntv2-gst.nix { inherit ntv2-gst-src; };
|
||||
linuxPackages = prev.linuxPackages.extend
|
||||
(linuxFinal: linuxPrev: {
|
||||
ntv2-driver = linuxFinal.callPackage ./aja-ntv2/driver.nix { inherit ntv2-src; };
|
||||
});
|
||||
};
|
||||
} // flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; };
|
||||
in {
|
||||
packages = {
|
||||
inherit (pkgs) ntv2 ntv2-gst;
|
||||
inherit (pkgs.linuxPackages) ntv2-driver;
|
||||
};
|
||||
formatter = pkgs.alejandra;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
pkgconfig,
|
||||
libtool,
|
||||
gst_all_1,
|
||||
ajantv2,
|
||||
ntv2,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "aja-ntv2-gst";
|
||||
name = "ntv2-gst";
|
||||
src = ntv2-gst-src;
|
||||
sourceRoot = "source/gst-plugin";
|
||||
patches = [./no.patch];
|
||||
|
||||
nativeBuildInputs = [autoconf automake pkgconfig libtool gst_all_1.gst-plugins-base ajantv2];
|
||||
GST_NTV2 = "${ajantv2}/include";
|
||||
nativeBuildInputs = [autoconf automake pkgconfig libtool gst_all_1.gst-plugins-base ntv2];
|
||||
GST_NTV2 = "${ntv2}/include";
|
||||
preConfigure = ''
|
||||
./autogen.sh
|
||||
'';
|
||||
|
|
|
@ -14,13 +14,13 @@ gstreamer plugin. This allows you to use Aja video IO cards on NixOS.
|
|||
- Add the kernel driver:
|
||||
```nix
|
||||
# Include the kernel module
|
||||
boot.extraModulePackages = [pkgs.ajantv-driver];
|
||||
boot.extraModulePackages = [pkgs.linuxPackages.ntv2-driver];
|
||||
# And load it automatically
|
||||
boot.kernelModules = [ "ajantv2" ];
|
||||
```
|
||||
- Include the utils/demos and gstreamer plugin:
|
||||
```nix
|
||||
environment.systemPackages = [pkgs.ajantv-utils pkgs.aja-ntv2-gst]
|
||||
environment.systemPackages = [pkgs.ntv2 pkgs.ntv2-gst]
|
||||
```
|
||||
|
||||
## Gstreamer
|
||||
|
|
Loading…
Reference in New Issue