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