Try to get libresoc working

This commit is contained in:
Las Safin 2021-09-05 16:06:44 +00:00
parent 6ae448ee39
commit 4f6f668b74
No known key found for this signature in database
GPG Key ID: E7FA928911B61ED6
2 changed files with 38 additions and 6 deletions

View File

@ -104,7 +104,7 @@
) {};
libresoc = nixpkgsFor.${system}.callPackage (
import ./nix/libresoc.nix { inherit soclayout pinmux; }
import ./nix/libresoc.nix { inherit alliance-check-toolkit soclayout pinmux; }
) {};
unittests = override (nixpkgsFor.${system}.callPackage (
@ -130,5 +130,6 @@
hydraJobs.combined = forAllSystems (system: self.packages.${system}.combined);
hydraJobs.alliance-check-toolkit = forAllSystems (system: self.checks.${system}.alliance-check-toolkit);
hydraJobs.unittests = forAllSystems (system: self.checks.${system}.unittests);
hydraJobs.libresoc = forAllSystems (system: self.checks.${system}.libresoc);
};
}

View File

@ -1,14 +1,45 @@
{ soclayout, pinmux, ... }:
{ alliance-check-toolkit, soclayout, pinmux, ... }:
{ stdenv }:
stdenv.mkDerivation {
{ stdenv, coriolis-combined, coriolis-unicorn, coriolis-cumulus
, python2Packages, alliance, yosys, writeShellScriptBin }:
let
fakegit = writeShellScriptBin "git" "exit 0";
in stdenv.mkDerivation rec {
name = "libresoc-check";
src = soclayout;
YOSYS_TOP = "${yosys}";
ALLIANCE_TOP = "${alliance}";
ALLIANCE_TOOLKIT = "${alliance-check-toolkit}";
CHECK_TOOLKIT = ALLIANCE_TOOLKIT;
CORIOLIS_TOP = "${coriolis-combined}";
# The user configuration for verhaegs is empty,
# which is why we use it.
USER = "verhaegs";
nativeBuildInputs = [ fakegit alliance coriolis-unicorn coriolis-cumulus yosys ];
prePatch = ''
rm pinmux
rmdir pinmux
ln -s ${pinmux} pinmux
'';
postPatch = "patchShebangs .";
meta.isBroken = true;
buildPhase = ''
runHook preBuild
cd experiments9
./mksym.sh
ln -s ${alliance-check-toolkit}/etc/mk/users.d/user-${USER}.mk mk/users.d/user-${USER}.mk
./build_full_4ksram.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
mv -T "$PWD" "$out"
runHook postInstall
'';
fixupPhase = "true";
}