Update to latest WIP Chicken commit
This commit is contained in:
parent
8f330ab9ab
commit
27bf4f6aed
3 changed files with 16 additions and 17 deletions
11
flake.nix
11
flake.nix
|
@ -35,9 +35,9 @@
|
|||
default = self.overlays.chicken;
|
||||
|
||||
chicken = final: prev: {
|
||||
tcc-mob = final.callPackage ./nix/tinycc.nix {
|
||||
stdenv = final.gcc13Stdenv;
|
||||
};
|
||||
# tcc-mob = final.callPackage ./nix/tinycc.nix {
|
||||
# stdenv = final.gcc13Stdenv;
|
||||
# };
|
||||
chicken = final.callPackage ./nix/chicken.nix {
|
||||
stdenv = final.gcc13Stdenv;
|
||||
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||
|
@ -51,11 +51,10 @@
|
|||
overlays = [ self.overlays.chicken ];
|
||||
};
|
||||
in pkgs.mkShell {
|
||||
packages = with pkgs; [ tcc-mob chicken ];
|
||||
packages = with pkgs; [ chicken ];
|
||||
shellHook = ''
|
||||
export CC=${pkgs.tcc-mob}/bin/tcc
|
||||
export CHICKEN_INSTALL_REPOSITORY="$(pwd)/.chicken/eggs"
|
||||
export CHICKEN_REPOSITORY_PATH="${pkgs.chicken}/lib/chicken/11:$CHICKEN_REPOSITORY_PATH:$(pwd)/.chicken/eggs"
|
||||
export CHICKEN_REPOSITORY_PATH="${pkgs.chicken}/lib/chicken/12:$CHICKEN_REPOSITORY_PATH:$(pwd)/.chicken/eggs"
|
||||
export PATH="$PATH:$CHICKEN_INSTALL_PREFIX/bin"
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
fetchurl,
|
||||
makeWrapper,
|
||||
darwin,
|
||||
tcc-mob,
|
||||
#tcc-mob,
|
||||
version ? "git",
|
||||
testers
|
||||
}:
|
||||
|
@ -27,8 +27,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
srcs = [
|
||||
(fetchgit {
|
||||
url = "git://code.call-cc.org/chicken-core";
|
||||
rev = "2c80bbab33302444bebc7eaac7f42ee9cda50301";
|
||||
sha256 = "sha256-KWL9/s03ZGwjsjvxZxluXtaKvBuimHGH5UXaQVf68Mg=";
|
||||
rev = "25c24723d3300c0a05d529acee3512f6d9469d6f";
|
||||
sha256 = "sha256-QsOuDE/8odBGAQOr2p9gZJssts55n0R8OEBhH+ooSP8=";
|
||||
})
|
||||
(fetchurl {
|
||||
url = "https://code.call-cc.org/dev-snapshots/2024/07/01/chicken-6.0.0-bootstrap.tar.gz";
|
||||
|
@ -53,11 +53,10 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
*)
|
||||
mkcmd=make;;
|
||||
esac
|
||||
export CC="${tcc-mob}/bin/tcc"
|
||||
$mkcmd C_COMPILER=$CC PREFIX="$(pwd)"/../snapshot
|
||||
$mkcmd C_COMPILER=$CC PREFIX="$(pwd)"/../snapshot install
|
||||
cd ../..
|
||||
./configure --chicken "$(pwd)"/boot/snapshot/bin/chicken --c-compiler "${tcc-mob}/bin/tcc"
|
||||
./configure --chicken "$(pwd)"/boot/snapshot/bin/chicken
|
||||
$mkcmd boot-chicken
|
||||
'';
|
||||
|
||||
|
@ -73,7 +72,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
makeFlags = [
|
||||
"PLATFORM=${platform}"
|
||||
"PREFIX=$(out)"
|
||||
"C_COMPILER=${tcc-mob}/bin/tcc"
|
||||
#"C_COMPILER=${tcc-mob}/bin/tcc"
|
||||
"CXX_COMPILER=$(CXX)"
|
||||
] ++ (lib.optionals stdenv.isDarwin [
|
||||
"XCODE_TOOL_PATH=${darwin.binutils.bintools}/bin"
|
||||
|
@ -81,20 +80,21 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
"POSTINSTALL_PROGRAM=install_name_tool"
|
||||
]) ++ (lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"HOSTSYSTEM=${stdenv.hostPlatform.config}"
|
||||
"TARGET_C_COMPILER=${tcc-mob}/bin/${stdenv.cc.targetPrefix}tcc"
|
||||
#"TARGET_C_COMPILER=${tcc-mob}/bin/${stdenv.cc.targetPrefix}tcc"
|
||||
"TARGET_CXX_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c"
|
||||
"TARGET_CXX_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++"
|
||||
]);
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
pkgs.hostname
|
||||
tcc-mob
|
||||
#tcc-mob
|
||||
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
|
||||
darwin.autoSignDarwinBinariesHook
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
./configure --chicken ./chicken-boot --prefix $PREFIX --platform=$PLATFORM --c-compiler "${tcc-mob}/bin/tcc"
|
||||
./configure --chicken ./chicken-boot --prefix $PREFIX --platform=$PLATFORM
|
||||
'';
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
|
|
@ -14,8 +14,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
src = fetchFromRepoOrCz {
|
||||
repo = "tinycc";
|
||||
rev = "b8b6a5fd7b4e8cab8e5a5d01064cf5bf2b5eed95";
|
||||
hash = "sha256-jY0P2GErmo//YBaz6u4/jj/voOE3C2JaIDRmo0orXN8=";
|
||||
rev = "7826d89dfdbbc70d770f213f25360f6cab4a37fd";
|
||||
hash = "sha256-1RNscbZsnZ1K6+AjNV/l4VETJfU64aNFYIyiY4uGYG0=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "info" "man" ];
|
||||
|
|
Loading…
Reference in a new issue