Merge pull request #131826 from siraben/scas-cross
knightos-scas: fix cross compilation and enable documentation
This commit is contained in:
commit
837538f567
|
@ -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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "scas";
|
pname = "scas";
|
||||||
|
@ -12,10 +16,18 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
cmakeFlags = [ "-DSCAS_LIBRARY=1" ];
|
cmakeFlags = [ "-DSCAS_LIBRARY=1" ];
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace CMakeLists.txt \
|
||||||
|
--replace "TARGETS scas scdump scwrap" "TARGETS scas scdump scwrap generate_tables"
|
||||||
|
'';
|
||||||
strictDeps = true;
|
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; {
|
meta = with lib; {
|
||||||
homepage = "https://knightos.org/";
|
homepage = "https://knightos.org/";
|
||||||
|
|
Loading…
Reference in a new issue