diff options
author | Rick van Schijndel <Mindavi@users.noreply.github.com> | 2022-05-09 21:04:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-09 21:04:04 +0200 |
commit | 837538f567a9ae1858da91cb50e218afed4a16c3 (patch) | |
tree | c519fc445b1fb7a5d0909497db4cb78995ea54d1 | |
parent | 736ae06a2110a11e3af6773f85f088a0f51aacbb (diff) | |
parent | 26d078be2c841c8fcee3bd3ca4b96d753ac5d934 (diff) |
Merge pull request #131826 from siraben/scas-cross
knightos-scas: fix cross compilation and enable documentation
-rw-r--r-- | pkgs/development/tools/knightos/scas/default.nix | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/pkgs/development/tools/knightos/scas/default.nix b/pkgs/development/tools/knightos/scas/default.nix index 255ecf798d86b..221c5a0d12d5f 100644 --- a/pkgs/development/tools/knightos/scas/default.nix +++ b/pkgs/development/tools/knightos/scas/default.nix @@ -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/"; |