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 Jul 27, 2023
1 parent 78faafa commit 6efca77
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
45 changes: 45 additions & 0 deletions pkgs/misc/meson64-tools/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{ 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 yacc 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-$bin
done
)
'';

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

meta = with lib; {
homepage = "https://github.com/angerman/meson64-tools";
description = "Tools for Amlogic Meson ARM64 platforms";
license = licenses.mit;
maintainers = with maintainers; [ oddlama ];
};
}
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5782,6 +5782,7 @@ with pkgs;
} ../development/tools/build-managers/meson/emulator-hook.sh
else throw "mesonEmulatorHook has to be in a conditional to check if the target binaries can be executed i.e. (!stdenv.buildPlatform.canExecute stdenv.hostPlatform)";

meson64-tools = callPackage ../misc/meson64-tools { };
meson-tools = callPackage ../misc/meson-tools { };

metabase = callPackage ../servers/metabase {
Expand Down

0 comments on commit 6efca77

Please sign in to comment.