From ecd4a41e6906528794f4119a4763d0f0a7c0d927 Mon Sep 17 00:00:00 2001 From: myclevorname <140354451+myclevorname@users.noreply.github.com> Date: Tue, 6 Aug 2024 17:11:33 -0400 Subject: [PATCH] spasm-ng: Add ASM header files The header files are wrapped so you don't have to add the include file path in spasm-ng. --- pkgs/development/compilers/spasm-ng/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/spasm-ng/default.nix b/pkgs/development/compilers/spasm-ng/default.nix index 574c4927e876..fac19ce6cd32 100644 --- a/pkgs/development/compilers/spasm-ng/default.nix +++ b/pkgs/development/compilers/spasm-ng/default.nix @@ -1,9 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, gcc, gmp, openssl, zlib }: +{ lib, stdenv, fetchFromGitHub, makeWrapper, gmp, gcc, openssl, zlib }: stdenv.mkDerivation rec { pname = "spasm-ng"; - version = "unstable-2020-08-03"; + version = "unstable-2022-07-05"; src = fetchFromGitHub { owner = "alberthdev"; @@ -12,14 +12,23 @@ stdenv.mkDerivation rec { sha256 = "sha256-j7Z3oI+J0wZF4EG5OMMjuDe2o69KKGuJvfyHNPTLrXM="; }; - nativeBuildInputs = [ gcc ]; - + # GCC is needed for Darwin + nativeBuildInputs = [ makeWrapper gcc ]; buildInputs = [ gmp openssl zlib ]; enableParallelBuilding = true; installPhase = '' + runHook preInstall + install -Dm755 spasm -t $out/bin + install -Dm555 inc/*.inc -t $out/include + + runHook postInstall + ''; + + postFixup = '' + wrapProgram $out/bin/spasm --add-flags "-I $out/include" ''; meta = with lib; {