Merge pull request #247363 from wegank/guile-refactor-1
guile: canonicalize site dirs
This commit is contained in:
commit
a634d19ba4
|
@ -49,15 +49,11 @@ stdenv.mkDerivation rec {
|
|||
# Test suite is non-determinisitic in later versions
|
||||
doCheck = false;
|
||||
|
||||
postInstall =
|
||||
let
|
||||
guileVersion = lib.versions.majorMinor guile.version;
|
||||
in
|
||||
''
|
||||
wrapProgram $out/bin/haunt \
|
||||
--prefix GUILE_LOAD_PATH : "$out/share/guile/site/${guileVersion}:$GUILE_LOAD_PATH" \
|
||||
--prefix GUILE_LOAD_COMPILED_PATH : "$out/lib/guile/${guileVersion}/site-ccache:$GUILE_LOAD_COMPILED_PATH"
|
||||
'';
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/haunt \
|
||||
--prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \
|
||||
--prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH"
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
|
|
|
@ -27,9 +27,9 @@ stdenv.mkDerivation rec {
|
|||
];
|
||||
|
||||
configureFlags = [
|
||||
"--with-guile-site-dir=${builtins.placeholder "out"}/share/guile/site"
|
||||
"--with-guile-site-ccache-dir=${builtins.placeholder "out"}/share/guile/site"
|
||||
"--with-guile-extension-dir=${builtins.placeholder "out"}/share/guile/extensions"
|
||||
"--with-guile-site-dir=${builtins.placeholder "out"}/${guile.siteDir}"
|
||||
"--with-guile-site-ccache-dir=${builtins.placeholder "out"}/${guile.siteCcacheDir}"
|
||||
"--with-guile-extension-dir=${builtins.placeholder "out"}/lib/guile/${guile.effectiveVersion}/extensions"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -29,16 +29,12 @@ stdenv.mkDerivation rec {
|
|||
"--with-gnu-filesystem-hierarchy"
|
||||
];
|
||||
|
||||
postFixup =
|
||||
let
|
||||
guileVersion = lib.versions.majorMinor guile.version;
|
||||
in
|
||||
''
|
||||
for f in $out/share/guile/site/ncurses/**.scm; do \
|
||||
substituteInPlace $f \
|
||||
--replace "libguile-ncurses" "$out/lib/guile/${guileVersion}/libguile-ncurses"; \
|
||||
done
|
||||
'';
|
||||
postFixup = ''
|
||||
for f in $out/${guile.siteDir}/ncurses/**.scm; do \
|
||||
substituteInPlace $f \
|
||||
--replace "libguile-ncurses" "$out/lib/guile/${guile.effectiveVersion}/libguile-ncurses"; \
|
||||
done
|
||||
'';
|
||||
|
||||
# XXX: 1 of 65 tests failed.
|
||||
doCheck = false;
|
||||
|
|
|
@ -27,9 +27,9 @@ stdenv.mkDerivation rec {
|
|||
libffi
|
||||
];
|
||||
|
||||
GUILE_SITE="${guile-lib}/share/guile/site";
|
||||
env.GUILE_SITE = "${guile-lib}/${guile.siteDir}";
|
||||
|
||||
configureFlags = [ "--with-guilemoduledir=$(out)/share/guile/site" ];
|
||||
configureFlags = [ "--with-guilemoduledir=$(out)/${guile.siteDir}" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.nongnu.org/guile-reader/";
|
||||
|
|
|
@ -20,10 +20,10 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "sha256-P29U88QrCjoyl/wdTPZbiMoykd/v6ul6CW/IJn9UAyw=";
|
||||
};
|
||||
|
||||
configureFlags = [ "--with-guilesitedir=\${out}/share/guile/site" ];
|
||||
configureFlags = [ "--with-guilesitedir=\${out}/${guile.siteDir}" ];
|
||||
|
||||
postFixup = ''
|
||||
for f in $out/share/guile/site/ssh/**.scm; do \
|
||||
for f in $out/${guile.siteDir}/ssh/**.scm; do \
|
||||
substituteInPlace $f \
|
||||
--replace "libguile-ssh" "$out/lib/libguile-ssh"; \
|
||||
done
|
||||
|
|
|
@ -28,8 +28,8 @@ stdenv.mkDerivation rec {
|
|||
];
|
||||
|
||||
configureFlags = [
|
||||
"--with-guile-site-dir=$out/share/guile/site"
|
||||
"--with-guile-site-ccache-dir=$out/share/guile/site"
|
||||
"--with-guile-site-dir=$(out)/${guile.siteDir}"
|
||||
"--with-guile-site-ccache-dir=$(out)/${guile.siteCcacheDir}"
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
|
|
|
@ -86,6 +86,12 @@ stdenv.mkDerivation rec {
|
|||
|
||||
setupHook = ./setup-hook-1.8.sh;
|
||||
|
||||
passthru = {
|
||||
effectiveVersion = lib.versions.majorMinor version;
|
||||
siteCcacheDir = "lib/guile/site-ccache";
|
||||
siteDir = "share/guile/site";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/guile/";
|
||||
description = "Embeddable Scheme implementation";
|
||||
|
|
|
@ -133,6 +133,12 @@ builder rec {
|
|||
|
||||
setupHook = ./setup-hook-2.0.sh;
|
||||
|
||||
passthru = rec {
|
||||
effectiveVersion = lib.versions.majorMinor version;
|
||||
siteCcacheDir = "lib/guile/${effectiveVersion}/site-ccache";
|
||||
siteDir = "share/guile/site/${effectiveVersion}";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/guile/";
|
||||
description = "Embeddable Scheme implementation";
|
||||
|
|
|
@ -124,6 +124,12 @@ builder rec {
|
|||
|
||||
setupHook = ./setup-hook-2.2.sh;
|
||||
|
||||
passthru = rec {
|
||||
effectiveVersion = lib.versions.majorMinor version;
|
||||
siteCcacheDir = "lib/guile/${effectiveVersion}/site-ccache";
|
||||
siteDir = "share/guile/site/${effectiveVersion}";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/guile/";
|
||||
description = "Embeddable Scheme implementation";
|
||||
|
|
|
@ -127,7 +127,11 @@ builder rec {
|
|||
|
||||
setupHook = ./setup-hook-3.0.sh;
|
||||
|
||||
passthru = {
|
||||
passthru = rec {
|
||||
effectiveVersion = lib.versions.majorMinor version;
|
||||
siteCcacheDir = "lib/guile/${effectiveVersion}/site-ccache";
|
||||
siteDir = "share/guile/site/${effectiveVersion}";
|
||||
|
||||
updateScript = writeScript "update-guile-3" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl pcre common-updater-scripts
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
, zlib
|
||||
, libpng
|
||||
, boost
|
||||
, guile_3_0
|
||||
, guile
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
|
@ -25,12 +25,12 @@ mkDerivation {
|
|||
};
|
||||
|
||||
nativeBuildInputs = [ wrapQtAppsHook cmake ninja pkg-config ];
|
||||
buildInputs = [ eigen zlib libpng boost guile_3_0 ];
|
||||
buildInputs = [ eigen zlib libpng boost guile ];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace studio/src/guile/interpreter.cpp \
|
||||
--replace "qputenv(\"GUILE_LOAD_COMPILED_PATH\", \"libfive/bind/guile\");" \
|
||||
"qputenv(\"GUILE_LOAD_COMPILED_PATH\", \"libfive/bind/guile:$out/lib/guile/3.0/ccache\");"
|
||||
"qputenv(\"GUILE_LOAD_COMPILED_PATH\", \"libfive/bind/guile:$out/${guile.siteCcacheDir}\");"
|
||||
|
||||
substituteInPlace libfive/bind/guile/CMakeLists.txt \
|
||||
--replace "LIBFIVE_FRAMEWORK_DIR=$<TARGET_FILE_DIR:libfive>" \
|
||||
|
@ -42,7 +42,7 @@ mkDerivation {
|
|||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGUILE_CCACHE_DIR=${placeholder "out"}/lib/guile/3.0/ccache"
|
||||
"-DGUILE_CCACHE_DIR=${placeholder "out"}/${guile.siteCcacheDir}"
|
||||
];
|
||||
|
||||
postInstall = if stdenv.isDarwin then ''
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, guile, flex, fetchpatch }:
|
||||
|
||||
let
|
||||
guileVersion = lib.versions.majorMinor guile.version;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.1.11";
|
||||
pname = "libmatheval";
|
||||
|
@ -32,8 +29,8 @@ stdenv.mkDerivation rec {
|
|||
})
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev guile}/include/guile/${guileVersion}";
|
||||
env.NIX_LDFLAGS = "-L${guile}/lib -lguile-${guileVersion}";
|
||||
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev guile}/include/guile/${guile.effectiveVersion}";
|
||||
env.NIX_LDFLAGS = "-L${guile}/lib -lguile-${guile.effectiveVersion}";
|
||||
|
||||
meta = {
|
||||
description = "A library to parse and evaluate symbolic expressions input as text";
|
||||
|
|
|
@ -20,15 +20,11 @@ stdenv.mkDerivation rec {
|
|||
|
||||
doCheck = true;
|
||||
|
||||
postInstall =
|
||||
let
|
||||
guileVersion = lib.versions.majorMinor guile.version;
|
||||
in
|
||||
''
|
||||
wrapProgram $out/bin/hall \
|
||||
--prefix GUILE_LOAD_PATH : "$out/share/guile/site/${guileVersion}:$GUILE_LOAD_PATH" \
|
||||
--prefix GUILE_LOAD_COMPILED_PATH : "$out/lib/guile/${guileVersion}/site-ccache:$GUILE_LOAD_COMPILED_PATH"
|
||||
'';
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/hall \
|
||||
--prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \
|
||||
--prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH"
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
|
|
|
@ -28,8 +28,8 @@ stdenv.mkDerivation rec {
|
|||
buildInputs = [ libpcap guile_2_2 openssl ];
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
configureFlags = [
|
||||
"GUILELIBDIR=\${out}/share/guile/site"
|
||||
"GUILECACHEDIR=\${out}/lib/guile/ccache"
|
||||
"GUILELIBDIR=\${out}/${guile_2_2.siteDir}"
|
||||
"GUILECACHEDIR=\${out}/${guile_2_2.siteCcacheDir}"
|
||||
];
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -46,15 +46,11 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
++ optional enablePloticus ploticus
|
||||
++ optional enableTex tex;
|
||||
|
||||
postInstall =
|
||||
let
|
||||
guileVersion = lib.versions.majorMinor guile.version;
|
||||
in
|
||||
''
|
||||
wrapProgram $out/bin/skribilo \
|
||||
--prefix GUILE_LOAD_PATH : "$out/share/guile/site/${guileVersion}:$GUILE_LOAD_PATH" \
|
||||
--prefix GUILE_LOAD_COMPILED_PATH : "$out/lib/guile/${guileVersion}/site-ccache:$GUILE_LOAD_COMPILED_PATH"
|
||||
'';
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/skribilo \
|
||||
--prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \
|
||||
--prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.nongnu.org/skribilo/";
|
||||
|
|
Loading…
Reference in a new issue