|
|
|
@ -1,4 +1,8 @@ |
|
|
|
|
{ fetchFromGitHub, lib, stdenv, cmake }: |
|
|
|
|
{ fetchFromGitHub, lib, stdenv, cmake, buildPackages, asciidoc, libxslt }: |
|
|
|
|
|
|
|
|
|
let |
|
|
|
|
isCrossCompiling = stdenv.hostPlatform != stdenv.buildPlatform; |
|
|
|
|
in |
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec { |
|
|
|
|
pname = "scas"; |
|
|
|
@ -12,10 +16,18 @@ stdenv.mkDerivation rec { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DSCAS_LIBRARY=1" ]; |
|
|
|
|
|
|
|
|
|
postPatch = '' |
|
|
|
|
substituteInPlace CMakeLists.txt \ |
|
|
|
|
--replace "TARGETS scas scdump scwrap" "TARGETS scas scdump scwrap generate_tables" |
|
|
|
|
''; |
|
|
|
|
strictDeps = true; |
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ]; |
|
|
|
|
depsBuildBuild = lib.optionals isCrossCompiling [ buildPackages.knightos-scas ]; |
|
|
|
|
nativeBuildInputs = [ asciidoc libxslt.bin cmake ]; |
|
|
|
|
postInstall = '' |
|
|
|
|
cd .. |
|
|
|
|
make DESTDIR=$out install_man |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
meta = with lib; { |
|
|
|
|
homepage = "https://knightos.org/"; |
|
|
|
|