nixpkgs/pkgs/development/tools/knightos/scas/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.0 KiB
Nix
Raw Normal View History

{ fetchFromGitHub, lib, stdenv, cmake, buildPackages, asciidoc, libxslt }:
let
isCrossCompiling = stdenv.hostPlatform != stdenv.buildPlatform;
in
2020-07-29 10:08:51 +00:00
stdenv.mkDerivation rec {
pname = "scas";
2021-05-02 08:23:05 +00:00
version = "0.5.5";
2020-09-03 14:21:47 +00:00
2020-07-29 10:08:51 +00:00
src = fetchFromGitHub {
owner = "KnightOS";
repo = "scas";
rev = version;
2021-05-02 08:23:05 +00:00
sha256 = "sha256-JGQE+orVDKKJsTt8sIjPX+3yhpZkujISroQ6g19+MzU=";
2020-07-29 10:08:51 +00:00
};
2020-09-03 14:21:47 +00:00
2020-10-01 13:09:29 +00:00
cmakeFlags = [ "-DSCAS_LIBRARY=1" ];
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "TARGETS scas scdump scwrap" "TARGETS scas scdump scwrap generate_tables"
'';
strictDeps = true;
depsBuildBuild = lib.optionals isCrossCompiling [ buildPackages.knightos-scas ];
nativeBuildInputs = [ asciidoc libxslt.bin cmake ];
postInstall = ''
cd ..
make DESTDIR=$out install_man
'';
2020-09-03 14:21:47 +00:00
meta = with lib; {
2020-07-29 10:08:51 +00:00
homepage = "https://knightos.org/";
description = "Assembler and linker for the Z80";
2020-07-29 10:08:51 +00:00
license = licenses.mit;
maintainers = with maintainers; [ siraben ];
platforms = platforms.all;
2020-07-29 10:08:51 +00:00
};
}