From f48570f223115a68c6a1e0ad4c16082a5dc53e84 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 5 Aug 2023 22:08:23 +0200 Subject: [PATCH] treewide: fixup --- pkgs/applications/misc/haunt/default.nix | 14 +++++--------- .../guile-modules/guile-gnutls/default.nix | 6 +++--- .../guile-modules/guile-ncurses/default.nix | 16 ++++++---------- .../guile-modules/guile-reader/default.nix | 4 ++-- .../guile-modules/guile-ssh/default.nix | 4 ++-- .../guile-modules/guile-xcb/default.nix | 4 ++-- pkgs/development/libraries/libfive/default.nix | 8 ++++---- .../libraries/libmatheval/default.nix | 7 ++----- .../tools/guile/guile-hall/default.nix | 14 +++++--------- pkgs/tools/networking/junkie/default.nix | 4 ++-- pkgs/tools/typesetting/skribilo/default.nix | 14 +++++--------- 11 files changed, 38 insertions(+), 57 deletions(-) diff --git a/pkgs/applications/misc/haunt/default.nix b/pkgs/applications/misc/haunt/default.nix index 5d2156c91497..c5794591edf6 100644 --- a/pkgs/applications/misc/haunt/default.nix +++ b/pkgs/applications/misc/haunt/default.nix @@ -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 = '' diff --git a/pkgs/development/guile-modules/guile-gnutls/default.nix b/pkgs/development/guile-modules/guile-gnutls/default.nix index 91151e343722..8fe69b268408 100644 --- a/pkgs/development/guile-modules/guile-gnutls/default.nix +++ b/pkgs/development/guile-modules/guile-gnutls/default.nix @@ -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; { diff --git a/pkgs/development/guile-modules/guile-ncurses/default.nix b/pkgs/development/guile-modules/guile-ncurses/default.nix index f982ff600b8b..7c092db5a7eb 100644 --- a/pkgs/development/guile-modules/guile-ncurses/default.nix +++ b/pkgs/development/guile-modules/guile-ncurses/default.nix @@ -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; diff --git a/pkgs/development/guile-modules/guile-reader/default.nix b/pkgs/development/guile-modules/guile-reader/default.nix index 7387dbc20876..edc6d73fffcc 100644 --- a/pkgs/development/guile-modules/guile-reader/default.nix +++ b/pkgs/development/guile-modules/guile-reader/default.nix @@ -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/"; diff --git a/pkgs/development/guile-modules/guile-ssh/default.nix b/pkgs/development/guile-modules/guile-ssh/default.nix index 6cf9f5e4efac..e7654b747c3a 100644 --- a/pkgs/development/guile-modules/guile-ssh/default.nix +++ b/pkgs/development/guile-modules/guile-ssh/default.nix @@ -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 diff --git a/pkgs/development/guile-modules/guile-xcb/default.nix b/pkgs/development/guile-modules/guile-xcb/default.nix index 19a790db77a4..2102e395d0b3 100644 --- a/pkgs/development/guile-modules/guile-xcb/default.nix +++ b/pkgs/development/guile-modules/guile-xcb/default.nix @@ -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 = [ diff --git a/pkgs/development/libraries/libfive/default.nix b/pkgs/development/libraries/libfive/default.nix index 37eaed3ac650..2d7f05eada3c 100644 --- a/pkgs/development/libraries/libfive/default.nix +++ b/pkgs/development/libraries/libfive/default.nix @@ -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=$" \ @@ -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 '' diff --git a/pkgs/development/libraries/libmatheval/default.nix b/pkgs/development/libraries/libmatheval/default.nix index fcf4167c1901..c2084b007a61 100644 --- a/pkgs/development/libraries/libmatheval/default.nix +++ b/pkgs/development/libraries/libmatheval/default.nix @@ -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"; diff --git a/pkgs/development/tools/guile/guile-hall/default.nix b/pkgs/development/tools/guile/guile-hall/default.nix index 440b94fab68e..b786a3427373 100644 --- a/pkgs/development/tools/guile/guile-hall/default.nix +++ b/pkgs/development/tools/guile/guile-hall/default.nix @@ -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 = '' diff --git a/pkgs/tools/networking/junkie/default.nix b/pkgs/tools/networking/junkie/default.nix index 87c0fc6ae2a7..ac20577b5f35 100644 --- a/pkgs/tools/networking/junkie/default.nix +++ b/pkgs/tools/networking/junkie/default.nix @@ -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 = { diff --git a/pkgs/tools/typesetting/skribilo/default.nix b/pkgs/tools/typesetting/skribilo/default.nix index 264eeea52e38..a834ccdccbf5 100644 --- a/pkgs/tools/typesetting/skribilo/default.nix +++ b/pkgs/tools/typesetting/skribilo/default.nix @@ -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/";