factor-lang: Update derivation and build with clang

master
Michael Raitza 2020-12-06 18:03:17 +01:00
parent d5adb9f392
commit d579a46c16
3 changed files with 7 additions and 27 deletions

View File

@ -31,7 +31,7 @@ let
# l3pp = callPackage ./l3pp { };
# mathsat = callPackage ./mathsat { };
factor-lang = callPackage ./factor-lang/scope.nix { };
factor-lang = callPackage ./factor-lang/scope.nix { stdenv = prev.clangStdenv; };
foxitreader = callPackage ./foxitreader.nix { openssl = prev.openssl_1_0_2; };

View File

@ -75,34 +75,14 @@ stdenv.mkDerivation rec {
configurePhase = "true";
LD_LIBRARY_PATH = "/run/opengl-driver/lib:${runtimeLibPath}";
buildPhase = ''
make linux-x86-64
patchShebangs ./build.sh
# Factor uses XDG_CACHE_HOME for cache during compilation.
# We can't have that. So set it to $TMPDIR/.cache
# We can't have that. So, set it to $TMPDIR/.cache
export XDG_CACHE_HOME=$TMPDIR/.cache && mkdir -p $XDG_CACHE_HOME
# The released image has library path info embedded, so we
# first have to recreate the boot image with Nix paths, and
# then use it to build the Nix release image.
cp boot.unix-x86.64.image factor.image
# Expose libraries in LD_LIBRARY_PATH for factor
export LD_LIBRARY_PATH=${lib.makeLibraryPath runtimeLibs}:$LD_LIBRARY_PATH
echo "=== Building first full image from boot image..."
# build full factor image from boot image, saving the state for the next call
./factor -script -e='"unix-x86.64" USING: system bootstrap.image memory ; make-image save 0 exit'
echo "=== Building new boot image..."
# make a new bootstrap image
./factor -script -e='"unix-x86.64" USING: system bootstrap.image ; make-image 0 exit'
echo "=== Building final full image..."
# rebuild final full factor image to include all patched sources
./factor -i=boot.unix-x86.64.image
./build.sh compile
./build.sh bootstrap
'';
doCheck = true;

View File

@ -6,7 +6,7 @@ let
let callPackage = pkgs.newScope self ;
in rec {
recurseForDerivations = true;
interpreter = callPackage ./default.nix { inherit (gnome2) gtkglext; };
interpreter = callPackage ./default.nix { inherit (gnome2) gtkglext; inherit stdenv; };
# Convenience access for using the returned attribute the same way as the interpreter derivation
withLibs = self.interpreter.withLibs;