dhtbsign: init at 0-unstable-2022-11-10

Signed-off-by: David Wronek <david.wronek@mainlining.org>
This commit is contained in:
David Wronek
2026-03-20 14:36:49 +01:00
parent c77d10fd73
commit 8d223ecdc6
+42
View File
@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "dhtbsign";
version = "0-unstable-2022-11-10";
src = fetchFromGitHub {
owner = "osm0sis";
repo = "dhtbsign";
rev = "2b2711dff153485c549240423d9c908a2912f4b2";
hash = "sha256-51zmuQ817Mqx8Hwnx/t4fC9G5huiLGIv+99nRP16mSg=";
};
strictDeps = true;
env.NIX_CFLAGS_COMPILE = toString (
lib.optional stdenv.cc.isGNU [
# Required with newer GCC
"-Wno-error=stringop-overflow"
]
);
# Unstream has an install target, but installs dhtbsign as `$out/bin`
# instead of `$out/bin/dhtbsign`
installPhase = ''
runHook preInstall
install -Dm555 dhtbsign -t $out/bin
runHook postInstall
'';
meta = {
homepage = "https://github.com/osm0sis/dhtbsign";
description = "Tool to write the DHTB header for Samsung Spreadtrum devices";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ ungeskriptet ];
teams = [ lib.teams.android ];
mainProgram = "dhtbsign";
};
}