From 07f8f50c6d3c1f0e28c8ca734dfd1203ac9e7061 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 18 Sep 2015 16:50:22 +0200 Subject: [PATCH] git-annex: build w/o assistant in Stackage, with assistant for Nixpkgs --- .../git-and-tools/default.nix | 8 ++++---- .../haskell-modules/configuration-common.nix | 18 ++++++++++++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix index adf8027bf27..12ca1434466 100644 --- a/pkgs/applications/version-management/git-and-tools/default.nix +++ b/pkgs/applications/version-management/git-and-tools/default.nix @@ -1,6 +1,6 @@ -/* moving all git tools into one attribute set because git is unlikely to be - * referenced by other packages and you can get a fast overview. -*/ +/* All git-relates tools live here, in a separate attribute set so that users + * can get a fast overview over what's available. + */ args @ {pkgs}: with args; with pkgs; let inherit (pkgs) stdenv fetchgit fetchurl subversion; @@ -46,7 +46,7 @@ rec { sendEmailSupport = !stdenv.isDarwin; }; - inherit (pkgs.haskellPackages) git-annex; + git-annex = pkgs.haskellPackages.git-annex-with-assistant; gitAnnex = git-annex; qgit = import ./qgit { diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index e29a3e622fc..640151a26e2 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -57,8 +57,22 @@ self: super: { # Link the proper version. zeromq4-haskell = super.zeromq4-haskell.override { zeromq = pkgs.zeromq4; }; - # These changes are required to support Darwin. - git-annex = (disableSharedExecutables super.git-annex).override { + # This package needs a little help compiling properly on Darwin. Furthermore, + # Stackage compiles git-annex without the Assistant, supposedly because not + # all required dependencies are part of Stackage. To comply with Stackage, we + # make 'git-annex-without-assistant' our default version, but offer another + # build which has the assistant to be used in the top-level. + git-annex_5_20150916 = (disableCabalFlag super.git-annex_5_20150916 "assistant").override { + dbus = if pkgs.stdenv.isLinux then self.dbus else null; + fdo-notify = if pkgs.stdenv.isLinux then self.fdo-notify else null; + hinotify = if pkgs.stdenv.isLinux then self.hinotify else self.fsnotify; + }; + git-annex = (disableCabalFlag super.git-annex "assistant").override { + dbus = if pkgs.stdenv.isLinux then self.dbus else null; + fdo-notify = if pkgs.stdenv.isLinux then self.fdo-notify else null; + hinotify = if pkgs.stdenv.isLinux then self.hinotify else self.fsnotify; + }; + git-annex-with-assistant = super.git-annex.override { dbus = if pkgs.stdenv.isLinux then self.dbus else null; fdo-notify = if pkgs.stdenv.isLinux then self.fdo-notify else null; hinotify = if pkgs.stdenv.isLinux then self.hinotify else self.fsnotify;