mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 13:19:10 +03:00
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 {
|
||||
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/";
|
||||
|
Loading…
Reference in New Issue
Block a user