Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b602082e079c
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 073b30563d42
Choose a head ref
  • 3 commits
  • 4 files changed
  • 3 contributors

Commits on Jul 27, 2017

  1. 2
    Copy the full SHA
    be63b19 View commit details
  2. hackage-packages.nix: automatic Haskell package set update

    This update was generated by hackage2nix v2.3.1-25-ge9e9669 from Hackage revision
    commercialhaskell/all-cabal-hashes@8b34a74.
    peti committed Jul 27, 2017
    Copy the full SHA
    2b0ce7a View commit details
  3. Copy the full SHA
    073b305 View commit details
8 changes: 4 additions & 4 deletions pkgs/development/haskell-modules/configuration-common.nix
Original file line number Diff line number Diff line change
@@ -594,10 +594,10 @@ self: super: {
doCheck = false; # https://github.com/kazu-yamamoto/ghc-mod/issues/335
executableToolDepends = drv.executableToolDepends or [] ++ [pkgs.emacs];
postInstall = ''
local lispdir=( "$out/share/"*"-${self.ghc.name}/${drv.pname}-${drv.version}/elisp" )
local lispdir=( "$data/share/${self.ghc.name}/*/${drv.pname}-${drv.version}/elisp" )
make -C $lispdir
mkdir -p $out/share/emacs/site-lisp
ln -s "$lispdir/"*.el{,c} $out/share/emacs/site-lisp/
mkdir -p $data/share/emacs/site-lisp
ln -s "$lispdir/"*.el{,c} $data/share/emacs/site-lisp/
'';
});

@@ -728,7 +728,7 @@ self: super: {
};
in overrideCabal super.servant (old: {
postInstall = old.postInstall or "" + ''
ln -s ${docs} $out/share/doc/servant
ln -s ${docs} $doc/share/doc/servant
'';
});

19 changes: 17 additions & 2 deletions pkgs/development/haskell-modules/generic-builder.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, ghc, pkgconfig, glibcLocales, coreutils, gnugrep, gnused
, jailbreak-cabal, hscolour, cpphs, nodejs, lib
, jailbreak-cabal, hscolour, cpphs, nodejs, lib, removeReferencesTo
}: let isCross = (ghc.cross or null) != null; in

{ pname
@@ -53,6 +53,8 @@
, coreSetup ? false # Use only core packages to build Setup.hs.
, useCpphs ? false
, hardeningDisable ? lib.optional (ghc.isHaLVM or false) "all"
, enableSeparateDataOutput ? false
, enableSeparateDocOutput ? doHaddock
} @ args:

assert editedCabalFile != null -> revision != null;
@@ -108,6 +110,8 @@ let

defaultConfigureFlags = [
"--verbose" "--prefix=$out" "--libdir=\\$prefix/lib/\\$compiler" "--libsubdir=\\$pkgid"
(optionalString enableSeparateDataOutput "--datadir=$data/share/${ghc.name}")
(optionalString enableSeparateDocOutput "--docdir=$doc/share/doc")
"--with-gcc=$CC" # Clang won't work without that extra information.
"--package-db=$packageConfDir"
(optionalString (enableSharedExecutables && stdenv.isLinux) "--ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.name}/${pname}-${version}")
@@ -144,7 +148,7 @@ let
allPkgconfigDepends = pkgconfigDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends ++
optionals doCheck testPkgconfigDepends ++ optionals withBenchmarkDepends benchmarkPkgconfigDepends;

nativeBuildInputs = buildTools ++ libraryToolDepends ++ executableToolDepends;
nativeBuildInputs = buildTools ++ libraryToolDepends ++ executableToolDepends ++ [ removeReferencesTo ];
propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends;
otherBuildInputs = setupHaskellDepends ++ extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++
optionals (allPkgconfigDepends != []) ([pkgconfig] ++ allPkgconfigDepends) ++
@@ -173,6 +177,9 @@ assert allPkgconfigDepends != [] -> pkgconfig != null;
stdenv.mkDerivation ({
name = "${pname}-${version}";

outputs = if (args ? outputs) then args.outputs else ([ "out" ] ++ (optional enableSeparateDataOutput "data") ++ (optional enableSeparateDocOutput "doc"));
setOutputFlags = false;

pos = builtins.unsafeGetAttrPos "pname" args;

prePhases = ["setupCompilerEnvironmentPhase"];
@@ -323,6 +330,14 @@ stdenv.mkDerivation ({
done
''}
${optionalString enableSeparateDocOutput ''
for x in $doc/share/doc/html/src/*.html; do
remove-references-to -t $out $x
done
mkdir -p $doc
''}
${optionalString enableSeparateDataOutput "mkdir -p $data"}
runHook postInstall
'';

1,245 changes: 1,195 additions & 50 deletions pkgs/development/haskell-modules/hackage-packages.nix

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions pkgs/development/haskell-modules/lib.nix
Original file line number Diff line number Diff line change
@@ -111,4 +111,6 @@ rec {
overrideSrc = drv: { src, version ? drv.version }:
overrideCabal drv (_: { inherit src version; editedCabalFile = null; });

hasNoDataOutput = drv: overrideCabal drv (drv: { hasDataDir = false; });
hasNoDocOutput = drv: overrideCabal drv (drv: { hasDocDir = false; });
}