@@ -40,20 +40,15 @@ with rec {
40 // cabal.arch // { "is${arch}" = true; };
40 // cabal.arch // { "is${arch}" = true; };
43−# The `doVerbose` here is a nasty hack. We want to be
43+# These are the keys that <pkg>.override can override.
44−# able to say <package>.override { <some-generic-builder-arg> = <value };
44+# the ... is used to allow to override all potential
45−# however due to the wrapping here, we'd need to capture all arguments
45+# other keys, that the builder understands.
46−# and strip out `mkDerivation, stdenv, flags` and then inherit them all.
46+{ mkDerivation, stdenv, flags ? {}, ... }@args:
47−# OR define the keys and inherit them here (which is what we did with
48−# `doVerbose`. The better solution then is to try and drop those values
49−# from an @args caputre instead.
50−{ mkDerivation, stdenv, flags ? {}, doVerbose ? false }:
51let expr = expr0 flags;
47let expr = expr0 flags;
52 pname = expr.package.identifier.name;
48 pname = expr.package.identifier.name;
53 pversion = expr.package.identifier.version;
49 pversion = expr.package.identifier.version;
54in mkDerivation ({
50in mkDerivation ({
55 inherit pname;
51 inherit pname;
57 version = pversion;
52 version = pversion;
58 sha256 = (import <hackage/all-cabal-hashes.nix>).${pname}.${pversion} or null;
53 sha256 = (import <hackage/all-cabal-hashes.nix>).${pname}.${pversion} or null;
@@ -81,4 +76,4 @@ in mkDerivation ({
81 inherit (expr) src;
76 inherit (expr) src;
82} // pkgs.lib.optionalAttrs (builtins.hasAttr "postUnpack" expr) {
77} // pkgs.lib.optionalAttrs (builtins.hasAttr "postUnpack" expr) {
83 inherit (expr) postUnpack;
78 inherit (expr) postUnpack;
84−})
79+} // builtins.removeAttrs args [ "mkDerivation" "stdenv" "flags" ])