nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5}:
6
7stdenv.mkDerivation rec {
8 pname = "sjasmplus";
9 version = "1.18.3";
10
11 src = fetchFromGitHub {
12 owner = "z00m128";
13 repo = "sjasmplus";
14 rev = "v${version}";
15 sha256 = "sha256-+FvNYfJ5I91RfuJTiOPhj5KW8HoOq8OgnnpFEgefSGc=";
16 };
17
18 buildFlags = [
19 "CC=${stdenv.cc.targetPrefix}cc"
20 "CXX=${stdenv.cc.targetPrefix}c++"
21 ];
22
23 installPhase = ''
24 runHook preInstall
25 install -D sjasmplus $out/bin/sjasmplus
26 runHook postInstall
27 '';
28
29 meta = with lib; {
30 homepage = "https://z00m128.github.io/sjasmplus/";
31 description = "Z80 assembly language cross compiler. It is based on the SjASM source code by Sjoerd Mastijn";
32 mainProgram = "sjasmplus";
33 license = licenses.bsd3;
34 platforms = platforms.all;
35 maintainers = with maintainers; [ electrified ];
36 };
37}