Merge pull request #1 from streams-r-us/misc-nix-cleanup-20231013

Various minor nix refactoring
This commit is contained in:
Sam W 2023-10-13 20:39:40 +01:00 committed by GitHub
commit 2cbc0594f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 30 deletions

View File

@ -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 =
[

View File

@ -1,4 +1,6 @@
{ pkgs }: pkgs.fetchFromGitHub {
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "aja-video";
repo = "ntv2";
rev = "refs/heads/main";

View File

@ -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",

View File

@ -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;
});
};
};
}

View File

@ -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