diff --git a/aja-ntv2/default.nix b/aja-ntv2/default.nix index 1df23a8..76c3ed2 100644 --- a/aja-ntv2/default.nix +++ b/aja-ntv2/default.nix @@ -2,13 +2,13 @@ stdenv, callPackage, lib, - pkgs, + cmake, buildApps ? true, }: stdenv.mkDerivation { name = "ajantv2-dev"; src = callPackage ./src.nix {}; - nativeBuildInputs = [pkgs.cmake]; + nativeBuildInputs = [ cmake ]; cmakeFlags = [ diff --git a/aja-ntv2/src.nix b/aja-ntv2/src.nix index 41abe02..be8a7de 100644 --- a/aja-ntv2/src.nix +++ b/aja-ntv2/src.nix @@ -1,4 +1,6 @@ -{ pkgs }: pkgs.fetchFromGitHub { +{ fetchFromGitHub }: + +fetchFromGitHub { owner = "aja-video"; repo = "ntv2"; rev = "refs/heads/main"; diff --git a/flake.lock b/flake.lock index 88e88e5..8a5b4ad 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,22 @@ { "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "id": "flake-utils", + "type": "indirect" + } + }, "nixpkgs": { "locked": { "lastModified": 1694499547, @@ -15,8 +32,8 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "utils": "utils" + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" } }, "systems": { @@ -33,24 +50,6 @@ "repo": "default", "type": "github" } - }, - "utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 080e53d..cc9dd51 100644 --- a/flake.nix +++ b/flake.nix @@ -1,13 +1,12 @@ { description = "AJA video card software"; - inputs.utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, - utils, + flake-utils, }: ( - utils.lib.eachSystem ["x86_64-linux"] (system: let + flake-utils.lib.eachSystem ["x86_64-linux"] (system: let pkgs = import nixpkgs { inherit system; }; @@ -18,10 +17,10 @@ formatter = pkgs.alejandra; }) ) // { - overlays.default = (final: prev: { + overlays.default = final: prev: { ajantv-utils = final.callPackage ./aja-ntv2/default.nix {}; ajantv-driver = final.linuxPackages.callPackage ./aja-ntv2/driver.nix {}; aja-ntv2-gst = self.packages.${prev.system}.aja-ntv2-gst; - }); + }; }; } diff --git a/ntv2-gst.nix b/ntv2-gst.nix index c3239d3..8e76543 100644 --- a/ntv2-gst.nix +++ b/ntv2-gst.nix @@ -1,7 +1,11 @@ { stdenv, - pkgs, fetchFromGitHub, + autoconf, + automake, + pkgconfig, + libtool, + gst_all_1, ajantv2, }: stdenv.mkDerivation { @@ -15,7 +19,7 @@ stdenv.mkDerivation { sourceRoot = "source/gst-plugin"; patches = [./no.patch]; - nativeBuildInputs = with pkgs; [autoconf automake pkgconfig libtool gst_all_1.gst-plugins-base ajantv2]; + nativeBuildInputs = [autoconf automake pkgconfig libtool gst_all_1.gst-plugins-base ajantv2]; GST_NTV2 = "${ajantv2}/include"; preConfigure = '' ./autogen.sh