diff --git a/pkgs/development/interpreters/guile/1.8.nix b/pkgs/development/interpreters/guile/1.8.nix index 3bc734fd12fc..939c17af21ad 100644 --- a/pkgs/development/interpreters/guile/1.8.nix +++ b/pkgs/development/interpreters/guile/1.8.nix @@ -10,14 +10,15 @@ pkg-config, pkgsBuildBuild, readline, + guileImportsCheckHook, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "guile"; version = "1.8.8"; src = fetchurl { - url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; + url = "mirror://gnu/guile/guile-${finalAttrs.version}.tar.gz"; sha256 = "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"; }; @@ -57,6 +58,9 @@ stdenv.mkDerivation rec { # see below. libtool ]; + propagatedNativeBuildInputs = lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ + (guileImportsCheckHook.override { effectiveVersion = finalAttrs.passthru.effectiveVersion; }) + ]; patches = [ # Fix doc snarfing with GCC 4.5. @@ -89,12 +93,12 @@ stdenv.mkDerivation rec { # This is fixed here: # . doCheck = false; - doInstallCheck = doCheck; + doInstallCheck = finalAttrs.doCheck; setupHook = ./setup-hook-1.8.sh; passthru = { - effectiveVersion = lib.versions.majorMinor version; + effectiveVersion = lib.versions.majorMinor finalAttrs.version; siteCcacheDir = "lib/guile/site-ccache"; siteDir = "share/guile/site"; }; @@ -114,4 +118,4 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ ludo ]; platforms = lib.platforms.all; }; -} +}) diff --git a/pkgs/development/interpreters/guile/2.0.nix b/pkgs/development/interpreters/guile/2.0.nix index 9d207f70c0c7..0110357541fc 100644 --- a/pkgs/development/interpreters/guile/2.0.nix +++ b/pkgs/development/interpreters/guile/2.0.nix @@ -5,7 +5,6 @@ fetchpatch, boehmgc, buildPackages, - coverageAnalysis ? null, gawk, gmp, libffi, @@ -15,18 +14,15 @@ pkg-config, pkgsBuildBuild, readline, + guileImportsCheckHook, }: -let - # Do either a coverage analysis build or a standard build. - builder = if coverageAnalysis != null then coverageAnalysis else stdenv.mkDerivation; -in -builder rec { +stdenv.mkDerivation (finalAttrs: { pname = "guile"; version = "2.0.13"; src = fetchurl { - url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz"; + url = "mirror://gnu/guile/guile-${finalAttrs.version}.tar.xz"; sha256 = "12yqkr974y91ylgw6jnmci2v90i90s7h9vxa4zk0sai8vjnz4i1p"; }; @@ -63,6 +59,9 @@ builder rec { libtool libunistring ]; + propagatedNativeBuildInputs = lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ + (guileImportsCheckHook.override { effectiveVersion = finalAttrs.passthru.effectiveVersion; }) + ]; enableParallelBuilding = true; @@ -81,7 +80,6 @@ builder rec { sha256 = "0p6c1lmw1iniq03z7x5m65kg3lq543kgvdb4nrxsaxjqf3zhl77v"; }) ] - ++ (lib.optional (coverageAnalysis != null) ./gcov-file-name.patch) ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./filter-mkostemp-darwin.patch (fetchpatch { @@ -136,14 +134,14 @@ builder rec { # make check doesn't work on darwin # On Linuxes+Hydra the tests are flaky; feel free to investigate deeper. doCheck = false; - doInstallCheck = doCheck; + doInstallCheck = finalAttrs.doCheck; setupHook = ./setup-hook-2.0.sh; - passthru = rec { - effectiveVersion = lib.versions.majorMinor version; - siteCcacheDir = "lib/guile/${effectiveVersion}/site-ccache"; - siteDir = "share/guile/site/${effectiveVersion}"; + passthru = { + effectiveVersion = lib.versions.majorMinor finalAttrs.version; + siteCcacheDir = "lib/guile/${finalAttrs.passthru.effectiveVersion}/site-ccache"; + siteDir = "share/guile/site/${finalAttrs.passthru.effectiveVersion}"; }; meta = { @@ -162,7 +160,7 @@ builder rec { maintainers = with lib.maintainers; [ ludo ]; platforms = lib.platforms.all; }; -} +}) // diff --git a/pkgs/development/interpreters/guile/2.2.nix b/pkgs/development/interpreters/guile/2.2.nix index c48fa78594bd..140ea705f865 100644 --- a/pkgs/development/interpreters/guile/2.2.nix +++ b/pkgs/development/interpreters/guile/2.2.nix @@ -15,18 +15,15 @@ pkg-config, pkgsBuildBuild, readline, + guileImportsCheckHook, }: -let - # Do either a coverage analysis build or a standard build. - builder = if coverageAnalysis != null then coverageAnalysis else stdenv.mkDerivation; -in -builder rec { +stdenv.mkDerivation (finalAttrs: { pname = "guile"; version = "2.2.7"; src = fetchurl { - url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz"; + url = "mirror://gnu/guile/guile-${finalAttrs.version}.tar.xz"; sha256 = "013mydzhfswqci6xmyc1ajzd59pfbdak15i0b090nhr9bzm7dxyd"; }; @@ -62,6 +59,9 @@ builder rec { libtool libunistring ]; + propagatedNativeBuildInputs = lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ + (guileImportsCheckHook.override { effectiveVersion = finalAttrs.passthru.effectiveVersion; }) + ]; # According to Bernhard M. Wiedemann on # #reproducible-builds on irc.oftc.net, (2020-01-29): they had to @@ -75,7 +75,6 @@ builder rec { # Read the header of the patch to more info ./eai_system.patch ] - ++ lib.optional (coverageAnalysis != null) ./gcov-file-name.patch ++ lib.optional stdenv.hostPlatform.isDarwin (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch"; sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207"; @@ -124,14 +123,14 @@ builder rec { # make check doesn't work on darwin # On Linuxes+Hydra the tests are flaky; feel free to investigate deeper. doCheck = false; - doInstallCheck = doCheck; + doInstallCheck = finalAttrs.doCheck; setupHook = ./setup-hook-2.2.sh; - passthru = rec { - effectiveVersion = lib.versions.majorMinor version; - siteCcacheDir = "lib/guile/${effectiveVersion}/site-ccache"; - siteDir = "share/guile/site/${effectiveVersion}"; + passthru = { + effectiveVersion = lib.versions.majorMinor finalAttrs.version; + siteCcacheDir = "lib/guile/${finalAttrs.passthru.effectiveVersion}/site-ccache"; + siteDir = "share/guile/site/${finalAttrs.passthru.effectiveVersion}"; }; meta = { @@ -149,4 +148,4 @@ builder rec { maintainers = with lib.maintainers; [ ludo ]; platforms = lib.platforms.all; }; -} +}) diff --git a/pkgs/development/interpreters/guile/3.0.nix b/pkgs/development/interpreters/guile/3.0.nix index 8093ec393ec4..8cee8bcec4a7 100644 --- a/pkgs/development/interpreters/guile/3.0.nix +++ b/pkgs/development/interpreters/guile/3.0.nix @@ -5,7 +5,6 @@ fetchpatch, boehmgc, buildPackages, - coverageAnalysis ? null, gawk, gmp, libffi, @@ -19,19 +18,16 @@ readline, writeScript, pkgsStatic, + guileImportsCheckHook, }: -let - # Do either a coverage analysis build or a standard build. - builder = if coverageAnalysis != null then coverageAnalysis else stdenv.mkDerivation; -in -builder rec { +stdenv.mkDerivation (finalAttrs: { pname = "guile"; version = "3.0.11"; src = fetchurl { - url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz"; - sha256 = "sha256-gYx50jZlen+pb7NkE3zHtBs73uDWXGF0ygN2lVlXlGA="; + url = "mirror://gnu/guile/guile-${finalAttrs.version}.tar.xz"; + hash = "sha256-gYx50jZlen+pb7NkE3zHtBs73uDWXGF0ygN2lVlXlGA="; }; outputs = [ @@ -77,6 +73,9 @@ builder rec { ++ lib.optionals stdenv.hostPlatform.isLinux [ libxcrypt ]; + propagatedNativeBuildInputs = lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ + (guileImportsCheckHook.override { effectiveVersion = finalAttrs.passthru.effectiveVersion; }) + ]; strictDeps = true; @@ -89,7 +88,6 @@ builder rec { patches = [ ./eai_system.patch ] - ++ lib.optional (coverageAnalysis != null) ./gcov-file-name.patch ++ lib.optional stdenv.hostPlatform.isDarwin (fetchpatch { url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch"; sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207"; @@ -145,7 +143,7 @@ builder rec { # make check doesn't work on darwin # On Linuxes+Hydra the tests are flaky; feel free to investigate deeper. doCheck = false; - doInstallCheck = doCheck; + doInstallCheck = finalAttrs.doCheck; # guile-3 uses ELF files to store bytecode. strip does not # always handle them correctly and destroys the image: @@ -156,12 +154,12 @@ builder rec { setupHook = ./setup-hook-3.0.sh; - passthru = rec { + passthru = { tests.static = pkgsStatic.guile; - effectiveVersion = lib.versions.majorMinor version; - siteCcacheDir = "lib/guile/${effectiveVersion}/site-ccache"; - siteDir = "share/guile/site/${effectiveVersion}"; + effectiveVersion = lib.versions.majorMinor finalAttrs.version; + siteCcacheDir = "lib/guile/${finalAttrs.passthru.effectiveVersion}/site-ccache"; + siteDir = "share/guile/site/${finalAttrs.passthru.effectiveVersion}"; updateScript = writeScript "update-guile-3" '' #!/usr/bin/env nix-shell @@ -193,4 +191,4 @@ builder rec { platforms = lib.platforms.all; mainProgram = "guile"; }; -} +}) diff --git a/pkgs/development/interpreters/guile/gcov-file-name.patch b/pkgs/development/interpreters/guile/gcov-file-name.patch deleted file mode 100644 index f144296170ed..000000000000 --- a/pkgs/development/interpreters/guile/gcov-file-name.patch +++ /dev/null @@ -1,42 +0,0 @@ -This patch arranges so that we don't end up, with profiling builds, with a -file named `.gcov' since that confuses lcov: - - :cannot open source file - geninfo: ERROR: cannot read .gcov! - ---- guile/libguile/c-tokenize.c 2009-09-13 13:05:15.000000000 +0200 -+++ guile/libguile/c-tokenize.c 2009-10-28 16:24:15.000000000 +0100 -@@ -1,5 +1,5 @@ - --#line 3 "" -+#line 3 "c-tokenize.c" - - #define YY_INT_ALIGNED short int - -@@ -616,7 +616,7 @@ int cookie_was_last = 0; - #define IS_COOKIE cookie_was_last = 1 - #define IS_NOT_COOKIE cookie_was_last = 0 - --#line 620 "" -+#line 620 "c-tokenize.c" - - #define INITIAL 0 - -@@ -799,7 +799,7 @@ YY_DECL - #line 65 "./c-tokenize.lex" - - --#line 803 "" -+#line 803 "c-tokenize.c" - - if ( !(yy_init) ) - { -@@ -1235,7 +1235,7 @@ YY_RULE_SETUP - #line 181 "./c-tokenize.lex" - ECHO; - YY_BREAK --#line 1239 "" -+#line 1239 "c-tokenize.c" - case YY_STATE_EOF(INITIAL): - yyterminate(); -