Skip to content

Commit

Permalink
meson64-tools: init at b09cefd1
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlama committed Nov 21, 2024
1 parent b434609 commit 81bb0a4
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions pkgs/by-name/me/meson64-tools/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
buildPackages,
}:

stdenv.mkDerivation rec {
pname = "meson64-tools";
version = "unstable-2023-07-25";

src = fetchFromGitHub {
owner = "angerman";
repo = pname;
rev = "b09cefd1e001dbba14036857bf6e167bf1833f26";
hash = "sha256-/koIsslDNpaFHf1TV/0Xt0TiyhjL6tCz2oHQraYNhPA=";
};

nativeBuildInputs = with buildPackages; [
openssl
bison
flex
bc
python3
];

preBuild = ''
patchShebangs --build .
patchShebangs --build ./mbedtls/scripts/generate_psa_constants.py
substituteInPlace mbedtls/programs/fuzz/Makefile --replace "python2" "python"
substituteInPlace mbedtls/tests/Makefile --replace "python2" "python"
'';

# Also prefix tool names since some names are really generic (e.g. `pkg`).
# Otherwise something could shadow those generic names in other builds.
postInstall = ''
(cd $out/bin
for bin in *; do
ln -s $bin meson64-g12-$bin
done
)
'';

makeFlags = [ "PREFIX=$(out)/bin" ];

meta = with lib; {
homepage = "https://github.com/angerman/meson64-tools";
description = "Tools for Amlogic G12 platforms";
license = licenses.mit;
maintainers = with maintainers; [ oddlama ];
};
}

0 comments on commit 81bb0a4

Please sign in to comment.