pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / development / compilers / spasm-ng / default.nix
blobfac19ce6cd32988c6adffd85d5cc201cc23a9e51
1 { lib, stdenv, fetchFromGitHub, makeWrapper, gmp, gcc, openssl, zlib }:
3 stdenv.mkDerivation rec {
4   pname = "spasm-ng";
6   version = "unstable-2022-07-05";
8   src = fetchFromGitHub {
9     owner = "alberthdev";
10     repo = "spasm-ng";
11     rev = "5f0786d38f064835be674d4b7df42969967bb73c";
12     sha256 = "sha256-j7Z3oI+J0wZF4EG5OMMjuDe2o69KKGuJvfyHNPTLrXM=";
13   };
15   # GCC is needed for Darwin
16   nativeBuildInputs = [ makeWrapper gcc ];
17   buildInputs = [ gmp openssl zlib ];
19   enableParallelBuilding = true;
21   installPhase = ''
22     runHook preInstall
24     install -Dm755 spasm -t $out/bin
25     install -Dm555 inc/*.inc -t $out/include
27     runHook postInstall
28   '';
30   postFixup = ''
31     wrapProgram $out/bin/spasm --add-flags "-I $out/include"
32   '';
34   meta = with lib; {
35     homepage    = "https://github.com/alberthdev/spasm-ng";
36     description = "Z80 assembler with extra features to support development for TI calculators";
37     mainProgram = "spasm";
38     license     = licenses.gpl2Plus;
39     maintainers = with maintainers; [ siraben ];
40     platforms   = platforms.unix;
41   };