todds: fix cuda build, cleanup
This commit is contained in:
@@ -1,16 +1,30 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
|
||||
# nativeBuildInputs
|
||||
cmake,
|
||||
ispc,
|
||||
ninja,
|
||||
pkg-config,
|
||||
ispc,
|
||||
cudaPackages,
|
||||
|
||||
# buildInputs
|
||||
boost,
|
||||
fmt,
|
||||
hyperscan,
|
||||
opencv,
|
||||
onetbb,
|
||||
fetchFromGitHub,
|
||||
opencv,
|
||||
|
||||
# tests
|
||||
versionCheckHook,
|
||||
|
||||
# passthru
|
||||
nix-update-script,
|
||||
|
||||
cudaSupport ? config.cudaSupport,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "todds";
|
||||
@@ -22,30 +36,44 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "todds-encoder";
|
||||
repo = "todds";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-nyYFYym9ZZskkaTPV30+QavdqpvVopnIXXZC6zkeu7c=";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-nyYFYym9ZZskkaTPV30+QavdqpvVopnIXXZC6zkeu7c=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ispc
|
||||
ninja
|
||||
pkg-config
|
||||
ispc
|
||||
]
|
||||
++ lib.optionals cudaSupport [
|
||||
(lib.getBin cudaPackages.cuda_nvcc)
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
fmt
|
||||
hyperscan
|
||||
opencv
|
||||
onetbb
|
||||
opencv
|
||||
]
|
||||
++ lib.optionals cudaSupport [
|
||||
cudaPackages.cuda_cudart
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "CPU-based DDS encoder optimized for fast batch conversions with high encoding quality";
|
||||
homepage = "https://github.com/todds-encoder/todds";
|
||||
changelog = "https://github.com/todds-encoder/todds/releases/tag/${finalAttrs.version}";
|
||||
license = lib.licenses.mpl20;
|
||||
maintainers = with lib.maintainers; [ weirdrock ];
|
||||
mainProgram = "todds";
|
||||
|
||||
Reference in New Issue
Block a user