haskell: switch from haskell.lib to haskell.lib.compose

This commit is contained in:
Ellie Hermaszewska 2021-10-26 18:20:34 +08:00
parent 518f09f2d0
commit 15ae25f36c
No known key found for this signature in database
GPG Key ID: C8116E3A0C1CA76A
32 changed files with 635 additions and 629 deletions

View File

@ -14,13 +14,13 @@ let
plugins = plugins =
if pluginSupport if pluginSupport
then plain then plain
else haskell.lib.disableCabalFlag plain "plugins"; else haskell.lib.compose.disableCabalFlag "plugins" plain;
static = haskell.lib.justStaticExecutables plugins; static = haskell.lib.compose.justStaticExecutables plugins;
in in
(haskell.lib.overrideCabal static (drv: { (haskell.lib.compose.overrideCabal (drv: {
buildTools = (drv.buildTools or []) ++ [ removeReferencesTo ]; buildTools = (drv.buildTools or []) ++ [ removeReferencesTo ];
})).overrideAttrs (drv: { }) static).overrideAttrs (drv: {
# These libraries are still referenced, because they generate # These libraries are still referenced, because they generate
# a `Paths_*` module for figuring out their version. # a `Paths_*` module for figuring out their version.

View File

@ -18,11 +18,11 @@ let
arion = arion =
justStaticExecutables ( justStaticExecutables (
overrideCabal overrideCabal
arion-compose
cabalOverrides cabalOverrides
arion-compose
); );
inherit (haskell.lib) justStaticExecutables overrideCabal; inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
inherit (haskellPackages) arion-compose; inherit (haskellPackages) arion-compose;

View File

@ -8,9 +8,9 @@ let
fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; }; fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };
hsPkgs = haskellPackages.override { hsPkgs = haskellPackages.override {
overrides = self: super: with haskell.lib; with lib; overrides = self: super: with haskell.lib.compose; with lib;
let elmPkgs = rec { let elmPkgs = rec {
elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: { elm = overrideCabal (drv: {
# sadly with parallelism most of the time breaks compilation # sadly with parallelism most of the time breaks compilation
enableParallelBuilding = false; enableParallelBuilding = false;
preConfigure = self.fetchElmDeps { preConfigure = self.fetchElmDeps {
@ -29,22 +29,22 @@ let
homepage = "https://elm-lang.org/"; homepage = "https://elm-lang.org/";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = with maintainers; [ domenkozar turbomack ]; maintainers = with maintainers; [ domenkozar turbomack ];
}); }) (self.callPackage ./packages/elm.nix { });
/* /*
The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo: The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo:
`package/nix/build.sh` `package/nix/build.sh`
*/ */
elm-format = justStaticExecutables (overrideCabal (self.callPackage ./packages/elm-format.nix {}) (drv: { elm-format = justStaticExecutables (overrideCabal (drv: {
jailbreak = true; jailbreak = true;
description = "Formats Elm source code according to a standard set of rules based on the official Elm Style Guide"; description = "Formats Elm source code according to a standard set of rules based on the official Elm Style Guide";
homepage = "https://github.com/avh4/elm-format"; homepage = "https://github.com/avh4/elm-format";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = with maintainers; [ avh4 turbomack ]; maintainers = with maintainers; [ avh4 turbomack ];
})); }) (self.callPackage ./packages/elm-format.nix {}));
elmi-to-json = justStaticExecutables (overrideCabal (self.callPackage ./packages/elmi-to-json.nix {}) (drv: { elmi-to-json = justStaticExecutables (overrideCabal (drv: {
prePatch = '' prePatch = ''
substituteInPlace package.yaml --replace "- -Werror" "" substituteInPlace package.yaml --replace "- -Werror" ""
hpack hpack
@ -55,9 +55,9 @@ let
homepage = "https://github.com/stoeffel/elmi-to-json"; homepage = "https://github.com/stoeffel/elmi-to-json";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = [ maintainers.turbomack ]; maintainers = [ maintainers.turbomack ];
})); }) (self.callPackage ./packages/elmi-to-json.nix {}));
elm-instrument = justStaticExecutables (overrideCabal (self.callPackage ./packages/elm-instrument.nix {}) (drv: { elm-instrument = justStaticExecutables (overrideCabal (drv: {
prePatch = '' prePatch = ''
sed "s/desc <-.*/let desc = \"${drv.version}\"/g" Setup.hs --in-place sed "s/desc <-.*/let desc = \"${drv.version}\"/g" Setup.hs --in-place
''; '';
@ -69,7 +69,7 @@ let
homepage = "https://github.com/zwilias/elm-instrument"; homepage = "https://github.com/zwilias/elm-instrument";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = [ maintainers.turbomack ]; maintainers = [ maintainers.turbomack ];
})); }) (self.callPackage ./packages/elm-instrument.nix {}));
inherit fetchElmDeps; inherit fetchElmDeps;
elmVersion = elmPkgs.elm.version; elmVersion = elmPkgs.elm.version;

View File

@ -16,14 +16,14 @@ let
curry-frontend = (haskellPackages.override { curry-frontend = (haskellPackages.override {
overrides = self: super: { overrides = self: super: {
curry-base = haskell.lib.overrideCabal (super.callPackage ./curry-base.nix {}) (drv: { curry-base = haskell.lib.compose.overrideCabal (drv: {
inherit src; inherit src;
postUnpack = "sourceRoot+=/frontend/curry-base"; postUnpack = "sourceRoot+=/frontend/curry-base";
}); }) (super.callPackage ./curry-base.nix {});
curry-frontend = haskell.lib.overrideCabal (super.callPackage ./curry-frontend.nix {}) (drv: { curry-frontend = haskell.lib.compose.overrideCabal (drv: {
inherit src; inherit src;
postUnpack = "sourceRoot+=/frontend/curry-frontend"; postUnpack = "sourceRoot+=/frontend/curry-frontend";
}); }) (super.callPackage ./curry-frontend.nix {});
}; };
}).curry-frontend; }).curry-frontend;
in stdenv.mkDerivation { in stdenv.mkDerivation {

File diff suppressed because it is too large Load Diff

View File

@ -18,21 +18,21 @@ self: super: ({
__darwinAllowLocalNetworking = true; __darwinAllowLocalNetworking = true;
}); });
halive = addBuildDepend super.halive darwin.apple_sdk.frameworks.AppKit; halive = addBuildDepend darwin.apple_sdk.frameworks.AppKit super.halive;
# Hakyll's tests are broken on Darwin (3 failures); and they require util-linux # Hakyll's tests are broken on Darwin (3 failures); and they require util-linux
hakyll = overrideCabal super.hakyll { hakyll = overrideCabal {
testToolDepends = []; testToolDepends = [];
doCheck = false; doCheck = false;
}; } super.hakyll;
barbly = addBuildDepend super.barbly darwin.apple_sdk.frameworks.AppKit; barbly = addBuildDepend darwin.apple_sdk.frameworks.AppKit super.barbly;
double-conversion = addExtraLibrary super.double-conversion pkgs.libcxx; double-conversion = addExtraLibrary pkgs.libcxx super.double-conversion;
apecs-physics = addPkgconfigDepends super.apecs-physics [ apecs-physics = addPkgconfigDepends [
darwin.apple_sdk.frameworks.ApplicationServices darwin.apple_sdk.frameworks.ApplicationServices
]; ] super.apecs-physics;
# "erf table" test fails on Darwin # "erf table" test fails on Darwin
# https://github.com/bos/math-functions/issues/63 # https://github.com/bos/math-functions/issues/63
@ -40,11 +40,11 @@ self: super: ({
# darwin doesn't have sub-second resolution # darwin doesn't have sub-second resolution
# https://github.com/hspec/mockery/issues/11 # https://github.com/hspec/mockery/issues/11
mockery = overrideCabal super.mockery (drv: { mockery = overrideCabal (drv: {
preCheck = '' preCheck = ''
export TRAVIS=true export TRAVIS=true
'' + (drv.preCheck or ""); '' + (drv.preCheck or "");
}); }) super.mockery;
# https://github.com/ndmitchell/shake/issues/206 # https://github.com/ndmitchell/shake/issues/206
shake = dontCheck super.shake; shake = dontCheck super.shake;
@ -53,18 +53,18 @@ self: super: ({
# gtk/gtk3 needs to be told on Darwin to use the Quartz # gtk/gtk3 needs to be told on Darwin to use the Quartz
# rather than X11 backend (see eg https://github.com/gtk2hs/gtk2hs/issues/249). # rather than X11 backend (see eg https://github.com/gtk2hs/gtk2hs/issues/249).
gtk3 = appendConfigureFlag super.gtk3 "-f have-quartz-gtk"; gtk3 = appendConfigureFlag "-f have-quartz-gtk" super.gtk3;
gtk = appendConfigureFlag super.gtk "-f have-quartz-gtk"; gtk = appendConfigureFlag "-f have-quartz-gtk" super.gtk;
OpenAL = addExtraLibrary super.OpenAL darwin.apple_sdk.frameworks.OpenAL; OpenAL = addExtraLibrary darwin.apple_sdk.frameworks.OpenAL super.OpenAL;
al = overrideCabal super.al (drv: { al = overrideCabal (drv: {
libraryFrameworkDepends = [ libraryFrameworkDepends = [
darwin.apple_sdk.frameworks.OpenAL darwin.apple_sdk.frameworks.OpenAL
] ++ (drv.libraryFrameworkDepends or []); ] ++ (drv.libraryFrameworkDepends or []);
}); }) super.al;
proteaaudio = addExtraLibrary super.proteaaudio darwin.apple_sdk.frameworks.AudioToolbox; proteaaudio = addExtraLibrary darwin.apple_sdk.frameworks.AudioToolbox super.proteaaudio;
# the system-fileio tests use canonicalizePath, which fails in the sandbox # the system-fileio tests use canonicalizePath, which fails in the sandbox
system-fileio = dontCheck super.system-fileio; system-fileio = dontCheck super.system-fileio;
@ -80,17 +80,17 @@ self: super: ({
# TODO(matthewbauer): If someone really needs this to work in sandboxes, # TODO(matthewbauer): If someone really needs this to work in sandboxes,
# I think we can add a propagatedImpureHost dep here, but Im hoping to # I think we can add a propagatedImpureHost dep here, but Im hoping to
# get a proper fix available soonish. # get a proper fix available soonish.
x509-system = overrideCabal super.x509-system (drv: x509-system = overrideCabal (drv:
lib.optionalAttrs (!pkgs.stdenv.cc.nativeLibc) { lib.optionalAttrs (!pkgs.stdenv.cc.nativeLibc) {
postPatch = '' postPatch = ''
substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security
'' + (drv.postPatch or ""); '' + (drv.postPatch or "");
}); }) super.x509-system;
# https://github.com/haskell-foundation/foundation/pull/412 # https://github.com/haskell-foundation/foundation/pull/412
foundation = dontCheck super.foundation; foundation = dontCheck super.foundation;
llvm-hs = overrideCabal super.llvm-hs (oldAttrs: { llvm-hs = overrideCabal (oldAttrs: {
# One test fails on darwin. # One test fails on darwin.
doCheck = false; doCheck = false;
# llvm-hs's Setup.hs file tries to add the lib/ directory from LLVM8 to # llvm-hs's Setup.hs file tries to add the lib/ directory from LLVM8 to
@ -100,20 +100,20 @@ self: super: ({
preCompileBuildDriver = '' preCompileBuildDriver = ''
substituteInPlace Setup.hs --replace "addToLdLibraryPath libDir" "pure ()" substituteInPlace Setup.hs --replace "addToLdLibraryPath libDir" "pure ()"
'' + (oldAttrs.preCompileBuildDriver or ""); '' + (oldAttrs.preCompileBuildDriver or "");
}); }) super.llvm-hs;
yesod-bin = addBuildDepend super.yesod-bin darwin.apple_sdk.frameworks.Cocoa; yesod-bin = addBuildDepend darwin.apple_sdk.frameworks.Cocoa super.yesod-bin;
hmatrix = addBuildDepend super.hmatrix darwin.apple_sdk.frameworks.Accelerate; hmatrix = addBuildDepend darwin.apple_sdk.frameworks.Accelerate super.hmatrix;
blas-hs = overrideCabal super.blas-hs (drv: { blas-hs = overrideCabal (drv: {
libraryFrameworkDepends = [ libraryFrameworkDepends = [
darwin.apple_sdk.frameworks.Accelerate darwin.apple_sdk.frameworks.Accelerate
] ++ (drv.libraryFrameworkDepends or []); ] ++ (drv.libraryFrameworkDepends or []);
}); }) super.blas-hs;
# Ensure the necessary frameworks are propagatedBuildInputs on darwin # Ensure the necessary frameworks are propagatedBuildInputs on darwin
OpenGLRaw = overrideCabal super.OpenGLRaw (drv: { OpenGLRaw = overrideCabal (drv: {
librarySystemDepends = []; librarySystemDepends = [];
libraryHaskellDepends = drv.libraryHaskellDepends ++ [ libraryHaskellDepends = drv.libraryHaskellDepends ++ [
darwin.apple_sdk.frameworks.OpenGL darwin.apple_sdk.frameworks.OpenGL
@ -123,14 +123,14 @@ self: super: ({
frameworkPaths=$(IFS=, ; echo "''${frameworkPaths[@]}") frameworkPaths=$(IFS=, ; echo "''${frameworkPaths[@]}")
configureFlags+=$(if [ -n "$frameworkPaths" ]; then echo -n "--ghc-options=-optl=$frameworkPaths"; fi) configureFlags+=$(if [ -n "$frameworkPaths" ]; then echo -n "--ghc-options=-optl=$frameworkPaths"; fi)
'' + (drv.preConfigure or ""); '' + (drv.preConfigure or "");
}); }) super.OpenGLRaw;
GLURaw = overrideCabal super.GLURaw (drv: { GLURaw = overrideCabal (drv: {
librarySystemDepends = []; librarySystemDepends = [];
libraryHaskellDepends = drv.libraryHaskellDepends ++ [ libraryHaskellDepends = drv.libraryHaskellDepends ++ [
darwin.apple_sdk.frameworks.OpenGL darwin.apple_sdk.frameworks.OpenGL
]; ];
}); }) super.GLURaw;
bindings-GLFW = overrideCabal super.bindings-GLFW (drv: { bindings-GLFW = overrideCabal (drv: {
librarySystemDepends = []; librarySystemDepends = [];
libraryHaskellDepends = drv.libraryHaskellDepends ++ [ libraryHaskellDepends = drv.libraryHaskellDepends ++ [
darwin.apple_sdk.frameworks.AGL darwin.apple_sdk.frameworks.AGL
@ -141,13 +141,13 @@ self: super: ({
darwin.apple_sdk.frameworks.CoreVideo darwin.apple_sdk.frameworks.CoreVideo
darwin.CF darwin.CF
]; ];
}); }) super.bindings-GLFW;
OpenCL = overrideCabal super.OpenCL (drv: { OpenCL = overrideCabal (drv: {
librarySystemDepends = []; librarySystemDepends = [];
libraryHaskellDepends = drv.libraryHaskellDepends ++ [ libraryHaskellDepends = drv.libraryHaskellDepends ++ [
darwin.apple_sdk.frameworks.OpenCL darwin.apple_sdk.frameworks.OpenCL
]; ];
}); }) super.OpenCL;
# cabal2nix likes to generate dependencies on hinotify when hfsevents is # cabal2nix likes to generate dependencies on hinotify when hfsevents is
# really required on darwin: https://github.com/NixOS/cabal2nix/issues/146. # really required on darwin: https://github.com/NixOS/cabal2nix/issues/146.
@ -155,37 +155,37 @@ self: super: ({
# FSEvents API is very buggy and tests are unreliable. See # FSEvents API is very buggy and tests are unreliable. See
# http://openradar.appspot.com/10207999 and similar issues. # http://openradar.appspot.com/10207999 and similar issues.
fsnotify = addBuildDepend (dontCheck super.fsnotify) fsnotify = addBuildDepend darwin.apple_sdk.frameworks.Cocoa
darwin.apple_sdk.frameworks.Cocoa; (dontCheck super.fsnotify);
FractalArt = overrideCabal super.FractalArt (drv: { FractalArt = overrideCabal (drv: {
librarySystemDepends = [ librarySystemDepends = [
darwin.libobjc darwin.libobjc
darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.AppKit
] ++ (drv.librarySystemDepends or []); ] ++ (drv.librarySystemDepends or []);
}); }) super.FractalArt;
arbtt = overrideCabal super.arbtt (drv: { arbtt = overrideCabal (drv: {
librarySystemDepends = [ librarySystemDepends = [
darwin.apple_sdk.frameworks.Foundation darwin.apple_sdk.frameworks.Foundation
darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Carbon
darwin.apple_sdk.frameworks.IOKit darwin.apple_sdk.frameworks.IOKit
] ++ (drv.librarySystemDepends or []); ] ++ (drv.librarySystemDepends or []);
}); }) super.arbtt;
HTF = overrideCabal super.HTF (drv: { HTF = overrideCabal (drv: {
# GNU find is not prefixed in stdenv # GNU find is not prefixed in stdenv
postPatch = '' postPatch = ''
substituteInPlace scripts/local-htfpp --replace "find=gfind" "find=find" substituteInPlace scripts/local-htfpp --replace "find=gfind" "find=find"
'' + (drv.postPatch or ""); '' + (drv.postPatch or "");
}); }) super.HTF;
# conditional dependency via a cabal flag # conditional dependency via a cabal flag
cas-store = overrideCabal super.cas-store (drv: { cas-store = overrideCabal (drv: {
libraryHaskellDepends = [ libraryHaskellDepends = [
self.kqueue self.kqueue
] ++ (drv.libraryHaskellDepends or []); ] ++ (drv.libraryHaskellDepends or []);
}); }) super.cas-store;
# 2021-05-25: Tests fail and I have no way to debug them. # 2021-05-25: Tests fail and I have no way to debug them.
hls-class-plugin = dontCheck super.hls-class-plugin; hls-class-plugin = dontCheck super.hls-class-plugin;
@ -204,13 +204,13 @@ self: super: ({
# On darwin librt doesn't exist and will fail to link against, # On darwin librt doesn't exist and will fail to link against,
# however linking against it is also not necessary there # however linking against it is also not necessary there
GLHUI = overrideCabal super.GLHUI (drv: { GLHUI = overrideCabal (drv: {
postPatch = '' postPatch = ''
substituteInPlace GLHUI.cabal --replace " rt" "" substituteInPlace GLHUI.cabal --replace " rt" ""
'' + (drv.postPatch or ""); '' + (drv.postPatch or "");
}); }) super.GLHUI;
SDL-image = overrideCabal super.SDL-image (drv: { SDL-image = overrideCabal (drv: {
# Prevent darwin-specific configuration code path being taken # Prevent darwin-specific configuration code path being taken
# which doesn't work with nixpkgs' SDL libraries # which doesn't work with nixpkgs' SDL libraries
postPatch = '' postPatch = ''
@ -220,18 +220,18 @@ self: super: ({
# Work around SDL_main.h redefining main to SDL_main # Work around SDL_main.h redefining main to SDL_main
./patches/SDL-image-darwin-hsc.patch ./patches/SDL-image-darwin-hsc.patch
]; ];
}); }) super.SDL-image;
# Prevent darwin-specific configuration code path being taken which # Prevent darwin-specific configuration code path being taken which
# doesn't work with nixpkgs' SDL libraries # doesn't work with nixpkgs' SDL libraries
SDL-mixer = overrideCabal super.SDL-mixer (drv: { SDL-mixer = overrideCabal (drv: {
postPatch = '' postPatch = ''
substituteInPlace configure --replace xDarwin noDarwinSpecialCasing substituteInPlace configure --replace xDarwin noDarwinSpecialCasing
'' + (drv.postPatch or ""); '' + (drv.postPatch or "");
}); }) super.SDL-mixer;
# Work around SDL_main.h redefining main to SDL_main # Work around SDL_main.h redefining main to SDL_main
SDL-ttf = appendPatch super.SDL-ttf ./patches/SDL-ttf-darwin-hsc.patch; SDL-ttf = appendPatch ./patches/SDL-ttf-darwin-hsc.patch super.SDL-ttf;
# Disable a bunch of test suites that fail because of darwin's case insensitive # Disable a bunch of test suites that fail because of darwin's case insensitive
# file system: When a test suite has a test suite file that has the same name # file system: When a test suite has a test suite file that has the same name
@ -252,7 +252,7 @@ self: super: ({
acid-state = dontCheck super.acid-state; acid-state = dontCheck super.acid-state;
# Otherwise impure gcc is used, which is Apple's weird wrapper # Otherwise impure gcc is used, which is Apple's weird wrapper
c2hsc = addTestToolDepends super.c2hsc [ pkgs.gcc ]; c2hsc = addTestToolDepends [ pkgs.gcc ] super.c2hsc;
} // lib.optionalAttrs pkgs.stdenv.isAarch64 { # aarch64-darwin } // lib.optionalAttrs pkgs.stdenv.isAarch64 { # aarch64-darwin

View File

@ -72,20 +72,20 @@ self: super: {
shower = doJailbreak super.shower; shower = doJailbreak super.shower;
# The shipped Setup.hs file is broken. # The shipped Setup.hs file is broken.
csv = overrideCabal super.csv (drv: { preCompileBuildDriver = "rm Setup.hs"; }); csv = overrideCabal (drv: { preCompileBuildDriver = "rm Setup.hs"; }) super.csv;
# Apply patch from https://github.com/finnsson/template-helper/issues/12#issuecomment-611795375 to fix the build. # Apply patch from https://github.com/finnsson/template-helper/issues/12#issuecomment-611795375 to fix the build.
language-haskell-extract = appendPatch (doJailbreak super.language-haskell-extract) (pkgs.fetchpatch { language-haskell-extract = appendPatch (pkgs.fetchpatch {
name = "language-haskell-extract-0.2.4.patch"; name = "language-haskell-extract-0.2.4.patch";
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/e48738ee1be774507887a90a0d67ad1319456afc/patches/language-haskell-extract-0.2.4.patch?inline=false"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/e48738ee1be774507887a90a0d67ad1319456afc/patches/language-haskell-extract-0.2.4.patch?inline=false";
sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f"; sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f";
}); }) (doJailbreak super.language-haskell-extract);
# hnix 0.9.0 does not provide an executable for ghc < 8.10, so define completions here for now. # hnix 0.9.0 does not provide an executable for ghc < 8.10, so define completions here for now.
hnix = generateOptparseApplicativeCompletion "hnix" hnix = generateOptparseApplicativeCompletion "hnix"
(overrideCabal super.hnix (drv: { (overrideCabal (drv: {
# executable is allowed for ghc >= 8.10 and needs repline # executable is allowed for ghc >= 8.10 and needs repline
executableHaskellDepends = drv.executableToolDepends or [] ++ [ self.repline ]; executableHaskellDepends = drv.executableToolDepends or [] ++ [ self.repline ];
})); }) super.hnix);
} }

View File

@ -90,13 +90,13 @@ self: super: {
haddock-library_1_7_0 = dontCheck super.haddock-library_1_7_0; haddock-library_1_7_0 = dontCheck super.haddock-library_1_7_0;
# ghc versions prior to 8.8.x needs additional dependency to compile successfully. # ghc versions prior to 8.8.x needs additional dependency to compile successfully.
ghc-lib-parser-ex = addBuildDepend super.ghc-lib-parser-ex self.ghc-lib-parser; ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser super.ghc-lib-parser-ex;
# This became a core library in ghc 8.10., so we dont have an "exception" attribute anymore. # This became a core library in ghc 8.10., so we dont have an "exception" attribute anymore.
exceptions = super.exceptions_0_10_4; exceptions = super.exceptions_0_10_4;
# Older compilers need the latest ghc-lib to build this package. # Older compilers need the latest ghc-lib to build this package.
hls-hlint-plugin = addBuildDepend super.hls-hlint-plugin self.ghc-lib; hls-hlint-plugin = addBuildDepend self.ghc-lib super.hls-hlint-plugin;
# vector 0.12.2 indroduced doctest checks that dont work on older compilers # vector 0.12.2 indroduced doctest checks that dont work on older compilers
vector = dontCheck super.vector; vector = dontCheck super.vector;

View File

@ -85,10 +85,10 @@ self: super: {
vault = dontHaddock super.vault; vault = dontHaddock super.vault;
# https://github.com/snapframework/snap-core/issues/288 # https://github.com/snapframework/snap-core/issues/288
snap-core = overrideCabal super.snap-core (drv: { prePatch = "substituteInPlace src/Snap/Internal/Core.hs --replace 'fail = Fail.fail' ''"; }); snap-core = overrideCabal (drv: { prePatch = "substituteInPlace src/Snap/Internal/Core.hs --replace 'fail = Fail.fail' ''"; }) super.snap-core;
# Upstream ships a broken Setup.hs file. # Upstream ships a broken Setup.hs file.
csv = overrideCabal super.csv (drv: { prePatch = "rm Setup.hs"; }); csv = overrideCabal (drv: { prePatch = "rm Setup.hs"; }) super.csv;
# https://github.com/kowainik/relude/issues/241 # https://github.com/kowainik/relude/issues/241
relude = dontCheck super.relude; relude = dontCheck super.relude;
@ -120,10 +120,10 @@ self: super: {
# ghc versions which dont match the ghc-lib-parser-ex version need the # ghc versions which dont match the ghc-lib-parser-ex version need the
# additional dependency to compile successfully. # additional dependency to compile successfully.
ghc-lib-parser-ex = addBuildDepend super.ghc-lib-parser-ex self.ghc-lib-parser; ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser super.ghc-lib-parser-ex;
# Older compilers need the latest ghc-lib to build this package. # Older compilers need the latest ghc-lib to build this package.
hls-hlint-plugin = addBuildDepend super.hls-hlint-plugin self.ghc-lib; hls-hlint-plugin = addBuildDepend self.ghc-lib super.hls-hlint-plugin;
# vector 0.12.2 indroduced doctest checks that dont work on older compilers # vector 0.12.2 indroduced doctest checks that dont work on older compilers
vector = dontCheck super.vector; vector = dontCheck super.vector;

View File

@ -55,10 +55,10 @@ self: super: {
dec = doJailbreak super.dec; dec = doJailbreak super.dec;
ed25519 = doJailbreak super.ed25519; ed25519 = doJailbreak super.ed25519;
hackage-security = doJailbreak super.hackage-security; hackage-security = doJailbreak super.hackage-security;
hashable = overrideCabal (doJailbreak (dontCheck super.hashable)) (drv: { postPatch = "sed -i -e 's,integer-gmp .*<1.1,integer-gmp < 2,' hashable.cabal"; }); hashable = overrideCabal (drv: { postPatch = "sed -i -e 's,integer-gmp .*<1.1,integer-gmp < 2,' hashable.cabal"; }) (doJailbreak (dontCheck super.hashable));
hashable-time = doJailbreak super.hashable-time; hashable-time = doJailbreak super.hashable-time;
HTTP = overrideCabal (doJailbreak super.HTTP) (drv: { postPatch = "sed -i -e 's,! Socket,!Socket,' Network/TCP.hs"; }); HTTP = overrideCabal (drv: { postPatch = "sed -i -e 's,! Socket,!Socket,' Network/TCP.hs"; }) (doJailbreak super.HTTP);
integer-logarithms = overrideCabal (doJailbreak super.integer-logarithms) (drv: { postPatch = "sed -i -e 's,integer-gmp <1.1,integer-gmp < 2,' integer-logarithms.cabal"; }); integer-logarithms = overrideCabal (drv: { postPatch = "sed -i -e 's,integer-gmp <1.1,integer-gmp < 2,' integer-logarithms.cabal"; }) (doJailbreak super.integer-logarithms);
lukko = doJailbreak super.lukko; lukko = doJailbreak super.lukko;
parallel = doJailbreak super.parallel; parallel = doJailbreak super.parallel;
primitive = doJailbreak (dontCheck super.primitive); primitive = doJailbreak (dontCheck super.primitive);
@ -87,15 +87,15 @@ self: super: {
generic-lens_2_2_0_0 = dontCheck super.generic-lens_2_2_0_0; generic-lens_2_2_0_0 = dontCheck super.generic-lens_2_2_0_0;
# Apply patches from head.hackage. # Apply patches from head.hackage.
alex = appendPatch (dontCheck super.alex) (pkgs.fetchpatch { alex = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/fe192e12b88b09499d4aff0e562713e820544bd6/patches/alex-3.2.6.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/fe192e12b88b09499d4aff0e562713e820544bd6/patches/alex-3.2.6.patch";
sha256 = "1rzs764a0nhx002v4fadbys98s6qblw4kx4g46galzjf5f7n2dn4"; sha256 = "1rzs764a0nhx002v4fadbys98s6qblw4kx4g46galzjf5f7n2dn4";
}); }) (dontCheck super.alex);
doctest = dontCheck (doJailbreak super.doctest_0_18_1); doctest = dontCheck (doJailbreak super.doctest_0_18_1);
language-haskell-extract = appendPatch (doJailbreak super.language-haskell-extract) (pkgs.fetchpatch { language-haskell-extract = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/master/patches/language-haskell-extract-0.2.4.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/master/patches/language-haskell-extract-0.2.4.patch";
sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f"; sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f";
}); }) (doJailbreak super.language-haskell-extract);
# The test suite depends on ChasingBottoms, which is broken with ghc-9.0.x. # The test suite depends on ChasingBottoms, which is broken with ghc-9.0.x.
unordered-containers = dontCheck super.unordered-containers; unordered-containers = dontCheck super.unordered-containers;
@ -131,15 +131,15 @@ self: super: {
# Will probably be needed for brittany support # Will probably be needed for brittany support
# https://github.com/lspitzner/czipwith/pull/2 # https://github.com/lspitzner/czipwith/pull/2
#czipwith = appendPatch super.czipwith #czipwith = appendPatch
# (pkgs.fetchpatch { # (pkgs.fetchpatch {
# url = "https://github.com/lspitzner/czipwith/commit/b6245884ae83e00dd2b5261762549b37390179f8.patch"; # url = "https://github.com/lspitzner/czipwith/commit/b6245884ae83e00dd2b5261762549b37390179f8.patch";
# sha256 = "08rpppdldsdwzb09fmn0j55l23pwyls2dyzziw3yjc1cm0j5vic5"; # sha256 = "08rpppdldsdwzb09fmn0j55l23pwyls2dyzziw3yjc1cm0j5vic5";
# }); # }) super.czipwith;
# 2021-09-18: https://github.com/mokus0/th-extras/pull/8 # 2021-09-18: https://github.com/mokus0/th-extras/pull/8
# Release is missing, but asked for in the above PR. # Release is missing, but asked for in the above PR.
th-extras = overrideCabal super.th-extras (old: { th-extras = overrideCabal (old: {
version = assert old.version == "0.0.0.4"; "unstable-2021-09-18"; version = assert old.version == "0.0.0.4"; "unstable-2021-09-18";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "mokus0"; owner = "mokus0";
@ -148,22 +148,22 @@ self: super: {
sha256 = "045f36yagrigrggvyb96zqmw8y42qjsllhhx2h20q25sk5h44xsd"; sha256 = "045f36yagrigrggvyb96zqmw8y42qjsllhhx2h20q25sk5h44xsd";
}; };
libraryHaskellDepends = old.libraryHaskellDepends ++ [self.th-abstraction]; libraryHaskellDepends = old.libraryHaskellDepends ++ [self.th-abstraction];
}); }) super.th-extras;
# 2021-09-18: GHC 9 compat release is missing # 2021-09-18: GHC 9 compat release is missing
# Issue: https://github.com/obsidiansystems/dependent-sum/issues/65 # Issue: https://github.com/obsidiansystems/dependent-sum/issues/65
dependent-sum-template = dontCheck (appendPatch super.dependent-sum-template dependent-sum-template = dontCheck (appendPatch
(pkgs.fetchpatch { (pkgs.fetchpatch {
url = "https://github.com/obsidiansystems/dependent-sum/commit/8cf4c7fbc3bfa2be475a17bb7c94a1e1e9a830b5.patch"; url = "https://github.com/obsidiansystems/dependent-sum/commit/8cf4c7fbc3bfa2be475a17bb7c94a1e1e9a830b5.patch";
sha256 = "02wyy0ciicq2x8lw4xxz3x5i4a550mxfidhm2ihh60ni6am498ff"; sha256 = "02wyy0ciicq2x8lw4xxz3x5i4a550mxfidhm2ihh60ni6am498ff";
stripLen = 2; stripLen = 2;
extraPrefix = ""; extraPrefix = "";
})); }) super.dependent-sum-template);
# 2021-09-18: cabal2nix does not detect the need for ghc-api-compat. # 2021-09-18: cabal2nix does not detect the need for ghc-api-compat.
hiedb = overrideCabal super.hiedb (old: { hiedb = overrideCabal (old: {
libraryHaskellDepends = old.libraryHaskellDepends ++ [self.ghc-api-compat]; libraryHaskellDepends = old.libraryHaskellDepends ++ [self.ghc-api-compat];
}); }) super.hiedb;
# 2021-09-18: Need path >= 0.9.0 for ghc 9 compat # 2021-09-18: Need path >= 0.9.0 for ghc 9 compat
path = self.path_0_9_0; path = self.path_0_9_0;
@ -174,16 +174,7 @@ self: super: {
hls-ormolu-plugin = doJailbreak super.hls-ormolu-plugin; hls-ormolu-plugin = doJailbreak super.hls-ormolu-plugin;
# 2021-09-18: The following plugins dont work yet on ghc9. # 2021-09-18: The following plugins dont work yet on ghc9.
haskell-language-server = appendConfigureFlags (super.haskell-language-server.override { haskell-language-server = appendConfigureFlags [
hls-tactics-plugin = null; # No upstream support, generic-lens-core fail
hls-splice-plugin = null; # No upstream support in hls 1.4.0, should be fixed in 1.5
hls-refine-imports-plugin = null; # same issue es splice-plugin
hls-class-plugin = null; # No upstream support
hls-fourmolu-plugin = null; # No upstream support, needs new fourmolu release
hls-stylish-haskell-plugin = null; # No upstream support
hls-brittany-plugin = null; # No upstream support, needs new brittany release
}) [
"-f-tactic" "-f-tactic"
"-f-splice" "-f-splice"
"-f-refineimports" "-f-refineimports"
@ -192,5 +183,14 @@ self: super: {
"-f-fourmolu" "-f-fourmolu"
"-f-brittany" "-f-brittany"
"-f-stylishhaskell" "-f-stylishhaskell"
]; ] (super.haskell-language-server.override {
hls-tactics-plugin = null; # No upstream support, generic-lens-core fail
hls-splice-plugin = null; # No upstream support in hls 1.4.0, should be fixed in 1.5
hls-refine-imports-plugin = null; # same issue es splice-plugin
hls-class-plugin = null; # No upstream support
hls-fourmolu-plugin = null; # No upstream support, needs new fourmolu release
hls-stylish-haskell-plugin = null; # No upstream support
hls-brittany-plugin = null; # No upstream support, needs new brittany release
});
} }

View File

@ -44,50 +44,50 @@ self: super: {
xhtml = null; xhtml = null;
# Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/20594 # Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/20594
tf-random = overrideCabal super.tf-random { tf-random = overrideCabal {
doHaddock = !pkgs.stdenv.isAarch64; doHaddock = !pkgs.stdenv.isAarch64;
}; } super.tf-random;
aeson = appendPatch (doJailbreak super.aeson) (pkgs.fetchpatch { aeson = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/aeson-1.5.6.0.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/aeson-1.5.6.0.patch";
sha256 = "07rk7f0lhgilxvbg2grpl1p5x25wjf9m7a0wqmi2jr0q61p9a0nl"; sha256 = "07rk7f0lhgilxvbg2grpl1p5x25wjf9m7a0wqmi2jr0q61p9a0nl";
# The revision information is newer than that included in the patch # The revision information is newer than that included in the patch
excludes = ["*.cabal"]; excludes = ["*.cabal"];
}); }) (doJailbreak super.aeson);
# Tests use Data.Semigroup.Option # Tests use Data.Semigroup.Option
aeson_2_0_1_0 = dontCheck (doJailbreak super.aeson_2_0_1_0); aeson_2_0_1_0 = dontCheck (doJailbreak super.aeson_2_0_1_0);
basement = overrideCabal (appendPatch super.basement (pkgs.fetchpatch { basement = overrideCabal (drv: {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/basement-0.0.12.patch";
sha256 = "0c8n2krz827cv87p3vb1vpl3v0k255aysjx9lq44gz3z1dhxd64z";
})) (drv: {
# This is inside a conditional block so `doJailbreak` doesn't work # This is inside a conditional block so `doJailbreak` doesn't work
postPatch = "sed -i -e 's,<4.16,<4.17,' basement.cabal"; postPatch = "sed -i -e 's,<4.16,<4.17,' basement.cabal";
}); }) (appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/basement-0.0.12.patch";
sha256 = "0c8n2krz827cv87p3vb1vpl3v0k255aysjx9lq44gz3z1dhxd64z";
}) super.basement);
cereal = appendPatch (doJailbreak super.cereal) (pkgs.fetchpatch { cereal = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/cereal-0.5.8.1.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/cereal-0.5.8.1.patch";
sha256 = "03v4nxwz9y6viaa8anxcmp4zdf2clczv4pf9fqq6lnpplpz5i128"; sha256 = "03v4nxwz9y6viaa8anxcmp4zdf2clczv4pf9fqq6lnpplpz5i128";
}); }) (doJailbreak super.cereal);
# Tests fail because of typechecking changes # Tests fail because of typechecking changes
conduit = dontCheck super.conduit; conduit = dontCheck super.conduit;
cryptonite = appendPatch super.cryptonite (pkgs.fetchpatch { cryptonite = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/cryptonite-0.29.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/cryptonite-0.29.patch";
sha256 = "1g48lrmqgd88hqvfq3klz7lsrpwrir2v1931myrhh6dy0d9pqj09"; sha256 = "1g48lrmqgd88hqvfq3klz7lsrpwrir2v1931myrhh6dy0d9pqj09";
}); }) super.cryptonite;
# cabal-install needs more recent versions of Cabal # cabal-install needs more recent versions of Cabal
cabal-install = (doJailbreak super.cabal-install).overrideScope (self: super: { cabal-install = (doJailbreak super.cabal-install).overrideScope (self: super: {
Cabal = self.Cabal_3_6_2_0; Cabal = self.Cabal_3_6_2_0;
}); });
doctest = appendPatch (dontCheck (doJailbreak super.doctest_0_18_1)) (pkgs.fetchpatch { doctest = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/doctest-0.18.1.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/doctest-0.18.1.patch";
sha256 = "030kdsk0fg08cgdcjpyv6z8ym1vkkrbd34aacs91y5hqzc9g79y1"; sha256 = "030kdsk0fg08cgdcjpyv6z8ym1vkkrbd34aacs91y5hqzc9g79y1";
}); }) (dontCheck (doJailbreak super.doctest_0_18_1));
# Tests fail in GHC 9.2 # Tests fail in GHC 9.2
extra = dontCheck super.extra; extra = dontCheck super.extra;
@ -103,7 +103,7 @@ self: super: {
binary-orphans = super.binary-orphans_1_0_2; binary-orphans = super.binary-orphans_1_0_2;
ChasingBottoms = doJailbreak super.ChasingBottoms; ChasingBottoms = doJailbreak super.ChasingBottoms;
constraints = doJailbreak super.constraints; constraints = doJailbreak super.constraints;
cpphs = overrideCabal super.cpphs (drv: { postPatch = "sed -i -e 's,time >=1.5 && <1.11,time >=1.5 \\&\\& <1.12,' cpphs.cabal";}); cpphs = overrideCabal (drv: { postPatch = "sed -i -e 's,time >=1.5 && <1.11,time >=1.5 \\&\\& <1.12,' cpphs.cabal";}) super.cpphs;
cryptohash-md5 = doJailbreak super.cryptohash-md5; cryptohash-md5 = doJailbreak super.cryptohash-md5;
cryptohash-sha1 = doJailbreak super.cryptohash-sha1; cryptohash-sha1 = doJailbreak super.cryptohash-sha1;
data-fix = doJailbreak super.data-fix; data-fix = doJailbreak super.data-fix;
@ -117,8 +117,8 @@ self: super: {
hashable = super.hashable_1_4_0_0; hashable = super.hashable_1_4_0_0;
hashable-time = doJailbreak super.hashable-time; hashable-time = doJailbreak super.hashable-time;
hedgehog = doJailbreak super.hedgehog; hedgehog = doJailbreak super.hedgehog;
HTTP = overrideCabal (doJailbreak super.HTTP) (drv: { postPatch = "sed -i -e 's,! Socket,!Socket,' Network/TCP.hs"; }); HTTP = overrideCabal (drv: { postPatch = "sed -i -e 's,! Socket,!Socket,' Network/TCP.hs"; }) (doJailbreak super.HTTP);
integer-logarithms = overrideCabal (doJailbreak super.integer-logarithms) (drv: { postPatch = "sed -i -e 's, <1.1, <1.3,' integer-logarithms.cabal"; }); integer-logarithms = overrideCabal (drv: { postPatch = "sed -i -e 's, <1.1, <1.3,' integer-logarithms.cabal"; }) (doJailbreak super.integer-logarithms);
indexed-traversable = doJailbreak super.indexed-traversable; indexed-traversable = doJailbreak super.indexed-traversable;
indexed-traversable-instances = doJailbreak super.indexed-traversable-instances; indexed-traversable-instances = doJailbreak super.indexed-traversable-instances;
lifted-async = doJailbreak super.lifted-async; lifted-async = doJailbreak super.lifted-async;
@ -126,7 +126,7 @@ self: super: {
network = super.network_3_1_2_5; network = super.network_3_1_2_5;
OneTuple = super.OneTuple_0_3_1; OneTuple = super.OneTuple_0_3_1;
parallel = doJailbreak super.parallel; parallel = doJailbreak super.parallel;
polyparse = overrideCabal (doJailbreak super.polyparse) (drv: { postPatch = "sed -i -e 's, <0.11, <0.12,' polyparse.cabal"; }); polyparse = overrideCabal (drv: { postPatch = "sed -i -e 's, <0.11, <0.12,' polyparse.cabal"; }) (doJailbreak super.polyparse);
primitive = doJailbreak super.primitive; primitive = doJailbreak super.primitive;
quickcheck-instances = super.quickcheck-instances_0_3_26_1; quickcheck-instances = super.quickcheck-instances_0_3_26_1;
regex-posix = doJailbreak super.regex-posix; regex-posix = doJailbreak super.regex-posix;
@ -151,45 +151,45 @@ self: super: {
witherable = doJailbreak super.witherable; witherable = doJailbreak super.witherable;
zlib = doJailbreak super.zlib; zlib = doJailbreak super.zlib;
hpack = overrideCabal (doJailbreak super.hpack) (drv: { hpack = overrideCabal (drv: {
# Cabal 3.6 seems to preserve comments when reading, which makes this test fail # Cabal 3.6 seems to preserve comments when reading, which makes this test fail
# 2021-10-10: 9.2.1 is not yet supported (also no issue) # 2021-10-10: 9.2.1 is not yet supported (also no issue)
testFlags = [ testFlags = [
"--skip=/Hpack/renderCabalFile/is inverse to readCabalFile/" "--skip=/Hpack/renderCabalFile/is inverse to readCabalFile/"
] ++ drv.testFlags or []; ] ++ drv.testFlags or [];
}); }) (doJailbreak super.hpack);
# Patch for TH code from head.hackage # Patch for TH code from head.hackage
vector-th-unbox = appendPatch (doJailbreak super.vector-th-unbox) (pkgs.fetchpatch { vector-th-unbox = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/vector-th-unbox-0.2.1.9.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/vector-th-unbox-0.2.1.9.patch";
sha256 = "02bvvy3hx3cf4y4dr64zl5pjvq8giwk4286j5g1n6k8ikyn2403p"; sha256 = "02bvvy3hx3cf4y4dr64zl5pjvq8giwk4286j5g1n6k8ikyn2403p";
}); }) (doJailbreak super.vector-th-unbox);
# Patch for TH code from head.hackage # Patch for TH code from head.hackage
invariant = appendPatch (doJailbreak super.invariant) (pkgs.fetchpatch { invariant = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/invariant-0.5.4.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/invariant-0.5.4.patch";
sha256 = "17gg8ck4r6qmlbcbpbnqzksgf5q7i891zs6axfzhas6ajncylxvc"; sha256 = "17gg8ck4r6qmlbcbpbnqzksgf5q7i891zs6axfzhas6ajncylxvc";
}); }) (doJailbreak super.invariant);
# base 4.15 support from head.hackage # base 4.15 support from head.hackage
lens = appendPatch (doJailbreak super.lens_5_0_1) (pkgs.fetchpatch { lens = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/lens-5.0.1.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/lens-5.0.1.patch";
sha256 = "1s8qqg7ymvv94dnfnr1ragx91chh9y7ydc4jx25zn361wbn00pv7"; sha256 = "1s8qqg7ymvv94dnfnr1ragx91chh9y7ydc4jx25zn361wbn00pv7";
}); }) (doJailbreak super.lens_5_0_1);
# Syntax error in tests fixed in https://github.com/simonmar/alex/commit/84b29475e057ef744f32a94bc0d3954b84160760 # Syntax error in tests fixed in https://github.com/simonmar/alex/commit/84b29475e057ef744f32a94bc0d3954b84160760
alex = dontCheck super.alex; alex = dontCheck super.alex;
# Apply patches from head.hackage. # Apply patches from head.hackage.
language-haskell-extract = appendPatch (doJailbreak super.language-haskell-extract) (pkgs.fetchpatch { language-haskell-extract = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/language-haskell-extract-0.2.4.patch";
sha256 = "0w4y3v69nd3yafpml4gr23l94bdhbmx8xky48a59lckmz5x9fgxv"; sha256 = "0w4y3v69nd3yafpml4gr23l94bdhbmx8xky48a59lckmz5x9fgxv";
}); }) (doJailbreak super.language-haskell-extract);
haskell-src-meta = appendPatch (doJailbreak super.haskell-src-meta) (pkgs.fetchpatch { haskell-src-meta = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/haskell-src-meta-0.8.7.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/haskell-src-meta-0.8.7.patch";
sha256 = "013k8hpxac226j47cdzgdf9a1j91kmm0cvv7n8zwlajbj3y9bzjp"; sha256 = "013k8hpxac226j47cdzgdf9a1j91kmm0cvv7n8zwlajbj3y9bzjp";
}); }) (doJailbreak super.haskell-src-meta);
# Tests depend on `parseTime` which is no longer available # Tests depend on `parseTime` which is no longer available
hourglass = dontCheck super.hourglass; hourglass = dontCheck super.hourglass;
@ -199,10 +199,10 @@ self: super: {
random = dontCheck super.random_1_2_1; random = dontCheck super.random_1_2_1;
# 0.16.0 introduced support for GHC 9.0.x, stackage has 0.15.0 # 0.16.0 introduced support for GHC 9.0.x, stackage has 0.15.0
memory = appendPatch super.memory_0_16_0 (pkgs.fetchpatch { memory = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/memory-0.16.0.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/memory-0.16.0.patch";
sha256 = "1kjganx729a6xfgfnrb3z7q6mvnidl042zrsd9n5n5a3i76nl5nl"; sha256 = "1kjganx729a6xfgfnrb3z7q6mvnidl042zrsd9n5n5a3i76nl5nl";
}); }) super.memory_0_16_0;
# GHC 9.0.x doesn't like `import Spec (main)` in Main.hs # GHC 9.0.x doesn't like `import Spec (main)` in Main.hs
# https://github.com/snoyberg/mono-traversable/issues/192 # https://github.com/snoyberg/mono-traversable/issues/192
@ -213,12 +213,12 @@ self: super: {
retry = dontCheck super.retry; retry = dontCheck super.retry;
# Upper bound on `hashable` is too restrictive # Upper bound on `hashable` is too restrictive
semigroupoids = overrideCabal super.semigroupoids (drv: { postPatch = "sed -i -e 's,hashable >= 1.2.7.0 && < 1.4,hashable >= 1.2.7.0 \\&\\& < 1.5,' semigroupoids.cabal";}); semigroupoids = overrideCabal (drv: { postPatch = "sed -i -e 's,hashable >= 1.2.7.0 && < 1.4,hashable >= 1.2.7.0 \\&\\& < 1.5,' semigroupoids.cabal";}) super.semigroupoids;
streaming-commons = appendPatch super.streaming-commons (pkgs.fetchpatch { streaming-commons = appendPatch (pkgs.fetchpatch {
url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/streaming-commons-0.2.2.1.patch"; url = "https://gitlab.haskell.org/ghc/head.hackage/-/raw/dfd024c9a336c752288ec35879017a43bd7e85a0/patches/streaming-commons-0.2.2.1.patch";
sha256 = "04wi1jskr3j8ayh88kkx4irvhhgz0i7aj6fblzijy0fygikvidpy"; sha256 = "04wi1jskr3j8ayh88kkx4irvhhgz0i7aj6fblzijy0fygikvidpy";
}); }) super.streaming-commons;
# Tests have a circular dependency on quickcheck-instances # Tests have a circular dependency on quickcheck-instances
text-short = dontCheck super.text-short_0_1_4; text-short = dontCheck super.text-short_0_1_4;

View File

@ -75,6 +75,6 @@ self: super: {
stack = doJailbreak super.stack; stack = doJailbreak super.stack;
# Fix build with ghc 8.6.x. # Fix build with ghc 8.6.x.
git-annex = appendPatch super.git-annex ./patches/git-annex-fix-ghc-8.6.x-build.patch; git-annex = appendPatch ./patches/git-annex-fix-ghc-8.6.x-build.patch super.git-annex;
} }

View File

@ -38,17 +38,17 @@ self: super:
# doctest doesn't work on ghcjs, but sometimes dontCheck doesn't seem to get rid of the dependency # doctest doesn't work on ghcjs, but sometimes dontCheck doesn't seem to get rid of the dependency
doctest = pkgs.lib.warn "ignoring dependency on doctest" null; doctest = pkgs.lib.warn "ignoring dependency on doctest" null;
ghcjs-dom = overrideCabal super.ghcjs-dom (drv: { ghcjs-dom = overrideCabal (drv: {
libraryHaskellDepends = with self; [ libraryHaskellDepends = with self; [
ghcjs-base ghcjs-dom-jsffi text transformers ghcjs-base ghcjs-dom-jsffi text transformers
]; ];
configureFlags = [ "-fjsffi" "-f-webkit" ]; configureFlags = [ "-fjsffi" "-f-webkit" ];
}); }) super.ghcjs-dom;
ghcjs-dom-jsffi = overrideCabal super.ghcjs-dom-jsffi (drv: { ghcjs-dom-jsffi = overrideCabal (drv: {
libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ [ self.ghcjs-base self.text ]; libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ [ self.ghcjs-base self.text ];
broken = false; broken = false;
}); }) super.ghcjs-dom-jsffi;
# https://github.com/Deewiant/glob/issues/39 # https://github.com/Deewiant/glob/issues/39
Glob = dontCheck super.Glob; Glob = dontCheck super.Glob;
@ -59,9 +59,9 @@ self: super:
# uses doctest # uses doctest
http-types = dontCheck super.http-types; http-types = dontCheck super.http-types;
jsaddle = overrideCabal super.jsaddle (drv: { jsaddle = overrideCabal (drv: {
libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ [ self.ghcjs-base ]; libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ [ self.ghcjs-base ];
}); }) super.jsaddle;
# Tests hang, possibly some issue with tasty and race(async) usage in the nonTerminating tests # Tests hang, possibly some issue with tasty and race(async) usage in the nonTerminating tests
logict = dontCheck super.logict; logict = dontCheck super.logict;
@ -74,13 +74,13 @@ self: super:
# Terminal test not supported on ghcjs # Terminal test not supported on ghcjs
QuickCheck = dontCheck super.QuickCheck; QuickCheck = dontCheck super.QuickCheck;
reflex = overrideCabal super.reflex (drv: { reflex = overrideCabal (drv: {
libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ [ self.ghcjs-base ]; libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ [ self.ghcjs-base ];
}); }) super.reflex;
reflex-dom = overrideCabal super.reflex-dom (drv: { reflex-dom = overrideCabal (drv: {
libraryHaskellDepends = removeLibraryHaskellDepends ["jsaddle-webkit2gtk"] (drv.libraryHaskellDepends or []); libraryHaskellDepends = removeLibraryHaskellDepends ["jsaddle-webkit2gtk"] (drv.libraryHaskellDepends or []);
}); }) super.reflex-dom;
# https://github.com/dreixel/syb/issues/21 # https://github.com/dreixel/syb/issues/21
syb = dontCheck super.syb; syb = dontCheck super.syb;
@ -101,6 +101,9 @@ self: super:
# still present here https://github.com/glguy/th-abstraction/issues/53 # still present here https://github.com/glguy/th-abstraction/issues/53
th-abstraction = dontCheck super.th-abstraction; th-abstraction = dontCheck super.th-abstraction;
# https://github.com/haskell/vector/issues/410
vector = appendPatch super.vector (../compilers/ghcjs/patches/vector-ghcjs-storable-set.patch);
# Need hedgehog for tests, which fails to compile due to dep on concurrent-output # Need hedgehog for tests, which fails to compile due to dep on concurrent-output
zenc = dontCheck super.zenc; zenc = dontCheck super.zenc;
} }

View File

@ -43,10 +43,10 @@ with haskellLib;
self: super: builtins.intersectAttrs super { self: super: builtins.intersectAttrs super {
# Apply NixOS-specific patches. # Apply NixOS-specific patches.
ghc-paths = appendPatch super.ghc-paths ./patches/ghc-paths-nix.patch; ghc-paths = appendPatch ./patches/ghc-paths-nix.patch super.ghc-paths;
# fix errors caused by hardening flags # fix errors caused by hardening flags
epanet-haskell = disableHardening super.epanet-haskell ["format"]; epanet-haskell = disableHardening ["format"] super.epanet-haskell;
# Link the proper version. # Link the proper version.
zeromq4-haskell = super.zeromq4-haskell.override { zeromq = pkgs.zeromq4; }; zeromq4-haskell = super.zeromq4-haskell.override { zeromq = pkgs.zeromq4; };
@ -56,7 +56,7 @@ self: super: builtins.intersectAttrs super {
mysql = dontCheck super.mysql; mysql = dontCheck super.mysql;
# CUDA needs help finding the SDK headers and libraries. # CUDA needs help finding the SDK headers and libraries.
cuda = overrideCabal super.cuda (drv: { cuda = overrideCabal (drv: {
extraLibraries = (drv.extraLibraries or []) ++ [pkgs.linuxPackages.nvidia_x11]; extraLibraries = (drv.extraLibraries or []) ++ [pkgs.linuxPackages.nvidia_x11];
configureFlags = (drv.configureFlags or []) ++ [ configureFlags = (drv.configureFlags or []) ++ [
"--extra-lib-dirs=${pkgs.cudatoolkit.lib}/lib" "--extra-lib-dirs=${pkgs.cudatoolkit.lib}/lib"
@ -65,84 +65,84 @@ self: super: builtins.intersectAttrs super {
preConfigure = '' preConfigure = ''
export CUDA_PATH=${pkgs.cudatoolkit} export CUDA_PATH=${pkgs.cudatoolkit}
''; '';
}); }) super.cuda;
nvvm = overrideCabal super.nvvm (drv: { nvvm = overrideCabal (drv: {
preConfigure = '' preConfigure = ''
export CUDA_PATH=${pkgs.cudatoolkit} export CUDA_PATH=${pkgs.cudatoolkit}
''; '';
}); }) super.nvvm;
cufft = overrideCabal super.cufft (drv: { cufft = overrideCabal (drv: {
preConfigure = '' preConfigure = ''
export CUDA_PATH=${pkgs.cudatoolkit} export CUDA_PATH=${pkgs.cudatoolkit}
''; '';
}); }) super.cufft;
# jni needs help finding libjvm.so because it's in a weird location. # jni needs help finding libjvm.so because it's in a weird location.
jni = overrideCabal super.jni (drv: { jni = overrideCabal (drv: {
preConfigure = '' preConfigure = ''
local libdir=( "${pkgs.jdk}/lib/openjdk/jre/lib/"*"/server" ) local libdir=( "${pkgs.jdk}/lib/openjdk/jre/lib/"*"/server" )
configureFlags+=" --extra-lib-dir=''${libdir[0]}" configureFlags+=" --extra-lib-dir=''${libdir[0]}"
''; '';
}); }) super.jni;
# The package doesn't know about the AL include hierarchy. # The package doesn't know about the AL include hierarchy.
# https://github.com/phaazon/al/issues/1 # https://github.com/phaazon/al/issues/1
al = appendConfigureFlag super.al "--extra-include-dirs=${pkgs.openal}/include/AL"; al = appendConfigureFlag "--extra-include-dirs=${pkgs.openal}/include/AL" super.al;
# Won't find it's header files without help. # Won't find it's header files without help.
sfml-audio = appendConfigureFlag super.sfml-audio "--extra-include-dirs=${pkgs.openal}/include/AL"; sfml-audio = appendConfigureFlag "--extra-include-dirs=${pkgs.openal}/include/AL" super.sfml-audio;
# avoid compiling twice by providing executable as a separate output (with small closure size) # avoid compiling twice by providing executable as a separate output (with small closure size)
niv = enableSeparateBinOutput super.niv; niv = enableSeparateBinOutput super.niv;
ormolu = enableSeparateBinOutput super.ormolu; ormolu = enableSeparateBinOutput super.ormolu;
ghcid = enableSeparateBinOutput super.ghcid; ghcid = enableSeparateBinOutput super.ghcid;
hzk = overrideCabal super.hzk (drv: { hzk = overrideCabal (drv: {
preConfigure = "sed -i -e /include-dirs/d hzk.cabal"; preConfigure = "sed -i -e /include-dirs/d hzk.cabal";
configureFlags = [ "--extra-include-dirs=${pkgs.zookeeper_mt}/include/zookeeper" ]; configureFlags = [ "--extra-include-dirs=${pkgs.zookeeper_mt}/include/zookeeper" ];
}); }) super.hzk;
haskakafka = overrideCabal super.haskakafka (drv: { haskakafka = overrideCabal (drv: {
preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d haskakafka.cabal"; preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d haskakafka.cabal";
configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ]; configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ];
}); }) super.haskakafka;
# library has hard coded directories that need to be removed. Reported upstream here https://github.com/haskell-works/hw-kafka-client/issues/32 # library has hard coded directories that need to be removed. Reported upstream here https://github.com/haskell-works/hw-kafka-client/issues/32
hw-kafka-client = dontCheck (overrideCabal super.hw-kafka-client (drv: { hw-kafka-client = dontCheck (overrideCabal (drv: {
preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d -e /librdkafka/d hw-kafka-client.cabal"; preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d -e /librdkafka/d hw-kafka-client.cabal";
configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ]; configureFlags = [ "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka" ];
})); }) super.hw-kafka-client);
# Foreign dependency name clashes with another Haskell package. # Foreign dependency name clashes with another Haskell package.
libarchive-conduit = super.libarchive-conduit.override { archive = pkgs.libarchive; }; libarchive-conduit = super.libarchive-conduit.override { archive = pkgs.libarchive; };
# Heist's test suite requires system pandoc # Heist's test suite requires system pandoc
heist = overrideCabal super.heist (drv: { heist = overrideCabal (drv: {
testToolDepends = [pkgs.pandoc]; testToolDepends = [pkgs.pandoc];
}); }) super.heist;
# https://github.com/NixOS/cabal2nix/issues/136 and https://github.com/NixOS/cabal2nix/issues/216 # https://github.com/NixOS/cabal2nix/issues/136 and https://github.com/NixOS/cabal2nix/issues/216
gio = disableHardening (addPkgconfigDepend (addBuildTool super.gio self.buildHaskellPackages.gtk2hs-buildtools) pkgs.glib) ["fortify"]; gio = disableHardening ["fortify"] (addPkgconfigDepend pkgs.glib (addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.gio));
glib = disableHardening (addPkgconfigDepend (addBuildTool super.glib self.buildHaskellPackages.gtk2hs-buildtools) pkgs.glib) ["fortify"]; glib = disableHardening ["fortify"] (addPkgconfigDepend pkgs.glib (addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.glib));
gtk3 = disableHardening (super.gtk3.override { inherit (pkgs) gtk3; }) ["fortify"]; gtk3 = disableHardening ["fortify"] (super.gtk3.override { inherit (pkgs) gtk3; });
gtk = let gtk1 = addBuildTool super.gtk self.buildHaskellPackages.gtk2hs-buildtools; gtk = let gtk1 = addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.gtk;
gtk2 = addPkgconfigDepend gtk1 pkgs.gtk2; gtk2 = addPkgconfigDepend pkgs.gtk2 gtk1;
gtk3 = disableHardening gtk1 ["fortify"]; gtk3 = disableHardening ["fortify"] gtk1;
gtk4 = if pkgs.stdenv.isDarwin then appendConfigureFlag gtk3 "-fhave-quartz-gtk" else gtk4; gtk4 = if pkgs.stdenv.isDarwin then appendConfigureFlag "-fhave-quartz-gtk" gtk3 else gtk4;
in gtk3; in gtk3;
gtksourceview2 = addPkgconfigDepend super.gtksourceview2 pkgs.gtk2; gtksourceview2 = addPkgconfigDepend pkgs.gtk2 super.gtksourceview2;
gtk-traymanager = addPkgconfigDepend super.gtk-traymanager pkgs.gtk3; gtk-traymanager = addPkgconfigDepend pkgs.gtk3 super.gtk-traymanager;
# Add necessary reference to gtk3 package # Add necessary reference to gtk3 package
gi-dbusmenugtk3 = addPkgconfigDepend super.gi-dbusmenugtk3 pkgs.gtk3; gi-dbusmenugtk3 = addPkgconfigDepend pkgs.gtk3 super.gi-dbusmenugtk3;
hs-mesos = overrideCabal super.hs-mesos (drv: { hs-mesos = overrideCabal (drv: {
# Pass _only_ mesos; the correct protobuf is propagated. # Pass _only_ mesos; the correct protobuf is propagated.
extraLibraries = [ pkgs.mesos ]; extraLibraries = [ pkgs.mesos ];
preConfigure = "sed -i -e /extra-lib-dirs/d -e 's|, /usr/include, /usr/local/include/mesos||' hs-mesos.cabal"; preConfigure = "sed -i -e /extra-lib-dirs/d -e 's|, /usr/include, /usr/local/include/mesos||' hs-mesos.cabal";
}); }) super.hs-mesos;
# These packages try to access the network. # These packages try to access the network.
amqp = dontCheck super.amqp; amqp = dontCheck super.amqp;
@ -156,7 +156,7 @@ self: super: builtins.intersectAttrs super {
hadoop-rpc = dontCheck super.hadoop-rpc; # http://hydra.cryp.to/build/527461/nixlog/2/raw hadoop-rpc = dontCheck super.hadoop-rpc; # http://hydra.cryp.to/build/527461/nixlog/2/raw
hasql = dontCheck super.hasql; # http://hydra.cryp.to/build/502489/nixlog/4/raw hasql = dontCheck super.hasql; # http://hydra.cryp.to/build/502489/nixlog/4/raw
hasql-transaction = dontCheck super.hasql-transaction; # wants to connect to postgresql hasql-transaction = dontCheck super.hasql-transaction; # wants to connect to postgresql
hjsonschema = overrideCabal super.hjsonschema (drv: { testTarget = "local"; }); hjsonschema = overrideCabal (drv: { testTarget = "local"; }) super.hjsonschema;
marmalade-upload = dontCheck super.marmalade-upload; # http://hydra.cryp.to/build/501904/nixlog/1/raw marmalade-upload = dontCheck super.marmalade-upload; # http://hydra.cryp.to/build/501904/nixlog/1/raw
mongoDB = dontCheck super.mongoDB; mongoDB = dontCheck super.mongoDB;
network-transport-tcp = dontCheck super.network-transport-tcp; network-transport-tcp = dontCheck super.network-transport-tcp;
@ -203,10 +203,10 @@ self: super: builtins.intersectAttrs super {
mattermost-api = dontCheck super.mattermost-api; mattermost-api = dontCheck super.mattermost-api;
# Expect to find sendmail(1) in $PATH. # Expect to find sendmail(1) in $PATH.
mime-mail = appendConfigureFlag super.mime-mail "--ghc-option=-DMIME_MAIL_SENDMAIL_PATH=\"sendmail\""; mime-mail = appendConfigureFlag "--ghc-option=-DMIME_MAIL_SENDMAIL_PATH=\"sendmail\"" super.mime-mail;
# Help the test suite find system timezone data. # Help the test suite find system timezone data.
tz = overrideCabal super.tz (drv: { tz = overrideCabal (drv: {
preConfigure = "export TZDIR=${pkgs.tzdata}/share/zoneinfo"; preConfigure = "export TZDIR=${pkgs.tzdata}/share/zoneinfo";
patches = [ patches = [
# Fix tests failing with libSystem, musl etc. due to a lack of # Fix tests failing with libSystem, musl etc. due to a lack of
@ -218,37 +218,37 @@ self: super: builtins.intersectAttrs super {
sha256 = "1f53w8k1vpy39hzalyykpvm946ykkarj2714w988jdp4c2c4l4cf"; sha256 = "1f53w8k1vpy39hzalyykpvm946ykkarj2714w988jdp4c2c4l4cf";
}) })
] ++ (drv.patches or []); ] ++ (drv.patches or []);
}); }) super.tz;
# Nix-specific workaround # Nix-specific workaround
xmonad = appendPatch (dontCheck super.xmonad) ./patches/xmonad-nix.patch; xmonad = appendPatch ./patches/xmonad-nix.patch (dontCheck super.xmonad);
# wxc supports wxGTX >= 3.0, but our current default version points to 2.8. # wxc supports wxGTX >= 3.0, but our current default version points to 2.8.
# http://hydra.cryp.to/build/1331287/log/raw # http://hydra.cryp.to/build/1331287/log/raw
wxc = (addBuildDepend super.wxc self.split).override { wxGTK = pkgs.wxGTK30; }; wxc = (addBuildDepend self.split super.wxc).override { wxGTK = pkgs.wxGTK30; };
wxcore = super.wxcore.override { wxGTK = pkgs.wxGTK30; }; wxcore = super.wxcore.override { wxGTK = pkgs.wxGTK30; };
# Test suite wants to connect to $DISPLAY. # Test suite wants to connect to $DISPLAY.
bindings-GLFW = dontCheck super.bindings-GLFW; bindings-GLFW = dontCheck super.bindings-GLFW;
gi-gtk-declarative = dontCheck super.gi-gtk-declarative; gi-gtk-declarative = dontCheck super.gi-gtk-declarative;
gi-gtk-declarative-app-simple = dontCheck super.gi-gtk-declarative-app-simple; gi-gtk-declarative-app-simple = dontCheck super.gi-gtk-declarative-app-simple;
hsqml = dontCheck (addExtraLibraries (super.hsqml.override { qt5 = pkgs.qt5Full; }) [pkgs.libGLU pkgs.libGL]); hsqml = dontCheck (addExtraLibraries [pkgs.libGLU pkgs.libGL] (super.hsqml.override { qt5 = pkgs.qt5Full; }));
monomer = dontCheck super.monomer; monomer = dontCheck super.monomer;
# Wants to check against a real DB, Needs freetds # Wants to check against a real DB, Needs freetds
odbc = dontCheck (addExtraLibraries super.odbc [ pkgs.freetds ]); odbc = dontCheck (addExtraLibraries [ pkgs.freetds ] super.odbc);
# Tests attempt to use NPM to install from the network into # Tests attempt to use NPM to install from the network into
# /homeless-shelter. Disabled. # /homeless-shelter. Disabled.
purescript = dontCheck super.purescript; purescript = dontCheck super.purescript;
# Hardcoded include path # Hardcoded include path
poppler = overrideCabal super.poppler (drv: { poppler = overrideCabal (drv: {
postPatch = '' postPatch = ''
sed -i -e 's,glib/poppler.h,poppler.h,' poppler.cabal sed -i -e 's,glib/poppler.h,poppler.h,' poppler.cabal
sed -i -e 's,glib/poppler.h,poppler.h,' Graphics/UI/Gtk/Poppler/Structs.hsc sed -i -e 's,glib/poppler.h,poppler.h,' Graphics/UI/Gtk/Poppler/Structs.hsc
''; '';
}); }) super.poppler;
# Uses OpenGL in testing # Uses OpenGL in testing
caramia = dontCheck super.caramia; caramia = dontCheck super.caramia;
@ -257,10 +257,10 @@ self: super: builtins.intersectAttrs super {
llvm-hs = super.llvm-hs.override { llvm-config = pkgs.llvm_9; }; llvm-hs = super.llvm-hs.override { llvm-config = pkgs.llvm_9; };
# Needs help finding LLVM. # Needs help finding LLVM.
spaceprobe = addBuildTool super.spaceprobe self.buildHaskellPackages.llvmPackages.llvm; spaceprobe = addBuildTool self.buildHaskellPackages.llvmPackages.llvm super.spaceprobe;
# Tries to run GUI in tests # Tries to run GUI in tests
leksah = dontCheck (overrideCabal super.leksah (drv: { leksah = dontCheck (overrideCabal (drv: {
executableSystemDepends = (drv.executableSystemDepends or []) ++ (with pkgs; [ executableSystemDepends = (drv.executableSystemDepends or []) ++ (with pkgs; [
gnome.adwaita-icon-theme # Fix error: Icon 'window-close' not present in theme ... gnome.adwaita-icon-theme # Fix error: Icon 'window-close' not present in theme ...
wrapGAppsHook # Fix error: GLib-GIO-ERROR **: No GSettings schemas are installed on the system wrapGAppsHook # Fix error: GLib-GIO-ERROR **: No GSettings schemas are installed on the system
@ -272,12 +272,10 @@ self: super: builtins.intersectAttrs super {
substituteInPlace "$f" --replace "\"leksah-server\"" "\"${self.leksah-server}/bin/leksah-server\"" substituteInPlace "$f" --replace "\"leksah-server\"" "\"${self.leksah-server}/bin/leksah-server\""
done done
''; '';
})); }) super.leksah);
dyre = dyre =
appendPatch appendPatch
# dyre's tests appear to be trying to directly call GHC.
(dontCheck super.dyre)
# Dyre needs special support for reading the NIX_GHC env var. This is # Dyre needs special support for reading the NIX_GHC env var. This is
# available upstream in https://github.com/willdonnelly/dyre/pull/43, but # available upstream in https://github.com/willdonnelly/dyre/pull/43, but
# hasn't been released to Hackage as of dyre-0.9.1. Likely included in # hasn't been released to Hackage as of dyre-0.9.1. Likely included in
@ -285,46 +283,48 @@ self: super: builtins.intersectAttrs super {
(pkgs.fetchpatch { (pkgs.fetchpatch {
url = "https://github.com/willdonnelly/dyre/commit/c7f29d321aae343d6b314f058812dffcba9d7133.patch"; url = "https://github.com/willdonnelly/dyre/commit/c7f29d321aae343d6b314f058812dffcba9d7133.patch";
sha256 = "10m22k35bi6cci798vjpy4c2l08lq5nmmj24iwp0aflvmjdgscdb"; sha256 = "10m22k35bi6cci798vjpy4c2l08lq5nmmj24iwp0aflvmjdgscdb";
}); })
# dyre's tests appear to be trying to directly call GHC.
(dontCheck super.dyre);
# https://github.com/edwinb/EpiVM/issues/13 # https://github.com/edwinb/EpiVM/issues/13
# https://github.com/edwinb/EpiVM/issues/14 # https://github.com/edwinb/EpiVM/issues/14
epic = addExtraLibraries (addBuildTool super.epic self.buildHaskellPackages.happy) [pkgs.boehmgc pkgs.gmp]; epic = addExtraLibraries [pkgs.boehmgc pkgs.gmp] (addBuildTool self.buildHaskellPackages.happy super.epic);
# https://github.com/ekmett/wl-pprint-terminfo/issues/7 # https://github.com/ekmett/wl-pprint-terminfo/issues/7
wl-pprint-terminfo = addExtraLibrary super.wl-pprint-terminfo pkgs.ncurses; wl-pprint-terminfo = addExtraLibrary pkgs.ncurses super.wl-pprint-terminfo;
# https://github.com/bos/pcap/issues/5 # https://github.com/bos/pcap/issues/5
pcap = addExtraLibrary super.pcap pkgs.libpcap; pcap = addExtraLibrary pkgs.libpcap super.pcap;
# https://github.com/NixOS/nixpkgs/issues/53336 # https://github.com/NixOS/nixpkgs/issues/53336
greenclip = addExtraLibrary super.greenclip pkgs.xorg.libXdmcp; greenclip = addExtraLibrary pkgs.xorg.libXdmcp super.greenclip;
# The cabal files for these libraries do not list the required system dependencies. # The cabal files for these libraries do not list the required system dependencies.
miniball = overrideCabal super.miniball (drv: { miniball = overrideCabal (drv: {
librarySystemDepends = [ pkgs.miniball ]; librarySystemDepends = [ pkgs.miniball ];
}); }) super.miniball;
SDL-image = overrideCabal super.SDL-image (drv: { SDL-image = overrideCabal (drv: {
librarySystemDepends = [ pkgs.SDL pkgs.SDL_image ] ++ drv.librarySystemDepends or []; librarySystemDepends = [ pkgs.SDL pkgs.SDL_image ] ++ drv.librarySystemDepends or [];
}); }) super.SDL-image;
SDL-ttf = overrideCabal super.SDL-ttf (drv: { SDL-ttf = overrideCabal (drv: {
librarySystemDepends = [ pkgs.SDL pkgs.SDL_ttf ]; librarySystemDepends = [ pkgs.SDL pkgs.SDL_ttf ];
}); }) super.SDL-ttf;
SDL-mixer = overrideCabal super.SDL-mixer (drv: { SDL-mixer = overrideCabal (drv: {
librarySystemDepends = [ pkgs.SDL pkgs.SDL_mixer ]; librarySystemDepends = [ pkgs.SDL pkgs.SDL_mixer ];
}); }) super.SDL-mixer;
SDL-gfx = overrideCabal super.SDL-gfx (drv: { SDL-gfx = overrideCabal (drv: {
librarySystemDepends = [ pkgs.SDL pkgs.SDL_gfx ]; librarySystemDepends = [ pkgs.SDL pkgs.SDL_gfx ];
}); }) super.SDL-gfx;
SDL-mpeg = overrideCabal super.SDL-mpeg (drv: { SDL-mpeg = overrideCabal (drv: {
configureFlags = (drv.configureFlags or []) ++ [ configureFlags = (drv.configureFlags or []) ++ [
"--extra-lib-dirs=${pkgs.smpeg}/lib" "--extra-lib-dirs=${pkgs.smpeg}/lib"
"--extra-include-dirs=${pkgs.smpeg}/include/smpeg" "--extra-include-dirs=${pkgs.smpeg}/include/smpeg"
]; ];
}); }) super.SDL-mpeg;
# https://github.com/ivanperez-keera/hcwiid/pull/4 # https://github.com/ivanperez-keera/hcwiid/pull/4
hcwiid = overrideCabal super.hcwiid (drv: { hcwiid = overrideCabal (drv: {
configureFlags = (drv.configureFlags or []) ++ [ configureFlags = (drv.configureFlags or []) ++ [
"--extra-lib-dirs=${pkgs.bluez.out}/lib" "--extra-lib-dirs=${pkgs.bluez.out}/lib"
"--extra-lib-dirs=${pkgs.cwiid}/lib" "--extra-lib-dirs=${pkgs.cwiid}/lib"
@ -332,16 +332,16 @@ self: super: builtins.intersectAttrs super {
"--extra-include-dirs=${pkgs.bluez.dev}/include" "--extra-include-dirs=${pkgs.bluez.dev}/include"
]; ];
prePatch = '' sed -i -e "/Extra-Lib-Dirs/d" -e "/Include-Dirs/d" "hcwiid.cabal" ''; prePatch = '' sed -i -e "/Extra-Lib-Dirs/d" -e "/Include-Dirs/d" "hcwiid.cabal" '';
}); }) super.hcwiid;
# cabal2nix doesn't pick up some of the dependencies. # cabal2nix doesn't pick up some of the dependencies.
ginsu = let ginsu = let
g = addBuildDepend super.ginsu pkgs.perl; g = addBuildDepend pkgs.perl super.ginsu;
g' = overrideCabal g (drv: { g' = overrideCabal (drv: {
executableSystemDepends = (drv.executableSystemDepends or []) ++ [ executableSystemDepends = (drv.executableSystemDepends or []) ++ [
pkgs.ncurses pkgs.ncurses
]; ];
}); }) g;
in g'; in g';
# Tests require `docker` command in PATH # Tests require `docker` command in PATH
@ -349,23 +349,23 @@ self: super: builtins.intersectAttrs super {
docker = dontCheck super.docker; docker = dontCheck super.docker;
# https://github.com/deech/fltkhs/issues/16 # https://github.com/deech/fltkhs/issues/16
fltkhs = overrideCabal super.fltkhs (drv: { fltkhs = overrideCabal (drv: {
libraryToolDepends = (drv.libraryToolDepends or []) ++ [pkgs.buildPackages.autoconf]; libraryToolDepends = (drv.libraryToolDepends or []) ++ [pkgs.buildPackages.autoconf];
librarySystemDepends = (drv.librarySystemDepends or []) ++ [pkgs.fltk13 pkgs.libGL pkgs.libjpeg]; librarySystemDepends = (drv.librarySystemDepends or []) ++ [pkgs.fltk13 pkgs.libGL pkgs.libjpeg];
}); }) super.fltkhs;
# https://github.com/skogsbaer/hscurses/pull/26 # https://github.com/skogsbaer/hscurses/pull/26
hscurses = overrideCabal super.hscurses (drv: { hscurses = overrideCabal (drv: {
librarySystemDepends = (drv.librarySystemDepends or []) ++ [ pkgs.ncurses ]; librarySystemDepends = (drv.librarySystemDepends or []) ++ [ pkgs.ncurses ];
}); }) super.hscurses;
# Looks like Avahi provides the missing library # Looks like Avahi provides the missing library
dnssd = super.dnssd.override { dns_sd = pkgs.avahi.override { withLibdnssdCompat = true; }; }; dnssd = super.dnssd.override { dns_sd = pkgs.avahi.override { withLibdnssdCompat = true; }; };
# tests depend on executable # tests depend on executable
ghcide = overrideCabal super.ghcide (drv: { ghcide = overrideCabal (drv: {
preCheck = ''export PATH="$PWD/dist/build/ghcide:$PATH"''; preCheck = ''export PATH="$PWD/dist/build/ghcide:$PATH"'';
}); }) super.ghcide;
# GLUT uses `dlopen` to link to freeglut, so we need to set the RUNPATH correctly for # GLUT uses `dlopen` to link to freeglut, so we need to set the RUNPATH correctly for
# it to find `libglut.so` from the nix store. We do this by patching GLUT.cabal to pkg-config # it to find `libglut.so` from the nix store. We do this by patching GLUT.cabal to pkg-config
@ -377,22 +377,22 @@ self: super: builtins.intersectAttrs super {
# #
# Additional note: nixpkgs' freeglut and macOS's OpenGL implementation do not cooperate, # Additional note: nixpkgs' freeglut and macOS's OpenGL implementation do not cooperate,
# so disable this on Darwin only # so disable this on Darwin only
${if pkgs.stdenv.isDarwin then null else "GLUT"} = addPkgconfigDepend (appendPatch super.GLUT ./patches/GLUT.patch) pkgs.freeglut; ${if pkgs.stdenv.isDarwin then null else "GLUT"} = addPkgconfigDepend pkgs.freeglut (appendPatch ./patches/GLUT.patch super.GLUT);
libsystemd-journal = overrideCabal super.libsystemd-journal (old: { libsystemd-journal = overrideCabal (old: {
librarySystemDepends = old.librarySystemDepends or [] ++ [ pkgs.systemd ]; librarySystemDepends = old.librarySystemDepends or [] ++ [ pkgs.systemd ];
}); }) super.libsystemd-journal;
# does not specify tests in cabal file, instead has custom runTest cabal hook, # does not specify tests in cabal file, instead has custom runTest cabal hook,
# so cabal2nix will not detect test dependencies. # so cabal2nix will not detect test dependencies.
either-unwrap = overrideCabal super.either-unwrap (drv: { either-unwrap = overrideCabal (drv: {
testHaskellDepends = (drv.testHaskellDepends or []) ++ [ self.test-framework self.test-framework-hunit ]; testHaskellDepends = (drv.testHaskellDepends or []) ++ [ self.test-framework self.test-framework-hunit ];
}); }) super.either-unwrap;
# https://github.com/haskell-fswatch/hfsnotify/issues/62 # https://github.com/haskell-fswatch/hfsnotify/issues/62
fsnotify = dontCheck super.fsnotify; fsnotify = dontCheck super.fsnotify;
hidapi = addExtraLibrary super.hidapi pkgs.udev; hidapi = addExtraLibrary pkgs.udev super.hidapi;
hs-GeoIP = super.hs-GeoIP.override { GeoIP = pkgs.geoipWithDatabase; }; hs-GeoIP = super.hs-GeoIP.override { GeoIP = pkgs.geoipWithDatabase; };
@ -402,45 +402,45 @@ self: super: builtins.intersectAttrs super {
stackage-curator = dontCheck super.stackage-curator; stackage-curator = dontCheck super.stackage-curator;
# hardcodes /usr/bin/tr: https://github.com/snapframework/io-streams/pull/59 # hardcodes /usr/bin/tr: https://github.com/snapframework/io-streams/pull/59
io-streams = enableCabalFlag super.io-streams "NoInteractiveTests"; io-streams = enableCabalFlag "NoInteractiveTests" super.io-streams;
# requires autotools to build # requires autotools to build
secp256k1 = addBuildTools super.secp256k1 [ pkgs.buildPackages.autoconf pkgs.buildPackages.automake pkgs.buildPackages.libtool ]; secp256k1 = addBuildTools [ pkgs.buildPackages.autoconf pkgs.buildPackages.automake pkgs.buildPackages.libtool ] super.secp256k1;
# requires libsecp256k1 in pkg-config-depends # requires libsecp256k1 in pkg-config-depends
secp256k1-haskell = addPkgconfigDepend super.secp256k1-haskell pkgs.secp256k1; secp256k1-haskell = addPkgconfigDepend pkgs.secp256k1 super.secp256k1-haskell;
# tests require git and zsh # tests require git and zsh
hapistrano = addBuildTools super.hapistrano [ pkgs.buildPackages.git pkgs.buildPackages.zsh ]; hapistrano = addBuildTools [ pkgs.buildPackages.git pkgs.buildPackages.zsh ] super.hapistrano;
# This propagates this to everything depending on haskell-gi-base # This propagates this to everything depending on haskell-gi-base
haskell-gi-base = addBuildDepend super.haskell-gi-base pkgs.gobject-introspection; haskell-gi-base = addBuildDepend pkgs.gobject-introspection super.haskell-gi-base;
# requires valid, writeable $HOME # requires valid, writeable $HOME
hatex-guide = overrideCabal super.hatex-guide (drv: { hatex-guide = overrideCabal (drv: {
preConfigure = '' preConfigure = ''
${drv.preConfigure or ""} ${drv.preConfigure or ""}
export HOME=$PWD export HOME=$PWD
''; '';
}); }) super.hatex-guide;
# https://github.com/plow-technologies/servant-streaming/issues/12 # https://github.com/plow-technologies/servant-streaming/issues/12
servant-streaming-server = dontCheck super.servant-streaming-server; servant-streaming-server = dontCheck super.servant-streaming-server;
# https://github.com/haskell-servant/servant/pull/1238 # https://github.com/haskell-servant/servant/pull/1238
servant-client-core = if (pkgs.lib.getVersion super.servant-client-core) == "0.16" then servant-client-core = if (pkgs.lib.getVersion super.servant-client-core) == "0.16" then
appendPatch super.servant-client-core ./patches/servant-client-core-redact-auth-header.patch appendPatch ./patches/servant-client-core-redact-auth-header.patch super.servant-client-core
else else
super.servant-client-core; super.servant-client-core;
# tests run executable, relying on PATH # tests run executable, relying on PATH
# without this, tests fail with "Couldn't launch intero process" # without this, tests fail with "Couldn't launch intero process"
intero = overrideCabal super.intero (drv: { intero = overrideCabal (drv: {
preCheck = '' preCheck = ''
export PATH="$PWD/dist/build/intero:$PATH" export PATH="$PWD/dist/build/intero:$PATH"
''; '';
}); }) super.intero;
# Break infinite recursion cycle with criterion and network-uri. # Break infinite recursion cycle with criterion and network-uri.
js-flot = dontCheck super.js-flot; js-flot = dontCheck super.js-flot;
@ -470,23 +470,23 @@ self: super: builtins.intersectAttrs super {
liquidhaskell = dontCheck (disableSharedExecutables super.liquidhaskell); liquidhaskell = dontCheck (disableSharedExecutables super.liquidhaskell);
# Without this override, the builds lacks pkg-config. # Without this override, the builds lacks pkg-config.
opencv-extra = addPkgconfigDepend super.opencv-extra pkgs.opencv3; opencv-extra = addPkgconfigDepend pkgs.opencv3 super.opencv-extra;
# Break cyclic reference that results in an infinite recursion. # Break cyclic reference that results in an infinite recursion.
partial-semigroup = dontCheck super.partial-semigroup; partial-semigroup = dontCheck super.partial-semigroup;
colour = dontCheck super.colour; colour = dontCheck super.colour;
spatial-rotations = dontCheck super.spatial-rotations; spatial-rotations = dontCheck super.spatial-rotations;
LDAP = dontCheck (overrideCabal super.LDAP (drv: { LDAP = dontCheck (overrideCabal (drv: {
librarySystemDepends = drv.librarySystemDepends or [] ++ [ pkgs.cyrus_sasl.dev ]; librarySystemDepends = drv.librarySystemDepends or [] ++ [ pkgs.cyrus_sasl.dev ];
})); }) super.LDAP);
# Expects z3 to be on path so we replace it with a hard # Expects z3 to be on path so we replace it with a hard
# #
# The tests expect additional solvers on the path, replace the # The tests expect additional solvers on the path, replace the
# available ones also with hard coded paths, and remove the missing # available ones also with hard coded paths, and remove the missing
# ones from the test. # ones from the test.
sbv = overrideCabal super.sbv (drv: { sbv = overrideCabal (drv: {
postPatch = '' postPatch = ''
sed -i -e 's|"abc"|"${pkgs.abc-verifier}/bin/abc"|' Data/SBV/Provers/ABC.hs sed -i -e 's|"abc"|"${pkgs.abc-verifier}/bin/abc"|' Data/SBV/Provers/ABC.hs
sed -i -e 's|"boolector"|"${pkgs.boolector}/bin/boolector"|' Data/SBV/Provers/Boolector.hs sed -i -e 's|"boolector"|"${pkgs.boolector}/bin/boolector"|' Data/SBV/Provers/Boolector.hs
@ -496,14 +496,14 @@ self: super: builtins.intersectAttrs super {
sed -i -e 's|\[abc, boolector, cvc4, mathSAT, yices, z3, dReal\]|[abc, boolector, cvc4, yices, z3]|' SBVTestSuite/SBVConnectionTest.hs sed -i -e 's|\[abc, boolector, cvc4, mathSAT, yices, z3, dReal\]|[abc, boolector, cvc4, yices, z3]|' SBVTestSuite/SBVConnectionTest.hs
''; '';
}); }) super.sbv;
# The test-suite requires a running PostgreSQL server. # The test-suite requires a running PostgreSQL server.
Frames-beam = dontCheck super.Frames-beam; Frames-beam = dontCheck super.Frames-beam;
# Compile manpages (which are in RST and are compiled with Sphinx). # Compile manpages (which are in RST and are compiled with Sphinx).
futhark = futhark =
overrideCabal (addBuildTools super.futhark (with pkgs.buildPackages; [makeWrapper python3Packages.sphinx])) overrideCabal
(_drv: { (_drv: {
postBuild = (_drv.postBuild or "") + '' postBuild = (_drv.postBuild or "") + ''
make -C docs man make -C docs man
@ -513,12 +513,13 @@ self: super: builtins.intersectAttrs super {
mkdir -p $out/share/man/man1 mkdir -p $out/share/man/man1
mv docs/_build/man/*.1 $out/share/man/man1/ mv docs/_build/man/*.1 $out/share/man/man1/
''; '';
}); })
(addBuildTools (with pkgs.buildPackages; [makeWrapper python3Packages.sphinx]) super.futhark);
git-annex = with pkgs; git-annex = with pkgs;
if (!stdenv.isLinux) then if (!stdenv.isLinux) then
let path = lib.makeBinPath [ coreutils ]; let path = lib.makeBinPath [ coreutils ];
in overrideCabal (addBuildTool super.git-annex buildPackages.makeWrapper) (_drv: { in overrideCabal (_drv: {
# This is an instance of https://github.com/NixOS/nix/pull/1085 # This is an instance of https://github.com/NixOS/nix/pull/1085
# Fails with: # Fails with:
# gpg: can't connect to the agent: File name too long # gpg: can't connect to the agent: File name too long
@ -532,7 +533,7 @@ self: super: builtins.intersectAttrs super {
wrapProgram $out/bin/git-annex \ wrapProgram $out/bin/git-annex \
--prefix PATH : "${path}" --prefix PATH : "${path}"
''; '';
}) }) (addBuildTool buildPackages.makeWrapper super.git-annex)
else super.git-annex; else super.git-annex;
# The test suite has undeclared dependencies on git. # The test suite has undeclared dependencies on git.
@ -559,8 +560,8 @@ self: super: builtins.intersectAttrs super {
# gtk2hs-buildtools is listed in setupHaskellDepends, but we # gtk2hs-buildtools is listed in setupHaskellDepends, but we
# need it during the build itself, too. # need it during the build itself, too.
cairo = addBuildTool super.cairo self.buildHaskellPackages.gtk2hs-buildtools; cairo = addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.cairo;
pango = disableHardening (addBuildTool super.pango self.buildHaskellPackages.gtk2hs-buildtools) ["fortify"]; pango = disableHardening ["fortify"] (addBuildTool self.buildHaskellPackages.gtk2hs-buildtools super.pango);
spago = spago =
let let
@ -584,7 +585,7 @@ self: super: builtins.intersectAttrs super {
sha256 = "1hjdprm990vyxz86fgq14ajn0lkams7i00h8k2i2g1a0hjdwppq6"; sha256 = "1hjdprm990vyxz86fgq14ajn0lkams7i00h8k2i2g1a0hjdwppq6";
}; };
spagoWithPatches = appendPatch super.spago ( spagoWithPatches = appendPatch (
# Spago needs a small patch to work with versions-5.0.0: # Spago needs a small patch to work with versions-5.0.0:
# https://github.com/purescript/spago/pull/798 # https://github.com/purescript/spago/pull/798
# This can probably be removed with >spago-0.20.3. # This can probably be removed with >spago-0.20.3.
@ -592,14 +593,14 @@ self: super: builtins.intersectAttrs super {
url = "https://github.com/purescript/spago/commit/dd4bf4413d9675c1c8065d24d0ed7b345c7fa5dd.patch"; url = "https://github.com/purescript/spago/commit/dd4bf4413d9675c1c8065d24d0ed7b345c7fa5dd.patch";
sha256 = "1i1r3f4n9mlkckx15bfrdy5m7gjf0zx7ycwyqra6qn34zpcbzpmf"; sha256 = "1i1r3f4n9mlkckx15bfrdy5m7gjf0zx7ycwyqra6qn34zpcbzpmf";
} }
); ) super.spago;
spagoWithOverrides = spagoWithPatches.override { spagoWithOverrides = spagoWithPatches.override {
# spago has not yet been updated for the latest dhall. # spago has not yet been updated for the latest dhall.
dhall = self.dhall_1_38_1; dhall = self.dhall_1_38_1;
}; };
spagoDocs = overrideCabal spagoWithOverrides (drv: { spagoDocs = overrideCabal (drv: {
postUnpack = (drv.postUnpack or "") + '' postUnpack = (drv.postUnpack or "") + ''
# Spago includes the following two files directly into the binary # Spago includes the following two files directly into the binary
# with Template Haskell. They are fetched at build-time from the # with Template Haskell. They are fetched at build-time from the
@ -624,7 +625,7 @@ self: super: builtins.intersectAttrs super {
"$sourceRoot/templates/docs-search-app-0.0.11.js" \ "$sourceRoot/templates/docs-search-app-0.0.11.js" \
"$sourceRoot/templates/purescript-docs-search-0.0.11" "$sourceRoot/templates/purescript-docs-search-0.0.11"
''; '';
}); }) spagoWithOverrides;
# Tests require network access. # Tests require network access.
spagoWithoutChecks = dontCheck spagoDocs; spagoWithoutChecks = dontCheck spagoDocs;
@ -638,11 +639,11 @@ self: super: builtins.intersectAttrs super {
# mplayer-spot uses mplayer at runtime. # mplayer-spot uses mplayer at runtime.
mplayer-spot = mplayer-spot =
let path = pkgs.lib.makeBinPath [ pkgs.mplayer ]; let path = pkgs.lib.makeBinPath [ pkgs.mplayer ];
in overrideCabal (addBuildTool super.mplayer-spot pkgs.buildPackages.makeWrapper) (oldAttrs: { in overrideCabal (oldAttrs: {
postInstall = '' postInstall = ''
wrapProgram $out/bin/mplayer-spot --prefix PATH : "${path}" wrapProgram $out/bin/mplayer-spot --prefix PATH : "${path}"
''; '';
}); }) (addBuildTool pkgs.buildPackages.makeWrapper super.mplayer-spot);
# break infinite recursion with base-orphans # break infinite recursion with base-orphans
primitive = dontCheck super.primitive; primitive = dontCheck super.primitive;
@ -650,12 +651,12 @@ self: super: builtins.intersectAttrs super {
cut-the-crap = cut-the-crap =
let path = pkgs.lib.makeBinPath [ pkgs.ffmpeg pkgs.youtube-dl ]; let path = pkgs.lib.makeBinPath [ pkgs.ffmpeg pkgs.youtube-dl ];
in overrideCabal (addBuildTool super.cut-the-crap pkgs.buildPackages.makeWrapper) (_drv: { in overrideCabal (_drv: {
postInstall = '' postInstall = ''
wrapProgram $out/bin/cut-the-crap \ wrapProgram $out/bin/cut-the-crap \
--prefix PATH : "${path}" --prefix PATH : "${path}"
''; '';
}); }) (addBuildTool pkgs.buildPackages.makeWrapper super.cut-the-crap);
# Tests access homeless-shelter. # Tests access homeless-shelter.
hie-bios = dontCheck super.hie-bios; hie-bios = dontCheck super.hie-bios;
@ -663,9 +664,9 @@ self: super: builtins.intersectAttrs super {
# Compiling the readme throws errors and has no purpose in nixpkgs # Compiling the readme throws errors and has no purpose in nixpkgs
aeson-gadt-th = aeson-gadt-th =
disableCabalFlag (doJailbreak (super.aeson-gadt-th)) "build-readme"; disableCabalFlag "build-readme" (doJailbreak super.aeson-gadt-th);
neuron = overrideCabal (super.neuron) (drv: { neuron = overrideCabal (drv: {
# neuron expects the neuron-search script to be in PATH at built-time. # neuron expects the neuron-search script to be in PATH at built-time.
buildTools = [ pkgs.buildPackages.makeWrapper ]; buildTools = [ pkgs.buildPackages.makeWrapper ];
preConfigure = '' preConfigure = ''
@ -678,14 +679,14 @@ self: super: builtins.intersectAttrs super {
} }
PATH=$PATH:$out/bin PATH=$PATH:$out/bin
''; '';
}); }) super.neuron;
# Fix compilation of Setup.hs by removing the module declaration. # Fix compilation of Setup.hs by removing the module declaration.
# See: https://github.com/tippenein/guid/issues/1 # See: https://github.com/tippenein/guid/issues/1
guid = overrideCabal (super.guid) (drv: { guid = overrideCabal (drv: {
prePatch = "sed -i '1d' Setup.hs"; # 1st line is module declaration, remove it prePatch = "sed -i '1d' Setup.hs"; # 1st line is module declaration, remove it
doCheck = false; doCheck = false;
}); }) super.guid;
# Tests disabled as recommended at https://github.com/luke-clifton/shh/issues/39 # Tests disabled as recommended at https://github.com/luke-clifton/shh/issues/39
shh = dontCheck super.shh; shh = dontCheck super.shh;
@ -696,16 +697,16 @@ self: super: builtins.intersectAttrs super {
postgresql-libpq-notify = dontCheck super.postgresql-libpq-notify; postgresql-libpq-notify = dontCheck super.postgresql-libpq-notify;
postgresql-pure = dontCheck super.postgresql-pure; postgresql-pure = dontCheck super.postgresql-pure;
retrie = overrideCabal super.retrie (drv: { retrie = overrideCabal (drv: {
testToolDepends = [ pkgs.git pkgs.mercurial ]; testToolDepends = [ pkgs.git pkgs.mercurial ];
}); }) super.retrie;
nix-output-monitor = overrideCabal super.nix-output-monitor { nix-output-monitor = overrideCabal {
# Can't ran the golden-tests with nix, because they call nix # Can't ran the golden-tests with nix, because they call nix
testTarget = "unit-tests"; testTarget = "unit-tests";
}; } super.nix-output-monitor;
haskell-language-server = overrideCabal super.haskell-language-server (drv: { haskell-language-server = overrideCabal (drv: {
postInstall = "ln -s $out/bin/haskell-language-server $out/bin/haskell-language-server-${self.ghc.version}"; postInstall = "ln -s $out/bin/haskell-language-server $out/bin/haskell-language-server-${self.ghc.version}";
testToolDepends = [ self.cabal-install pkgs.git ]; testToolDepends = [ self.cabal-install pkgs.git ];
testTarget = "func-test"; # wrapper test accesses internet testTarget = "func-test"; # wrapper test accesses internet
@ -713,14 +714,14 @@ self: super: builtins.intersectAttrs super {
export PATH=$PATH:$PWD/dist/build/haskell-language-server:$PWD/dist/build/haskell-language-server-wrapper export PATH=$PATH:$PWD/dist/build/haskell-language-server:$PWD/dist/build/haskell-language-server-wrapper
export HOME=$TMPDIR export HOME=$TMPDIR
''; '';
}); }) super.haskell-language-server;
# tests depend on a specific version of solc # tests depend on a specific version of solc
hevm = dontCheck (doJailbreak super.hevm); hevm = dontCheck (doJailbreak super.hevm);
# hadolint enables static linking by default in the cabal file, so we have to explicitly disable it. # hadolint enables static linking by default in the cabal file, so we have to explicitly disable it.
# https://github.com/hadolint/hadolint/commit/e1305042c62d52c2af4d77cdce5d62f6a0a3ce7b # https://github.com/hadolint/hadolint/commit/e1305042c62d52c2af4d77cdce5d62f6a0a3ce7b
hadolint = disableCabalFlag super.hadolint "static"; hadolint = disableCabalFlag "static" super.hadolint;
# Test suite tries to execute the build product "doctest-driver-gen", but it's not in $PATH. # Test suite tries to execute the build product "doctest-driver-gen", but it's not in $PATH.
doctest-driver-gen = dontCheck super.doctest-driver-gen; doctest-driver-gen = dontCheck super.doctest-driver-gen;
@ -729,7 +730,7 @@ self: super: builtins.intersectAttrs super {
prune-juice = dontCheck super.prune-juice; prune-juice = dontCheck super.prune-juice;
# based on https://github.com/gibiansky/IHaskell/blob/aafeabef786154d81ab7d9d1882bbcd06fc8c6c4/release.nix # based on https://github.com/gibiansky/IHaskell/blob/aafeabef786154d81ab7d9d1882bbcd06fc8c6c4/release.nix
ihaskell = overrideCabal super.ihaskell (drv: { ihaskell = overrideCabal (drv: {
configureFlags = (drv.configureFlags or []) ++ [ configureFlags = (drv.configureFlags or []) ++ [
# ihaskell's cabal file forces building a shared executable, # ihaskell's cabal file forces building a shared executable,
# but without passing --enable-executable-dynamic, the RPATH # but without passing --enable-executable-dynamic, the RPATH
@ -741,152 +742,152 @@ self: super: builtins.intersectAttrs super {
export PATH=$PWD/dist/build/ihaskell:$PATH export PATH=$PWD/dist/build/ihaskell:$PATH
export GHC_PACKAGE_PATH=$PWD/dist/package.conf.inplace/:$GHC_PACKAGE_PATH export GHC_PACKAGE_PATH=$PWD/dist/package.conf.inplace/:$GHC_PACKAGE_PATH
''; '';
}); }) super.ihaskell;
# tests need to execute the built executable # tests need to execute the built executable
stutter = overrideCabal super.stutter (drv: { stutter = overrideCabal (drv: {
preCheck = '' preCheck = ''
export PATH=dist/build/stutter:$PATH export PATH=dist/build/stutter:$PATH
'' + (drv.preCheck or ""); '' + (drv.preCheck or "");
}); }) super.stutter;
# Install man page and generate shell completions # Install man page and generate shell completions
pinboard-notes-backup = overrideCabal pinboard-notes-backup = overrideCabal
(generateOptparseApplicativeCompletion "pnbackup" super.pinboard-notes-backup)
(drv: { (drv: {
postInstall = '' postInstall = ''
install -D man/pnbackup.1 $out/share/man/man1/pnbackup.1 install -D man/pnbackup.1 $out/share/man/man1/pnbackup.1
'' + (drv.postInstall or ""); '' + (drv.postInstall or "");
}); })
(generateOptparseApplicativeCompletion "pnbackup" super.pinboard-notes-backup);
# set more accurate set of platforms instead of maintaining # set more accurate set of platforms instead of maintaining
# an ever growing list of platforms to exclude via unsupported-platforms # an ever growing list of platforms to exclude via unsupported-platforms
cpuid = overrideCabal super.cpuid { cpuid = overrideCabal {
platforms = pkgs.lib.platforms.x86; platforms = pkgs.lib.platforms.x86;
}; } super.cpuid;
# Pass the correct libarchive into the package. # Pass the correct libarchive into the package.
streamly-archive = super.streamly-archive.override { archive = pkgs.libarchive; }; streamly-archive = super.streamly-archive.override { archive = pkgs.libarchive; };
# passes the -msse2 flag which only works on x86 platforms # passes the -msse2 flag which only works on x86 platforms
hsignal = overrideCabal super.hsignal { hsignal = overrideCabal {
platforms = pkgs.lib.platforms.x86; platforms = pkgs.lib.platforms.x86;
}; } super.hsignal;
# uses x86 intrinsics # uses x86 intrinsics
blake3 = overrideCabal super.blake3 { blake3 = overrideCabal {
platforms = pkgs.lib.platforms.x86; platforms = pkgs.lib.platforms.x86;
}; } super.blake3;
# uses x86 intrinsics, see also https://github.com/NixOS/nixpkgs/issues/122014 # uses x86 intrinsics, see also https://github.com/NixOS/nixpkgs/issues/122014
crc32c = overrideCabal super.crc32c { crc32c = overrideCabal {
platforms = pkgs.lib.platforms.x86; platforms = pkgs.lib.platforms.x86;
}; } super.crc32c;
# uses x86 intrinsics # uses x86 intrinsics
seqalign = overrideCabal super.seqalign { seqalign = overrideCabal {
platforms = pkgs.lib.platforms.x86; platforms = pkgs.lib.platforms.x86;
}; } super.seqalign;
# uses x86 intrinsics # uses x86 intrinsics
geomancy = overrideCabal super.geomancy { geomancy = overrideCabal {
platforms = pkgs.lib.platforms.x86; platforms = pkgs.lib.platforms.x86;
}; } super.geomancy;
hls-brittany-plugin = overrideCabal super.hls-brittany-plugin (drv: { hls-brittany-plugin = overrideCabal (drv: {
testToolDepends = [ pkgs.git ]; testToolDepends = [ pkgs.git ];
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
''; '';
}); }) super.hls-brittany-plugin;
hls-class-plugin = overrideCabal super.hls-class-plugin (drv: { hls-class-plugin = overrideCabal (drv: {
testToolDepends = [ pkgs.git ]; testToolDepends = [ pkgs.git ];
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
''; '';
}); }) super.hls-class-plugin;
hls-ormolu-plugin = overrideCabal super.hls-ormolu-plugin (drv: { hls-ormolu-plugin = overrideCabal (drv: {
testToolDepends = [ pkgs.git ]; testToolDepends = [ pkgs.git ];
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
''; '';
}); }) super.hls-ormolu-plugin;
hls-fourmolu-plugin = overrideCabal super.hls-fourmolu-plugin (drv: { hls-fourmolu-plugin = overrideCabal (drv: {
testToolDepends = [ pkgs.git ]; testToolDepends = [ pkgs.git ];
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
''; '';
}); }) super.hls-fourmolu-plugin;
hls-module-name-plugin = overrideCabal super.hls-module-name-plugin (drv: { hls-module-name-plugin = overrideCabal (drv: {
testToolDepends = [ pkgs.git ]; testToolDepends = [ pkgs.git ];
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
''; '';
}); }) super.hls-module-name-plugin;
hls-rename-plugin = overrideCabal super.hls-rename-plugin (drv: { hls-rename-plugin = overrideCabal (drv: {
testToolDepends = [ pkgs.git ]; testToolDepends = [ pkgs.git ];
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
'' + (drv.preCheck or ""); '' + (drv.preCheck or "");
}); }) super.hls-rename-plugin;
hls-splice-plugin = overrideCabal super.hls-splice-plugin (drv: { hls-splice-plugin = overrideCabal (drv: {
testToolDepends = [ pkgs.git ]; testToolDepends = [ pkgs.git ];
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
''; '';
}); }) super.hls-splice-plugin;
hls-floskell-plugin = overrideCabal super.hls-floskell-plugin (drv: { hls-floskell-plugin = overrideCabal (drv: {
testToolDepends = [ pkgs.git ]; testToolDepends = [ pkgs.git ];
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
''; '';
}); }) super.hls-floskell-plugin;
hls-pragmas-plugin = overrideCabal super.hls-pragmas-plugin (drv: { hls-pragmas-plugin = overrideCabal (drv: {
testToolDepends = [ pkgs.git ]; testToolDepends = [ pkgs.git ];
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
''; '';
}); }) super.hls-pragmas-plugin;
hiedb = overrideCabal super.hiedb (drv: { hiedb = overrideCabal (drv: {
preCheck = '' preCheck = ''
export PATH=$PWD/dist/build/hiedb:$PATH export PATH=$PWD/dist/build/hiedb:$PATH
''; '';
}); }) super.hiedb;
hls-call-hierarchy-plugin = overrideCabal super.hls-call-hierarchy-plugin (drv: { hls-call-hierarchy-plugin = overrideCabal (drv: {
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
''; '';
}); }) super.hls-call-hierarchy-plugin;
# Tests have file permissions expections that dont work with the nix store. # Tests have file permissions expections that dont work with the nix store.
hls-stylish-haskell-plugin = dontCheck super.hls-stylish-haskell-plugin; hls-stylish-haskell-plugin = dontCheck super.hls-stylish-haskell-plugin;
hls-haddock-comments-plugin = overrideCabal super.hls-haddock-comments-plugin (drv: { hls-haddock-comments-plugin = overrideCabal (drv: {
testToolDepends = [ pkgs.git ]; testToolDepends = [ pkgs.git ];
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
''; '';
}); }) super.hls-haddock-comments-plugin;
hls-eval-plugin = overrideCabal super.hls-eval-plugin (drv: { hls-eval-plugin = overrideCabal (drv: {
testToolDepends = [ pkgs.git ]; testToolDepends = [ pkgs.git ];
preCheck = '' preCheck = ''
export HOME=$TMPDIR/home export HOME=$TMPDIR/home
''; '';
}); }) super.hls-eval-plugin;
taglib = overrideCabal super.taglib (drv: { taglib = overrideCabal (drv: {
librarySystemDepends = [ librarySystemDepends = [
pkgs.zlib pkgs.zlib
] ++ (drv.librarySystemDepends or []); ] ++ (drv.librarySystemDepends or []);
}); }) super.taglib;
# uses x86 assembler # uses x86 assembler
inline-asm = overrideCabal super.inline-asm { inline-asm = overrideCabal {
platforms = pkgs.lib.platforms.x86; platforms = pkgs.lib.platforms.x86;
}; } super.inline-asm;
# uses x86 assembler in C bits # uses x86 assembler in C bits
hw-prim-bits = overrideCabal super.hw-prim-bits { hw-prim-bits = overrideCabal {
platforms = pkgs.lib.platforms.x86; platforms = pkgs.lib.platforms.x86;
}; } super.hw-prim-bits;
# random 1.2.0 has tests that indirectly depend on # random 1.2.0 has tests that indirectly depend on
# itself causing an infinite recursion at evaluation # itself causing an infinite recursion at evaluation
@ -897,7 +898,6 @@ self: super: builtins.intersectAttrs super {
# not used to link against by anyone, we can make its closure smaller and # not used to link against by anyone, we can make its closure smaller and
# add its runtime dependencies in `haskellPackages` (as opposed to cabal2nix). # add its runtime dependencies in `haskellPackages` (as opposed to cabal2nix).
cabal2nix-unstable = overrideCabal cabal2nix-unstable = overrideCabal
(justStaticExecutables super.cabal2nix-unstable)
(drv: { (drv: {
buildTools = (drv.buildTools or []) ++ [ buildTools = (drv.buildTools or []) ++ [
pkgs.buildPackages.makeWrapper pkgs.buildPackages.makeWrapper
@ -908,21 +908,22 @@ self: super: builtins.intersectAttrs super {
pkgs.lib.makeBinPath [ pkgs.nix pkgs.nix-prefetch-scripts ] pkgs.lib.makeBinPath [ pkgs.nix pkgs.nix-prefetch-scripts ]
}" }"
''; '';
}); })
(justStaticExecutables super.cabal2nix-unstable);
# test suite needs local redis daemon # test suite needs local redis daemon
nri-redis = dontCheck super.nri-redis; nri-redis = dontCheck super.nri-redis;
# Make tophat find itself for _compiling_ its test suite # Make tophat find itself for _compiling_ its test suite
tophat = overrideCabal super.tophat (drv: { tophat = overrideCabal (drv: {
postPatch = '' postPatch = ''
sed -i 's|"tophat"|"./dist/build/tophat/tophat"|' app-test-bin/*.hs sed -i 's|"tophat"|"./dist/build/tophat/tophat"|' app-test-bin/*.hs
'' + (drv.postPatch or ""); '' + (drv.postPatch or "");
}); }) super.tophat;
# Runtime dependencies and CLI completion # Runtime dependencies and CLI completion
nvfetcher = generateOptparseApplicativeCompletion "nvfetcher" (overrideCabal nvfetcher = generateOptparseApplicativeCompletion "nvfetcher" (overrideCabal
super.nvfetcher (drv: { (drv: {
# test needs network # test needs network
doCheck = false; doCheck = false;
buildTools = drv.buildTools or [ ] ++ [ pkgs.buildPackages.makeWrapper ]; buildTools = drv.buildTools or [ ] ++ [ pkgs.buildPackages.makeWrapper ];
@ -931,16 +932,16 @@ self: super: builtins.intersectAttrs super {
pkgs.lib.makeBinPath [ pkgs.nvchecker pkgs.nix-prefetch-git ] pkgs.lib.makeBinPath [ pkgs.nvchecker pkgs.nix-prefetch-git ]
}" }"
''; '';
})); }) super.nvfetcher);
rel8 = addTestToolDepend super.rel8 pkgs.postgresql; rel8 = addTestToolDepend pkgs.postgresql super.rel8;
cachix = generateOptparseApplicativeCompletion "cachix" super.cachix; cachix = generateOptparseApplicativeCompletion "cachix" super.cachix;
# Enable extra optimisations which increase build time, but also # Enable extra optimisations which increase build time, but also
# later compiler performance, so we should do this for user's benefit. # later compiler performance, so we should do this for user's benefit.
# Flag added in Agda 2.6.2 # Flag added in Agda 2.6.2
Agda = appendConfigureFlag super.Agda "-foptimise-heavily"; Agda = appendConfigureFlag "-foptimise-heavily" super.Agda;
# ats-format uses cli-setup in Setup.hs which is quite happy to write # ats-format uses cli-setup in Setup.hs which is quite happy to write
# to arbitrary files in $HOME. This doesn't either not achieve anything # to arbitrary files in $HOME. This doesn't either not achieve anything
@ -948,7 +949,7 @@ self: super: builtins.intersectAttrs super {
# See also: https://hackage.haskell.org/package/cli-setup-0.2.1.4/docs/src/Distribution.CommandLine.html#setManpathGeneric # See also: https://hackage.haskell.org/package/cli-setup-0.2.1.4/docs/src/Distribution.CommandLine.html#setManpathGeneric
ats-format = generateOptparseApplicativeCompletion "atsfmt" ( ats-format = generateOptparseApplicativeCompletion "atsfmt" (
justStaticExecutables ( justStaticExecutables (
overrideCabal super.ats-format (drv: { overrideCabal (drv: {
# use vanilla Setup.hs # use vanilla Setup.hs
preCompileBuildDriver = '' preCompileBuildDriver = ''
cat > Setup.hs << EOF cat > Setup.hs << EOF
@ -964,7 +965,7 @@ self: super: builtins.intersectAttrs super {
postInstall = '' postInstall = ''
installManPage man/atsfmt.1 installManPage man/atsfmt.1
'' + (drv.postInstall or ""); '' + (drv.postInstall or "");
}) }) super.ats-format
) )
); );
@ -974,10 +975,10 @@ self: super: builtins.intersectAttrs super {
# Some hash implementations are x86 only, but part of the test suite. # Some hash implementations are x86 only, but part of the test suite.
# So executing and building it on non-x86 platforms will always fail. # So executing and building it on non-x86 platforms will always fail.
hashes = overrideCabal super.hashes { hashes = overrideCabal {
doCheck = with pkgs.stdenv; hostPlatform == buildPlatform doCheck = with pkgs.stdenv; hostPlatform == buildPlatform
&& buildPlatform.isx86; && buildPlatform.isx86;
}; } super.hashes;
# procex relies on close_range which has been introduced in Linux 5.9, # procex relies on close_range which has been introduced in Linux 5.9,
# the test suite seems to force the use of this feature (or the fallback # the test suite seems to force the use of this feature (or the fallback
@ -985,7 +986,7 @@ self: super: builtins.intersectAttrs super {
# Kernel < 5.9. To check for this, we use uname -r to obtain the Kernel # Kernel < 5.9. To check for this, we use uname -r to obtain the Kernel
# version and sort -V to compare against our minimum version. If the # version and sort -V to compare against our minimum version. If the
# Kernel turns out to be older, we disable the test suite. # Kernel turns out to be older, we disable the test suite.
procex = overrideCabal super.procex (drv: { procex = overrideCabal (drv: {
postConfigure = '' postConfigure = ''
minimumKernel=5.9 minimumKernel=5.9
higherVersion=`printf "%s\n%s\n" "$minimumKernel" "$(uname -r)" | sort -rV | head -n1` higherVersion=`printf "%s\n%s\n" "$minimumKernel" "$(uname -r)" | sort -rV | head -n1`
@ -994,5 +995,5 @@ self: super: builtins.intersectAttrs super {
unset doCheck unset doCheck
fi fi
'' + (drv.postConfigure or ""); '' + (drv.postConfigure or "");
}); }) super.procex;
} }

View File

@ -17,7 +17,7 @@ let
}; };
setTensorflowSourceRoot = dir: drv: setTensorflowSourceRoot = dir: drv:
(overrideCabal drv (drv: { src = tensorflow-haskell; })) (overrideCabal (drv: { src = tensorflow-haskell; }) drv)
.overrideAttrs (_oldAttrs: {sourceRoot = "source/${dir}";}); .overrideAttrs (_oldAttrs: {sourceRoot = "source/${dir}";});
in in
{ {

View File

@ -30,7 +30,7 @@ rec {
> haskellPackages.aeson.meta.homepage > haskellPackages.aeson.meta.homepage
"https://github.com/bos/aeson" "https://github.com/bos/aeson"
> x = haskell.lib.composable.overrideCabal (old: { homepage = old.homepage + "#readme"; }) haskellPackages.aeson > x = haskell.lib.compose.overrideCabal (old: { homepage = old.homepage + "#readme"; }) haskellPackages.aeson
> x.meta.homepage > x.meta.homepage
"https://github.com/bos/aeson#readme" "https://github.com/bos/aeson#readme"
@ -133,7 +133,7 @@ rec {
Example: Example:
> haskell.lib.composable.appendConfigureFlag "--profiling-detail=all-functions" haskellPackages.servant > haskell.lib.compose.appendConfigureFlag "--profiling-detail=all-functions" haskellPackages.servant
*/ */
appendConfigureFlag = x: appendConfigureFlags [x]; appendConfigureFlag = x: appendConfigureFlags [x];
appendConfigureFlags = xs: overrideCabal (drv: { configureFlags = (drv.configureFlags or []) ++ xs; }); appendConfigureFlags = xs: overrideCabal (drv: { configureFlags = (drv.configureFlags or []) ++ xs; });
@ -144,7 +144,7 @@ rec {
/* removeConfigureFlag drv x is a Haskell package like drv, but with /* removeConfigureFlag drv x is a Haskell package like drv, but with
all cabal configure arguments that are equal to x removed. all cabal configure arguments that are equal to x removed.
> haskell.lib.composable.removeConfigureFlag "--verbose" haskellPackages.servant > haskell.lib.compose.removeConfigureFlag "--verbose" haskellPackages.servant
*/ */
removeConfigureFlag = x: overrideCabal (drv: { configureFlags = lib.remove x (drv.configureFlags or []); }); removeConfigureFlag = x: overrideCabal (drv: { configureFlags = lib.remove x (drv.configureFlags or []); });

View File

@ -49,23 +49,23 @@ let
nodejs = buildPackages.nodejs-slim; nodejs = buildPackages.nodejs-slim;
inherit (self) buildHaskellPackages ghc ghcWithHoogle ghcWithPackages; inherit (self) buildHaskellPackages ghc ghcWithHoogle ghcWithPackages;
inherit (self.buildHaskellPackages) jailbreak-cabal; inherit (self.buildHaskellPackages) jailbreak-cabal;
hscolour = overrideCabal self.buildHaskellPackages.hscolour (drv: { hscolour = overrideCabal (drv: {
isLibrary = false; isLibrary = false;
doHaddock = false; doHaddock = false;
hyperlinkSource = false; # Avoid depending on hscolour for this build. hyperlinkSource = false; # Avoid depending on hscolour for this build.
postFixup = "rm -rf $out/lib $out/share $out/nix-support"; postFixup = "rm -rf $out/lib $out/share $out/nix-support";
}); }) self.buildHaskellPackages.hscolour;
cpphs = overrideCabal (self.cpphs.overrideScope (self: super: { cpphs = overrideCabal (drv: {
isLibrary = false;
postFixup = "rm -rf $out/lib $out/share $out/nix-support";
}) (self.cpphs.overrideScope (self: super: {
mkDerivation = drv: super.mkDerivation (drv // { mkDerivation = drv: super.mkDerivation (drv // {
enableSharedExecutables = false; enableSharedExecutables = false;
enableSharedLibraries = false; enableSharedLibraries = false;
doHaddock = false; doHaddock = false;
useCpphs = false; useCpphs = false;
}); });
})) (drv: { }));
isLibrary = false;
postFixup = "rm -rf $out/lib $out/share $out/nix-support";
});
}; };
mkDerivation = makeOverridable mkDerivationImpl; mkDerivation = makeOverridable mkDerivationImpl;
@ -294,7 +294,7 @@ in package-set { inherit pkgs lib callPackage; } self // {
# #
# # default.nix # # default.nix
# with import <nixpkgs> {}; # with import <nixpkgs> {};
# haskellPackages.extend (haskell.lib.packageSourceOverrides { # haskellPackages.extend (haskell.lib.compose.packageSourceOverrides {
# frontend = ./frontend; # frontend = ./frontend;
# backend = ./backend; # backend = ./backend;
# common = ./common; # common = ./common;

View File

@ -48,7 +48,7 @@
let let
# HTTP support is disabled in order to force that HTTP dependencies are built # HTTP support is disabled in order to force that HTTP dependencies are built
# using Nix instead of using Dhall's support for HTTP imports. # using Nix instead of using Dhall's support for HTTP imports.
dhallNoHTTP = haskell.lib.appendConfigureFlag dhall "-f-with-http"; dhallNoHTTP = haskell.lib.compose.appendConfigureFlag "-f-with-http" dhall;
file = writeText "${name}.dhall" code; file = writeText "${name}.dhall" code;

View File

@ -1,13 +1,12 @@
{ haskell, haskellPackages, lib, makeWrapper, runc, stdenv }: { haskell, haskellPackages, lib, makeWrapper, runc, stdenv }:
let let
inherit (haskell.lib) overrideCabal addBuildDepends; inherit (haskell.lib.compose) overrideCabal addBuildDepends justStaticExecutables;
inherit (lib) makeBinPath; inherit (lib) makeBinPath;
bundledBins = lib.optional stdenv.isLinux runc; bundledBins = lib.optional stdenv.isLinux runc;
pkg = pkg =
# justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990 # justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990
overrideCabal overrideCabal
(addBuildDepends (haskell.lib.justStaticExecutables haskellPackages.hercules-ci-cli) [ makeWrapper ])
(o: { (o: {
postInstall = '' postInstall = ''
${o.postInstall or ""} ${o.postInstall or ""}
@ -15,7 +14,8 @@ let
mv $out/bin/hci $out/libexec mv $out/bin/hci $out/libexec
makeWrapper $out/libexec/hci $out/bin/hci --prefix PATH : ${makeBinPath bundledBins} makeWrapper $out/libexec/hci $out/bin/hci --prefix PATH : ${makeBinPath bundledBins}
''; '';
}); })
(addBuildDepends [ makeWrapper ] (justStaticExecutables haskellPackages.hercules-ci-cli));
in pkg // { in pkg // {
meta = pkg.meta // { meta = pkg.meta // {
position = toString ./default.nix + ":1"; position = toString ./default.nix + ":1";

View File

@ -1,13 +1,12 @@
{ gnutar, gzip, git, haskell, haskellPackages, lib, makeWrapper, nixos, runc, stdenv }: { gnutar, gzip, git, haskell, haskellPackages, lib, makeWrapper, nixos, runc, stdenv }:
let let
inherit (haskell.lib) overrideCabal addBuildDepends; inherit (haskell.lib.compose) overrideCabal addBuildDepends justStaticExecutables;
inherit (lib) makeBinPath; inherit (lib) makeBinPath;
bundledBins = [ gnutar gzip git ] ++ lib.optional stdenv.isLinux runc; bundledBins = [ gnutar gzip git ] ++ lib.optional stdenv.isLinux runc;
pkg = pkg =
# justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990 # justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990
overrideCabal overrideCabal
(addBuildDepends (haskell.lib.justStaticExecutables haskellPackages.hercules-ci-agent) [ makeWrapper ])
(o: { (o: {
postInstall = '' postInstall = ''
${o.postInstall or ""} ${o.postInstall or ""}
@ -15,7 +14,8 @@ let
mv $out/bin/hercules-ci-agent $out/libexec mv $out/bin/hercules-ci-agent $out/libexec
makeWrapper $out/libexec/hercules-ci-agent $out/bin/hercules-ci-agent --prefix PATH : ${makeBinPath bundledBins} makeWrapper $out/libexec/hercules-ci-agent $out/bin/hercules-ci-agent --prefix PATH : ${makeBinPath bundledBins}
''; '';
}); })
(addBuildDepends [ makeWrapper ] (justStaticExecutables haskellPackages.hercules-ci-agent));
in pkg.overrideAttrs (o: { in pkg.overrideAttrs (o: {
meta = o.meta // { meta = o.meta // {
position = toString ./default.nix + ":1"; position = toString ./default.nix + ":1";

View File

@ -2,12 +2,12 @@
let let
dconf2nix = dconf2nix =
haskell.lib.justStaticExecutables haskell.lib.compose.justStaticExecutables
(haskell.lib.overrideCabal haskellPackages.dconf2nix (oldAttrs: { (haskell.lib.compose.overrideCabal (oldAttrs: {
maintainers = (oldAttrs.maintainers or []) ++ [ maintainers = (oldAttrs.maintainers or []) ++ [
lib.maintainers.gvolpe lib.maintainers.gvolpe
]; ];
})); }) haskellPackages.dconf2nix);
in in
dconf2nix.overrideAttrs (oldAttrs: { dconf2nix.overrideAttrs (oldAttrs: {

View File

@ -11,8 +11,8 @@ let
inherit (lib) concatStringsSep concatMapStringsSep take splitString; inherit (lib) concatStringsSep concatMapStringsSep take splitString;
getPackages = version: haskell.packages."ghc${version}"; getPackages = version: haskell.packages."ghc${version}";
tunedHls = hsPkgs: tunedHls = hsPkgs:
haskell.lib.justStaticExecutables haskell.lib.compose.justStaticExecutables
(haskell.lib.overrideCabal hsPkgs.haskell-language-server (old: { (haskell.lib.compose.overrideCabal (old: {
postInstall = '' postInstall = ''
remove-references-to -t ${hsPkgs.ghc} $out/bin/haskell-language-server remove-references-to -t ${hsPkgs.ghc} $out/bin/haskell-language-server
remove-references-to -t ${hsPkgs.shake.data} $out/bin/haskell-language-server remove-references-to -t ${hsPkgs.shake.data} $out/bin/haskell-language-server
@ -20,7 +20,7 @@ let
remove-references-to -t ${hsPkgs.js-dgtable.data} $out/bin/haskell-language-server remove-references-to -t ${hsPkgs.js-dgtable.data} $out/bin/haskell-language-server
remove-references-to -t ${hsPkgs.js-flot.data} $out/bin/haskell-language-server remove-references-to -t ${hsPkgs.js-flot.data} $out/bin/haskell-language-server
''; '';
})); }) hsPkgs.haskell-language-server);
targets = version: targets = version:
let packages = getPackages version; let packages = getPackages version;
in [ in [

View File

@ -23,7 +23,7 @@ let allPkgs = pkgs: mueval.defaultPkgs pkgs ++ [ pkgs.lambdabot-trusted ] ++ pac
modulesStr = lib.replaceChars ["\n"] [" "] modules; modulesStr = lib.replaceChars ["\n"] [" "] modules;
configStr = lib.replaceChars ["\n"] [" "] configuration; configStr = lib.replaceChars ["\n"] [" "] configuration;
in haskellLib.overrideCabal haskellPackages.lambdabot (self: { in haskellLib.overrideCabal (self: {
patches = (self.patches or []) ++ [ ./custom-config.patch ]; patches = (self.patches or []) ++ [ ./custom-config.patch ];
postPatch = (self.postPatch or "") + '' postPatch = (self.postPatch or "") + ''
substituteInPlace src/Main.hs \ substituteInPlace src/Main.hs \
@ -38,4 +38,4 @@ in haskellLib.overrideCabal haskellPackages.lambdabot (self: {
wrapProgram $out/bin/lambdabot \ wrapProgram $out/bin/lambdabot \
--prefix PATH ":" '${bins}' --prefix PATH ":" '${bins}'
''; '';
}) }) haskellPackages.lambdabot

View File

@ -1,10 +1,10 @@
{ haskellPackages, fetchpatch, haskell, removeReferencesTo }: { haskellPackages, fetchpatch, haskell, removeReferencesTo }:
let let
static = haskell.lib.justStaticExecutables haskellPackages.pandoc; static = haskell.lib.compose.justStaticExecutables haskellPackages.pandoc;
in in
(haskell.lib.overrideCabal static (drv: { (haskell.lib.compose.overrideCabal (drv: {
configureFlags = drv.configureFlags or [] ++ ["-fembed_data_files"]; configureFlags = drv.configureFlags or [] ++ ["-fembed_data_files"];
buildDepends = drv.buildDepends or [] ++ [haskellPackages.file-embed]; buildDepends = drv.buildDepends or [] ++ [haskellPackages.file-embed];
buildTools = (drv.buildTools or []) ++ [ removeReferencesTo ]; buildTools = (drv.buildTools or []) ++ [ removeReferencesTo ];
@ -16,7 +16,7 @@ in
sha256 = "gOtrWVylzwgu0YLD4SztqlXxtaXXGOf8nTqLwUBS7qs="; sha256 = "gOtrWVylzwgu0YLD4SztqlXxtaXXGOf8nTqLwUBS7qs=";
}) })
]; ];
})).overrideAttrs (drv: { }) static).overrideAttrs (drv: {
# These libraries are still referenced, because they generate # These libraries are still referenced, because they generate
# a `Paths_*` module for figuring out their version. # a `Paths_*` module for figuring out their version.

View File

@ -1,6 +1,6 @@
{ haskell, haskellPackages, lib }: { haskell, haskellPackages, lib }:
haskell.lib.justStaticExecutables (haskell.lib.overrideCabal haskellPackages.pretty-simple (oldAttrs: { haskell.lib.compose.justStaticExecutables (haskell.lib.compose.overrideCabal (oldAttrs: {
maintainers = (oldAttrs.maintainers or []) ++ [ maintainers = (oldAttrs.maintainers or []) ++ [
lib.maintainers.cdepillabout lib.maintainers.cdepillabout
]; ];
@ -8,5 +8,5 @@ haskell.lib.justStaticExecutables (haskell.lib.overrideCabal haskellPackages.pre
configureFlags = (oldAttrs.configureFlags or []) ++ ["-fbuildexe"]; configureFlags = (oldAttrs.configureFlags or []) ++ ["-fbuildexe"];
buildDepends = (oldAttrs.buildDepends or []) ++ [haskellPackages.optparse-applicative]; buildDepends = (oldAttrs.buildDepends or []) ++ [haskellPackages.optparse-applicative];
})) }) haskellPackages.pretty-simple)

View File

@ -12,14 +12,14 @@
let let
spago = spago =
haskell.lib.justStaticExecutables haskell.lib.compose.justStaticExecutables
(haskell.lib.overrideCabal haskellPackages.spago (oldAttrs: { (haskell.lib.compose.overrideCabal (oldAttrs: {
maintainers = (oldAttrs.maintainers or []) ++ [ maintainers = (oldAttrs.maintainers or []) ++ [
lib.maintainers.cdepillabout lib.maintainers.cdepillabout
]; ];
changelog = changelog =
"https://github.com/purescript/spago/releases/tag/${oldAttrs.version}"; "https://github.com/purescript/spago/releases/tag/${oldAttrs.version}";
})); }) haskellPackages.spago);
in in
spago.overrideAttrs (oldAttrs: { spago.overrideAttrs (oldAttrs: {

View File

@ -15,7 +15,7 @@ let
}; };
in drv' // { meta = meta' // overrideFn meta'; }; in drv' // { meta = meta' // overrideFn meta'; };
bin = haskell.lib.justStaticExecutables haskellPackages.ShellCheck; bin = haskell.lib.compose.justStaticExecutables haskellPackages.ShellCheck;
shellcheck = stdenv.mkDerivation { shellcheck = stdenv.mkDerivation {
pname = "shellcheck"; pname = "shellcheck";

View File

@ -2,9 +2,9 @@
let let
drv = haskellPackages.vector; drv = haskellPackages.vector;
docs = pkgs.haskell.lib.documentationTarball drv; docs = pkgs.haskell.lib.compose.documentationTarball drv;
in pkgs.runCommand "test haskell.lib.documentationTarball" { in pkgs.runCommand "test haskell.lib.compose.documentationTarball" {
meta = { meta = {
inherit (docs.meta) platforms; inherit (docs.meta) platforms;
}; };

View File

@ -17,7 +17,7 @@ let
drv = haskellPackages.callPackage pkgDef {}; drv = haskellPackages.callPackage pkgDef {};
test = target: excluded: test = target: excluded:
let only = pkgs.haskell.lib.setBuildTarget drv target; let only = pkgs.haskell.lib.compose.setBuildTarget target drv;
in '' in ''
if [[ ! -f "${only}/bin/${target}" ]]; then if [[ ! -f "${only}/bin/${target}" ]]; then
echo "${target} was not built" echo "${target} was not built"
@ -31,7 +31,7 @@ let
''; '';
in in
pkgs.runCommand "test haskell.lib.setBuildTarget" { pkgs.runCommand "test haskell.lib.compose.setBuildTarget" {
meta = { meta = {
inherit (drv.meta) platforms; inherit (drv.meta) platforms;
}; };

View File

@ -1,7 +1,7 @@
{ lib, pkgs, makeWrapper, haskellPackages, haskell, pandoc, imagemagick, CoreServices }: { lib, pkgs, makeWrapper, haskellPackages, haskell, pandoc, imagemagick, CoreServices }:
with lib; with lib;
with haskell.lib; with haskell.lib.compose;
let let
ldgallery-viewer = pkgs.callPackage ./viewer { inherit CoreServices; }; ldgallery-viewer = pkgs.callPackage ./viewer { inherit CoreServices; };
@ -12,7 +12,7 @@ in
# making sure that the versions of the compiler and viewer parts are in sync # making sure that the versions of the compiler and viewer parts are in sync
assert ldgallery-compiler.version == versions.majorMinor ldgallery-viewer.version; assert ldgallery-compiler.version == versions.majorMinor ldgallery-viewer.version;
justStaticExecutables (overrideCabal ldgallery-compiler (oldAttrs: { justStaticExecutables (overrideCabal (oldAttrs: {
pname = "ldgallery"; # bundled viewer + compiler pname = "ldgallery"; # bundled viewer + compiler
buildTools = (oldAttrs.buildTools or []) ++ [ makeWrapper pandoc ]; buildTools = (oldAttrs.buildTools or []) ++ [ makeWrapper pandoc ];
@ -50,4 +50,4 @@ justStaticExecutables (overrideCabal ldgallery-compiler (oldAttrs: {
# other package metadata (maintainer, description, license, ...) # other package metadata (maintainer, description, license, ...)
# are inherited from the compiler package # are inherited from the compiler package
})) }) ldgallery-compiler)

View File

@ -1631,7 +1631,7 @@ with pkgs;
ecdsautils = callPackage ../tools/security/ecdsautils { }; ecdsautils = callPackage ../tools/security/ecdsautils { };
echidna = haskell.lib.justStaticExecutables (haskellPackages.callPackage (../tools/security/echidna) { }); echidna = haskell.lib.compose.justStaticExecutables (haskellPackages.callPackage (../tools/security/echidna) { });
sedutil = callPackage ../tools/security/sedutil { }; sedutil = callPackage ../tools/security/sedutil { };
@ -1781,7 +1781,7 @@ with pkgs;
hime = callPackage ../tools/inputmethods/hime {}; hime = callPackage ../tools/inputmethods/hime {};
hinit = haskell.lib.justStaticExecutables haskellPackages.hinit; hinit = haskell.lib.compose.justStaticExecutables haskellPackages.hinit;
hostctl = callPackage ../tools/system/hostctl { }; hostctl = callPackage ../tools/system/hostctl { };
@ -2308,7 +2308,7 @@ with pkgs;
cue2pops = callPackage ../tools/cd-dvd/cue2pops { }; cue2pops = callPackage ../tools/cd-dvd/cue2pops { };
cabal2nix-unwrapped = haskell.lib.justStaticExecutables (haskell.lib.generateOptparseApplicativeCompletion "cabal2nix" haskellPackages.cabal2nix); cabal2nix-unwrapped = haskell.lib.compose.justStaticExecutables (haskell.lib.compose.generateOptparseApplicativeCompletion "cabal2nix" haskellPackages.cabal2nix);
cabal2nix = symlinkJoin { cabal2nix = symlinkJoin {
inherit (cabal2nix-unwrapped) name meta; inherit (cabal2nix-unwrapped) name meta;
@ -2926,7 +2926,7 @@ with pkgs;
fsmark = callPackage ../tools/misc/fsmark { }; fsmark = callPackage ../tools/misc/fsmark { };
futhark = haskell.lib.justStaticExecutables haskellPackages.futhark; futhark = haskell.lib.compose.justStaticExecutables haskellPackages.futhark;
inherit (nodePackages) fx; inherit (nodePackages) fx;
@ -3336,7 +3336,7 @@ with pkgs;
nix-direnv = callPackage ../tools/misc/nix-direnv { }; nix-direnv = callPackage ../tools/misc/nix-direnv { };
nix-direnv-flakes = callPackage ../tools/misc/nix-direnv { enableFlakes = true; }; nix-direnv-flakes = callPackage ../tools/misc/nix-direnv { enableFlakes = true; };
nix-output-monitor = haskell.lib.justStaticExecutables (haskellPackages.nix-output-monitor); nix-output-monitor = haskell.lib.compose.justStaticExecutables (haskellPackages.nix-output-monitor);
nix-template = callPackage ../tools/package-management/nix-template { nix-template = callPackage ../tools/package-management/nix-template {
inherit (darwin.apple_sdk.frameworks) Security; inherit (darwin.apple_sdk.frameworks) Security;
@ -4785,7 +4785,7 @@ with pkgs;
uudeview = callPackage ../tools/misc/uudeview { }; uudeview = callPackage ../tools/misc/uudeview { };
uusi = haskell.lib.justStaticExecutables haskellPackages.uusi; uusi = haskell.lib.compose.justStaticExecutables haskellPackages.uusi;
uutils-coreutils = callPackage ../tools/misc/uutils-coreutils { uutils-coreutils = callPackage ../tools/misc/uutils-coreutils {
inherit (python3Packages) sphinx; inherit (python3Packages) sphinx;
@ -6315,7 +6315,7 @@ with pkgs;
icemon = libsForQt5.callPackage ../applications/networking/icemon { }; icemon = libsForQt5.callPackage ../applications/networking/icemon { };
icepeak = haskell.lib.justStaticExecutables haskellPackages.icepeak; icepeak = haskell.lib.compose.justStaticExecutables haskellPackages.icepeak;
iceshelf = callPackage ../tools/backup/iceshelf { }; iceshelf = callPackage ../tools/backup/iceshelf { };
@ -7368,7 +7368,7 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Foundation; inherit (darwin.apple_sdk.frameworks) Foundation;
}; };
madlang = haskell.lib.justStaticExecutables haskellPackages.madlang; madlang = haskell.lib.compose.justStaticExecutables haskellPackages.madlang;
maeparser = callPackage ../development/libraries/maeparser { }; maeparser = callPackage ../development/libraries/maeparser { };
@ -7819,7 +7819,7 @@ with pkgs;
ngrep = callPackage ../tools/networking/ngrep { }; ngrep = callPackage ../tools/networking/ngrep { };
neuron-notes = haskell.lib.justStaticExecutables (haskell.lib.generateOptparseApplicativeCompletion "neuron" haskellPackages.neuron); neuron-notes = haskell.lib.compose.justStaticExecutables (haskell.lib.compose.generateOptparseApplicativeCompletion "neuron" haskellPackages.neuron);
ngrok = ngrok-2; ngrok = ngrok-2;
@ -7865,7 +7865,7 @@ with pkgs;
nvchecker = with python3Packages; toPythonApplication nvchecker; nvchecker = with python3Packages; toPythonApplication nvchecker;
nvfetcher = haskell.lib.justStaticExecutables haskellPackages.nvfetcher; nvfetcher = haskell.lib.compose.justStaticExecutables haskellPackages.nvfetcher;
miller = callPackage ../tools/text/miller { }; miller = callPackage ../tools/text/miller { };
@ -8213,7 +8213,7 @@ with pkgs;
update-dotdee = with python3Packages; toPythonApplication update-dotdee; update-dotdee = with python3Packages; toPythonApplication update-dotdee;
update-nix-fetchgit = haskell.lib.justStaticExecutables haskellPackages.update-nix-fetchgit; update-nix-fetchgit = haskell.lib.compose.justStaticExecutables haskellPackages.update-nix-fetchgit;
update-resolv-conf = callPackage ../tools/networking/openvpn/update-resolv-conf.nix { }; update-resolv-conf = callPackage ../tools/networking/openvpn/update-resolv-conf.nix { };
@ -9573,7 +9573,7 @@ with pkgs;
speech-denoiser = callPackage ../applications/audio/speech-denoiser {}; speech-denoiser = callPackage ../applications/audio/speech-denoiser {};
splot = haskell.lib.justStaticExecutables haskellPackages.splot; splot = haskell.lib.compose.justStaticExecutables haskellPackages.splot;
spotdl = callPackage ../tools/audio/spotdl { }; spotdl = callPackage ../tools/audio/spotdl { };
@ -9687,13 +9687,13 @@ with pkgs;
stuntman = callPackage ../tools/networking/stuntman { }; stuntman = callPackage ../tools/networking/stuntman { };
stutter = haskell.lib.justStaticExecutables haskellPackages.stutter; stutter = haskell.lib.compose.justStaticExecutables haskellPackages.stutter;
strongswan = callPackage ../tools/networking/strongswan { }; strongswan = callPackage ../tools/networking/strongswan { };
strongswanTNC = strongswan.override { enableTNC = true; }; strongswanTNC = strongswan.override { enableTNC = true; };
strongswanNM = strongswan.override { enableNetworkManager = true; }; strongswanNM = strongswan.override { enableNetworkManager = true; };
stylish-haskell = haskell.lib.justStaticExecutables haskellPackages.stylish-haskell; stylish-haskell = haskell.lib.compose.justStaticExecutables haskellPackages.stylish-haskell;
su = shadow.su; su = shadow.su;
@ -10474,7 +10474,7 @@ with pkgs;
wsmancli = callPackage ../tools/system/wsmancli {}; wsmancli = callPackage ../tools/system/wsmancli {};
wstunnel = haskell.lib.justStaticExecutables haskellPackages.wstunnel; wstunnel = haskell.lib.compose.justStaticExecutables haskellPackages.wstunnel;
wolfebin = callPackage ../tools/networking/wolfebin { wolfebin = callPackage ../tools/networking/wolfebin {
python = python2; python = python2;
@ -10523,7 +10523,7 @@ with pkgs;
time = callPackage ../tools/misc/time { }; time = callPackage ../tools/misc/time { };
tweet-hs = haskell.lib.justStaticExecutables haskellPackages.tweet-hs; tweet-hs = haskell.lib.compose.justStaticExecutables haskellPackages.tweet-hs;
tweeny = callPackage ../development/libraries/tweeny { }; tweeny = callPackage ../development/libraries/tweeny { };
@ -11457,7 +11457,7 @@ with pkgs;
eql = callPackage ../development/compilers/eql {}; eql = callPackage ../development/compilers/eql {};
elm2nix = haskell.lib.justStaticExecutables haskellPackages.elm2nix; elm2nix = haskell.lib.compose.justStaticExecutables haskellPackages.elm2nix;
elmPackages = recurseIntoAttrs (callPackage ../development/compilers/elm { elmPackages = recurseIntoAttrs (callPackage ../development/compilers/elm {
inherit (darwin.apple_sdk.frameworks) Security; inherit (darwin.apple_sdk.frameworks) Security;
@ -11964,14 +11964,14 @@ with pkgs;
inherit (haskellPackages) ghc; inherit (haskellPackages) ghc;
cabal-install = haskell.lib.justStaticExecutables haskellPackages.cabal-install; cabal-install = haskell.lib.compose.justStaticExecutables haskellPackages.cabal-install;
stack = haskell.lib.justStaticExecutables haskellPackages.stack; stack = haskell.lib.compose.justStaticExecutables haskellPackages.stack;
hlint = haskell.lib.justStaticExecutables haskellPackages.hlint; hlint = haskell.lib.compose.justStaticExecutables haskellPackages.hlint;
krank = haskell.lib.justStaticExecutables haskellPackages.krank; krank = haskell.lib.compose.justStaticExecutables haskellPackages.krank;
stylish-cabal = haskell.lib.justStaticExecutables haskellPackages.stylish-cabal; stylish-cabal = haskell.lib.compose.justStaticExecutables haskellPackages.stylish-cabal;
all-cabal-hashes = callPackage ../data/misc/hackage { }; all-cabal-hashes = callPackage ../data/misc/hackage { };
@ -12326,7 +12326,7 @@ with pkgs;
knightos-z80e = callPackage ../development/tools/knightos/z80e { }; knightos-z80e = callPackage ../development/tools/knightos/z80e { };
koka = haskell.lib.justStaticExecutables (haskellPackages.callPackage ../development/compilers/koka { }); koka = haskell.lib.compose.justStaticExecutables (haskellPackages.callPackage ../development/compilers/koka { });
kotlin = callPackage ../development/compilers/kotlin { }; kotlin = callPackage ../development/compilers/kotlin { };
kotlin-native = callPackage ../development/compilers/kotlin/native.nix { }; kotlin-native = callPackage ../development/compilers/kotlin/native.nix { };
@ -13169,19 +13169,19 @@ with pkgs;
clooj = callPackage ../development/interpreters/clojure/clooj.nix { }; clooj = callPackage ../development/interpreters/clojure/clooj.nix { };
dhall = haskell.lib.justStaticExecutables haskellPackages.dhall; dhall = haskell.lib.compose.justStaticExecutables haskellPackages.dhall;
dhall-bash = haskell.lib.justStaticExecutables haskellPackages.dhall-bash; dhall-bash = haskell.lib.compose.justStaticExecutables haskellPackages.dhall-bash;
dhall-docs = haskell.lib.justStaticExecutables haskellPackages.dhall-docs; dhall-docs = haskell.lib.compose.justStaticExecutables haskellPackages.dhall-docs;
dhall-lsp-server = haskell.lib.justStaticExecutables haskellPackages.dhall-lsp-server; dhall-lsp-server = haskell.lib.compose.justStaticExecutables haskellPackages.dhall-lsp-server;
dhall-json = haskell.lib.justStaticExecutables haskellPackages.dhall-json; dhall-json = haskell.lib.compose.justStaticExecutables haskellPackages.dhall-json;
dhall-nix = haskell.lib.justStaticExecutables haskellPackages.dhall-nix; dhall-nix = haskell.lib.compose.justStaticExecutables haskellPackages.dhall-nix;
dhall-text = haskell.lib.justStaticExecutables haskellPackages.dhall-text; dhall-text = haskell.lib.compose.justStaticExecutables haskellPackages.dhall-text;
dhallPackages = recurseIntoAttrs (callPackage ./dhall-packages.nix { }); dhallPackages = recurseIntoAttrs (callPackage ./dhall-packages.nix { });
@ -14428,7 +14428,7 @@ with pkgs;
flootty = callPackage ../development/tools/flootty { }; flootty = callPackage ../development/tools/flootty { };
fffuu = haskell.lib.justStaticExecutables (haskellPackages.callPackage ../tools/misc/fffuu { }); fffuu = haskell.lib.compose.justStaticExecutables (haskellPackages.callPackage ../tools/misc/fffuu { });
ffuf = callPackage ../tools/security/ffuf { }; ffuf = callPackage ../tools/security/ffuf { };
@ -14596,7 +14596,7 @@ with pkgs;
guile = guile_2_0; guile = guile_2_0;
}; };
hadolint = haskell.lib.justStaticExecutables haskellPackages.hadolint; hadolint = haskell.lib.compose.justStaticExecutables haskellPackages.hadolint;
halfempty = callPackage ../development/tools/halfempty {}; halfempty = callPackage ../development/tools/halfempty {};
@ -14825,8 +14825,8 @@ with pkgs;
msitools = callPackage ../development/tools/misc/msitools { }; msitools = callPackage ../development/tools/misc/msitools { };
haskell-ci = haskell.lib.justStaticExecutables haskellPackages.haskell-ci; haskell-ci = haskell.lib.compose.justStaticExecutables haskellPackages.haskell-ci;
haskell-ci-unstable = lowPrio (haskell.lib.justStaticExecutables haskellPackages.haskell-ci-unstable); haskell-ci-unstable = lowPrio (haskell.lib.compose.justStaticExecutables haskellPackages.haskell-ci-unstable);
neoload = callPackage ../development/tools/neoload { neoload = callPackage ../development/tools/neoload {
licenseAccepted = (config.neoload.accept_license or false); licenseAccepted = (config.neoload.accept_license or false);
@ -15116,7 +15116,7 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security; inherit (darwin.apple_sdk.frameworks) Security;
}; };
shake = haskell.lib.justStaticExecutables haskellPackages.shake; shake = haskell.lib.compose.justStaticExecutables haskellPackages.shake;
shallot = callPackage ../tools/misc/shallot { }; shallot = callPackage ../tools/misc/shallot { };
@ -15692,7 +15692,7 @@ with pkgs;
c-blosc = callPackage ../development/libraries/c-blosc { }; c-blosc = callPackage ../development/libraries/c-blosc { };
# justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990 # justStaticExecutables is needed due to https://github.com/NixOS/nix/issues/2990
cachix = haskell.lib.justStaticExecutables haskellPackages.cachix; cachix = haskell.lib.compose.justStaticExecutables haskellPackages.cachix;
hercules-ci-agent = callPackage ../development/tools/continuous-integration/hercules-ci-agent { }; hercules-ci-agent = callPackage ../development/tools/continuous-integration/hercules-ci-agent { };
@ -15700,7 +15700,7 @@ with pkgs;
isa-l = callPackage ../development/libraries/isa-l { }; isa-l = callPackage ../development/libraries/isa-l { };
niv = lib.getBin (haskell.lib.justStaticExecutables haskellPackages.niv); niv = lib.getBin (haskell.lib.compose.justStaticExecutables haskellPackages.niv);
ormolu = haskellPackages.ormolu.bin; ormolu = haskellPackages.ormolu.bin;
@ -16593,7 +16593,7 @@ with pkgs;
glib-testing = callPackage ../development/libraries/glib-testing { }; glib-testing = callPackage ../development/libraries/glib-testing { };
glirc = haskell.lib.justStaticExecutables haskellPackages.glirc; glirc = haskell.lib.compose.justStaticExecutables haskellPackages.glirc;
gom = callPackage ../development/libraries/gom { }; gom = callPackage ../development/libraries/gom { };
@ -16984,7 +16984,7 @@ with pkgs;
json2hcl = callPackage ../development/tools/json2hcl { }; json2hcl = callPackage ../development/tools/json2hcl { };
json2yaml = haskell.lib.justStaticExecutables haskellPackages.json2yaml; json2yaml = haskell.lib.compose.justStaticExecutables haskellPackages.json2yaml;
json-glib = callPackage ../development/libraries/json-glib { }; json-glib = callPackage ../development/libraries/json-glib { };
@ -18442,7 +18442,7 @@ with pkgs;
matio = callPackage ../development/libraries/matio { }; matio = callPackage ../development/libraries/matio { };
matterhorn = haskell.lib.justStaticExecutables haskellPackages.matterhorn; matterhorn = haskell.lib.compose.justStaticExecutables haskellPackages.matterhorn;
maxflow = callPackage ../development/libraries/maxflow { }; maxflow = callPackage ../development/libraries/maxflow { };
@ -18929,7 +18929,7 @@ with pkgs;
pkgdiff = callPackage ../tools/misc/pkgdiff { }; pkgdiff = callPackage ../tools/misc/pkgdiff { };
place-cursor-at = haskell.lib.justStaticExecutables haskellPackages.place-cursor-at; place-cursor-at = haskell.lib.compose.justStaticExecutables haskellPackages.place-cursor-at;
plib = callPackage ../development/libraries/plib { }; plib = callPackage ../development/libraries/plib { };
@ -19205,7 +19205,7 @@ with pkgs;
kissfft = callPackage ../development/libraries/kissfft { }; kissfft = callPackage ../development/libraries/kissfft { };
lambdabot = callPackage ../development/tools/haskell/lambdabot { lambdabot = callPackage ../development/tools/haskell/lambdabot {
haskellLib = haskell.lib; haskellLib = haskell.lib.compose;
}; };
lambda-mod-zsh-theme = callPackage ../shells/zsh/lambda-mod-zsh-theme { }; lambda-mod-zsh-theme = callPackage ../shells/zsh/lambda-mod-zsh-theme { };
@ -20628,7 +20628,7 @@ with pkgs;
hashi-ui = callPackage ../servers/hashi-ui {}; hashi-ui = callPackage ../servers/hashi-ui {};
hasura-graphql-engine = haskell.lib.justStaticExecutables haskellPackages.graphql-engine; hasura-graphql-engine = haskell.lib.compose.justStaticExecutables haskellPackages.graphql-engine;
hasura-cli = callPackage ../servers/hasura/cli.nix { }; hasura-cli = callPackage ../servers/hasura/cli.nix { };
@ -21384,7 +21384,7 @@ with pkgs;
sogo = callPackage ../servers/web-apps/sogo { }; sogo = callPackage ../servers/web-apps/sogo { };
spacecookie = spacecookie =
haskell.lib.justStaticExecutables haskellPackages.spacecookie; haskell.lib.compose.justStaticExecutables haskellPackages.spacecookie;
spawn_fcgi = callPackage ../servers/http/spawn-fcgi { }; spawn_fcgi = callPackage ../servers/http/spawn-fcgi { };
@ -24290,9 +24290,9 @@ with pkgs;
dablin = callPackage ../applications/radio/dablin { }; dablin = callPackage ../applications/radio/dablin { };
darcs = haskell.lib.overrideCabal (haskell.lib.justStaticExecutables haskellPackages.darcs) (drv: { darcs = haskell.lib.compose.overrideCabal (drv: {
configureFlags = (lib.remove "-flibrary" drv.configureFlags or []) ++ ["-f-library"]; configureFlags = (lib.remove "-flibrary" drv.configureFlags or []) ++ ["-f-library"];
}); }) (haskell.lib.compose.justStaticExecutables haskellPackages.darcs);
darcs-to-git = callPackage ../applications/version-management/git-and-tools/darcs-to-git { }; darcs-to-git = callPackage ../applications/version-management/git-and-tools/darcs-to-git { };
@ -25500,12 +25500,12 @@ with pkgs;
hivelytracker = callPackage ../applications/audio/hivelytracker { }; hivelytracker = callPackage ../applications/audio/hivelytracker { };
hledger = haskell.lib.justStaticExecutables haskellPackages.hledger; hledger = haskell.lib.compose.justStaticExecutables haskellPackages.hledger;
hledger-check-fancyassertions = callPackage ../applications/office/hledger-check-fancyassertions { }; hledger-check-fancyassertions = callPackage ../applications/office/hledger-check-fancyassertions { };
hledger-iadd = haskell.lib.justStaticExecutables haskellPackages.hledger-iadd; hledger-iadd = haskell.lib.compose.justStaticExecutables haskellPackages.hledger-iadd;
hledger-interest = haskell.lib.justStaticExecutables haskellPackages.hledger-interest; hledger-interest = haskell.lib.compose.justStaticExecutables haskellPackages.hledger-interest;
hledger-ui = haskell.lib.justStaticExecutables haskellPackages.hledger-ui; hledger-ui = haskell.lib.compose.justStaticExecutables haskellPackages.hledger-ui;
hledger-web = haskell.lib.justStaticExecutables haskellPackages.hledger-web; hledger-web = haskell.lib.compose.justStaticExecutables haskellPackages.hledger-web;
homebank = callPackage ../applications/office/homebank { homebank = callPackage ../applications/office/homebank {
gtk = gtk3; gtk = gtk3;
@ -25523,7 +25523,7 @@ with pkgs;
hdl-dump = callPackage ../tools/misc/hdl-dump { }; hdl-dump = callPackage ../tools/misc/hdl-dump { };
hpack = haskell.lib.justStaticExecutables haskellPackages.hpack; hpack = haskell.lib.compose.justStaticExecutables haskellPackages.hpack;
hpcg = callPackage ../tools/misc/hpcg/default.nix { }; hpcg = callPackage ../tools/misc/hpcg/default.nix { };
@ -25594,7 +25594,7 @@ with pkgs;
pinboard = with python3Packages; toPythonApplication pinboard; pinboard = with python3Packages; toPythonApplication pinboard;
pinboard-notes-backup = haskell.lib.justStaticExecutables haskellPackages.pinboard-notes-backup; pinboard-notes-backup = haskell.lib.compose.justStaticExecutables haskellPackages.pinboard-notes-backup;
pixelnuke = callPackage ../applications/graphics/pixelnuke { }; pixelnuke = callPackage ../applications/graphics/pixelnuke { };
@ -28204,7 +28204,7 @@ with pkgs;
teamspeak_client = libsForQt5.callPackage ../applications/networking/instant-messengers/teamspeak/client.nix { }; teamspeak_client = libsForQt5.callPackage ../applications/networking/instant-messengers/teamspeak/client.nix { };
teamspeak_server = callPackage ../applications/networking/instant-messengers/teamspeak/server.nix { }; teamspeak_server = callPackage ../applications/networking/instant-messengers/teamspeak/server.nix { };
taskell = haskell.lib.justStaticExecutables haskellPackages.taskell; taskell = haskell.lib.compose.justStaticExecutables haskellPackages.taskell;
tap-plugins = callPackage ../applications/audio/tap-plugins { }; tap-plugins = callPackage ../applications/audio/tap-plugins { };
@ -28507,7 +28507,7 @@ with pkgs;
uroboros = callPackage ../tools/system/uroboros { }; uroboros = callPackage ../tools/system/uroboros { };
uuagc = haskell.lib.justStaticExecutables haskellPackages.uuagc; uuagc = haskell.lib.compose.justStaticExecutables haskellPackages.uuagc;
uucp = callPackage ../tools/misc/uucp { }; uucp = callPackage ../tools/misc/uucp { };
@ -29702,7 +29702,7 @@ with pkgs;
bean-add = callPackage ../applications/office/beancount/bean-add.nix { }; bean-add = callPackage ../applications/office/beancount/bean-add.nix { };
bench = haskell.lib.justStaticExecutables haskellPackages.bench; bench = haskell.lib.compose.justStaticExecutables haskellPackages.bench;
beret = callPackage ../games/beret { }; beret = callPackage ../games/beret { };
@ -32413,9 +32413,9 @@ with pkgs;
nix-bundle = callPackage ../tools/package-management/nix-bundle { }; nix-bundle = callPackage ../tools/package-management/nix-bundle { };
nix-delegate = haskell.lib.justStaticExecutables haskellPackages.nix-delegate; nix-delegate = haskell.lib.compose.justStaticExecutables haskellPackages.nix-delegate;
nix-deploy = haskell.lib.justStaticExecutables haskellPackages.nix-deploy; nix-deploy = haskell.lib.compose.justStaticExecutables haskellPackages.nix-deploy;
nix-diff = haskell.lib.justStaticExecutables haskellPackages.nix-diff; nix-diff = haskell.lib.compose.justStaticExecutables haskellPackages.nix-diff;
nix-du = callPackage ../tools/package-management/nix-du { nix-du = callPackage ../tools/package-management/nix-du {
inherit (darwin.apple_sdk.frameworks) Security; inherit (darwin.apple_sdk.frameworks) Security;
@ -32429,7 +32429,7 @@ with pkgs;
}; };
nix-index = callPackage ../tools/package-management/nix-index/wrapper.nix { }; nix-index = callPackage ../tools/package-management/nix-index/wrapper.nix { };
nix-linter = haskell.lib.justStaticExecutables (haskellPackages.nix-linter); nix-linter = haskell.lib.compose.justStaticExecutables (haskellPackages.nix-linter);
nixos-option = callPackage ../tools/nix/nixos-option { }; nixos-option = callPackage ../tools/nix/nixos-option { };
@ -32460,7 +32460,7 @@ with pkgs;
nix-top = callPackage ../tools/package-management/nix-top { }; nix-top = callPackage ../tools/package-management/nix-top { };
nix-tree = haskell.lib.justStaticExecutables (haskellPackages.nix-tree); nix-tree = haskell.lib.compose.justStaticExecutables (haskellPackages.nix-tree);
nix-universal-prefetch = callPackage ../tools/package-management/nix-universal-prefetch { }; nix-universal-prefetch = callPackage ../tools/package-management/nix-universal-prefetch { };
@ -32476,7 +32476,7 @@ with pkgs;
nix-simple-deploy = callPackage ../tools/package-management/nix-simple-deploy { }; nix-simple-deploy = callPackage ../tools/package-management/nix-simple-deploy { };
nixfmt = haskell.lib.justStaticExecutables haskellPackages.nixfmt; nixfmt = haskell.lib.compose.justStaticExecutables haskellPackages.nixfmt;
nixpkgs-fmt = callPackage ../tools/nix/nixpkgs-fmt { }; nixpkgs-fmt = callPackage ../tools/nix/nixpkgs-fmt { };

View File

@ -19,13 +19,13 @@ let
"ghcHEAD" "ghcHEAD"
]; ];
haskellLib = import ../development/haskell-modules/lib.nix { haskellLibUncomposable = import ../development/haskell-modules/lib.nix {
inherit (pkgs) lib; inherit (pkgs) lib;
inherit pkgs; inherit pkgs;
}; };
callPackage = newScope { callPackage = newScope {
inherit haskellLib; haskellLib = haskellLibUncomposable.compose;
overrides = pkgs.haskell.packageOverrides; overrides = pkgs.haskell.packageOverrides;
}; };
@ -44,7 +44,7 @@ let
inherit (pkgs.haskell) compiler packages; inherit (pkgs.haskell) compiler packages;
in { in {
lib = haskellLib; lib = haskellLibUncomposable;
package-list = callPackage ../development/haskell-modules/package-list.nix {}; package-list = callPackage ../development/haskell-modules/package-list.nix {};