diff options
-rw-r--r-- | pkgs/development/compilers/ghc/common-hadrian.nix | 4 | ||||
-rw-r--r-- | pkgs/development/haskell-modules/configuration-common.nix | 11 | ||||
-rw-r--r-- | pkgs/development/haskell-modules/patches/portmidi-alsa-plugins.patch | 31 | ||||
-rw-r--r-- | pkgs/tools/compression/lbzip2/default.nix | 13 | ||||
-rw-r--r-- | pkgs/tools/networking/dq/default.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/release-haskell.nix | 18 |
6 files changed, 74 insertions, 7 deletions
diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 09956a38bce4..f4d2a279a678 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -514,6 +514,10 @@ stdenv.mkDerivation ({ # Expose hadrian used for bootstrapping, for debugging purposes inherit hadrian; + + # TODO(@sternenseemann): there's no stage0:exe:haddock target by default, + # so haddock isn't available for GHC cross-compilers. Can we fix that? + hasHaddock = stdenv.hostPlatform == stdenv.targetPlatform; }; meta = { diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index e9e2dcc86fb2..3ea510b7da68 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1322,6 +1322,17 @@ self: super: { testToolDepends = (drv.testToolDepends or []) ++ [pkgs.postgresql]; }) super.beam-postgres; + # PortMidi needs an environment variable to have ALSA find its plugins: + # https://github.com/NixOS/nixpkgs/issues/6860 + PortMidi = overrideCabal (drv: { + patches = (drv.patches or []) ++ [ ./patches/portmidi-alsa-plugins.patch ]; + postPatch = (drv.postPatch or "") + '' + substituteInPlace portmidi/pm_linux/pmlinuxalsa.c \ + --replace @alsa_plugin_dir@ "${pkgs.alsa-plugins}/lib/alsa-lib" + ''; + }) super.PortMidi; + + # Fix for base >= 4.11 scat = overrideCabal (drv: { patches = [ # Fix build with base >= 4.11 diff --git a/pkgs/development/haskell-modules/patches/portmidi-alsa-plugins.patch b/pkgs/development/haskell-modules/patches/portmidi-alsa-plugins.patch new file mode 100644 index 000000000000..13860b7cfb7f --- /dev/null +++ b/pkgs/development/haskell-modules/patches/portmidi-alsa-plugins.patch @@ -0,0 +1,31 @@ +diff -Naurd PortMidi-0.2.0.0/portmidi/pm_linux/pmlinuxalsa.c PortMidi-0.2.0.0-alsafix/portmidi/pm_linux/pmlinuxalsa.c +--- PortMidi-0.2.0.0/portmidi/pm_linux/pmlinuxalsa.c 2023-12-13 11:35:12.517413022 +0000 ++++ PortMidi-0.2.0.0-alsafix/portmidi/pm_linux/pmlinuxalsa.c 2023-12-13 11:35:12.565413037 +0000 +@@ -719,6 +719,18 @@ + } + + ++static void set_alsa_plugin_path( void ) ++{ ++ char *existing; ++ ++ existing = getenv("ALSA_PLUGIN_DIR"); ++ if (NULL != existing) { ++ return; ++ } ++ setenv("ALSA_PLUGIN_DIR", "@alsa_plugin_dir@", 0); ++} ++ ++ + PmError pm_linuxalsa_init( void ) + { + int err; +@@ -726,6 +738,8 @@ + snd_seq_port_info_t *pinfo; + unsigned int caps; + ++ set_alsa_plugin_path(); ++ + /* Previously, the last parameter was SND_SEQ_NONBLOCK, but this + * would cause messages to be dropped if the ALSA buffer fills up. + * The correct behavior is for writes to block until there is diff --git a/pkgs/tools/compression/lbzip2/default.nix b/pkgs/tools/compression/lbzip2/default.nix index 6d4017ac62ca..2e7557a310e5 100644 --- a/pkgs/tools/compression/lbzip2/default.nix +++ b/pkgs/tools/compression/lbzip2/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, gnulib, perl, autoconf, automake }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, gnulib, perl, autoconf, automake }: stdenv.mkDerivation rec { pname = "lbzip2"; @@ -11,6 +11,17 @@ stdenv.mkDerivation rec { sha256 = "1h321wva6fp6khz6x0i6rqb76xh327nw6v5jhgjpcckwdarj5jv8"; }; + patches = [ + # This avoids an implicit function declaration when building gnulib's + # xmalloc.c, addressing a build failure with future compiler version. + # https://github.com/kjn/lbzip2/pull/33 + (fetchpatch { + name = "GNULIB_XALLOC_DIE.patch"; + url = "https://github.com/kjn/lbzip2/commit/32b5167940ec817e454431956040734af405a9de.patch"; + hash = "sha256-YNgmkh4bksIq5kBgZP+8o97aMm9CzFZldfUW6L5DGXk="; + }) + ]; + buildInputs = [ gnulib perl ]; nativeBuildInputs = [ autoconf automake ]; diff --git a/pkgs/tools/networking/dq/default.nix b/pkgs/tools/networking/dq/default.nix index e166a19ce4dd..94bf2cd5c3b2 100644 --- a/pkgs/tools/networking/dq/default.nix +++ b/pkgs/tools/networking/dq/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "dq"; - version = "20230101"; + version = "20240101"; src = fetchFromGitHub { owner = "janmojzis"; repo = "dq"; rev = "refs/tags/${version}"; - hash = "sha256-K96yOonOYSsz26Bf/vx9XtWs7xyY0Dpxdd55OMbQz8k="; + hash = "sha256-dN2QpQU2jRkSVzaYh2MKbJvx0J1XACHHjsM/ePvZAp8="; }; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index a05639898dc1..73e3e9d32993 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -416,7 +416,7 @@ let # Test some statically linked packages to catch regressions # and get some cache going for static compilation with GHC. - # Use integer-simple to avoid GMP linking problems (LGPL) + # Use native-bignum to avoid GMP linking problems (LGPL) pkgsStatic = removePlatforms [ @@ -438,8 +438,8 @@ let ; }; - haskell.packages.native-bignum.ghc928 = { - inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc928) + haskell.packages.native-bignum.ghc948 = { + inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc948) hello lens random @@ -449,6 +449,15 @@ let xhtml # isn't bundled for cross ; }; + + haskell.packages.native-bignum.ghc981 = { + inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc981) + hello + random + QuickCheck + terminfo # isn't bundled for cross + ; + }; }; pkgsCross.ghcjs = @@ -671,8 +680,9 @@ let ]; }; constituents = accumulateDerivations [ + jobs.pkgsStatic.haskell.packages.native-bignum.ghc948 # non-hadrian jobs.pkgsStatic.haskellPackages - jobs.pkgsStatic.haskell.packages.native-bignum.ghc928 + jobs.pkgsStatic.haskell.packages.native-bignum.ghc981 ]; }; } |