Merge pull request #229191 from nagy/chicken-fixes
chickenPackages: separate build phases
This commit is contained in:
commit
2fc65f26b8
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1,6 +1,6 @@
|
||||
**/deps.nix linguist-generated
|
||||
**/deps.json linguist-generated
|
||||
**/deps.toml lingust-generated
|
||||
**/deps.toml linguist-generated
|
||||
**/node-packages.nix linguist-generated
|
||||
|
||||
pkgs/applications/editors/emacs-modes/*-generated.nix linguist-generated
|
||||
|
@ -22,25 +22,30 @@ in
|
||||
|
||||
CSC_OPTIONS = lib.concatStringsSep " " cscOptions;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
chicken-install -cached -no-install ${lib.escapeShellArgs chickenInstallFlags}
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
export CHICKEN_INSTALL_PREFIX=$out
|
||||
export CHICKEN_INSTALL_REPOSITORY=$out/lib/chicken/${toString chicken.binaryVersion}
|
||||
chicken-install -cached ${lib.concatStringsSep " " chickenInstallFlags}
|
||||
chicken-install -cached ${lib.escapeShellArgs chickenInstallFlags}
|
||||
|
||||
for f in $out/bin/*
|
||||
do
|
||||
wrapProgram $f \
|
||||
--prefix CHICKEN_REPOSITORY_PATH : "$out/lib/chicken/${toString chicken.binaryVersion}" \
|
||||
--suffix CHICKEN_INCLUDE_PATH : "$out/share" \
|
||||
--prefix CHICKEN_REPOSITORY_PATH : "$out/lib/chicken/${toString chicken.binaryVersion}:$CHICKEN_REPOSITORY_PATH" \
|
||||
--prefix CHICKEN_INCLUDE_PATH : "$CHICKEN_INCLUDE_PATH:$out/share" \
|
||||
--prefix PATH : "$out/bin:${chicken}/bin:$CHICKEN_REPOSITORY_PATH"
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
|
||||
meta = {
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ stdenv, pkgs, lib, chickenEggs }:
|
||||
let
|
||||
inherit (lib) addMetaAttrs;
|
||||
addToBuildInputs = pkg: old: {
|
||||
buildInputs = (old.buildInputs or [ ]) ++ lib.toList pkg;
|
||||
};
|
||||
@ -14,8 +15,8 @@ let
|
||||
(addPkgConfig old) // (addToBuildInputs pkg old);
|
||||
addToPropagatedBuildInputsWithPkgConfig = pkg: old:
|
||||
(addPkgConfig old) // (addToPropagatedBuildInputs pkg old);
|
||||
broken = old: { meta = old.meta // { broken = true; }; };
|
||||
brokenOnDarwin = old: { meta = old.meta // { broken = stdenv.isDarwin; }; };
|
||||
broken = addMetaAttrs { broken = true; };
|
||||
brokenOnDarwin = addMetaAttrs { broken = stdenv.isDarwin; };
|
||||
in {
|
||||
allegro = addToBuildInputsWithPkgConfig ([ pkgs.allegro5 pkgs.libglvnd ]
|
||||
++ lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.OpenGL ]);
|
||||
@ -85,8 +86,8 @@ in {
|
||||
zstd = addToBuildInputs pkgs.zstd;
|
||||
|
||||
# platform changes
|
||||
pledge = old: { meta = old.meta // { platforms = lib.platforms.openbsd; }; };
|
||||
unveil = old: { meta = old.meta // { platforms = lib.platforms.openbsd; }; };
|
||||
pledge = addMetaAttrs { platforms = lib.platforms.openbsd; };
|
||||
unveil = addMetaAttrs { platforms = lib.platforms.openbsd; };
|
||||
|
||||
# mark broken
|
||||
"ephem-v1.1" = broken;
|
||||
|
Loading…
Reference in New Issue
Block a user