mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
git-annex: generate build instructions with cabal2nix
This commit is contained in:
parent
3e070f105d
commit
7b21e19a82
3 changed files with 50 additions and 74 deletions
|
@ -42,17 +42,7 @@ rec {
|
|||
sendEmailSupport = !stdenv.isDarwin;
|
||||
});
|
||||
|
||||
gitAnnex = lib.makeOverridable (import ./git-annex) {
|
||||
inherit stdenv fetchurl perl which ikiwiki curl bup git gnupg1 lsof openssh rsync;
|
||||
inherit (haskellPackages) ghc aeson async blazeBuilder bloomfilter
|
||||
caseInsensitive clientsession cryptoApi dataDefault dataenc DAV dbus dns
|
||||
editDistance extensibleExceptions filepath gnutls hamlet hinotify hS3
|
||||
hslogger httpConduit httpTypes HUnit IfElse json liftedBase MissingH
|
||||
monadControl mtl network networkInfo networkMulticast networkProtocolXmpp
|
||||
QuickCheck random regexCompat SafeSemaphore SHA stm text time regexTdfa
|
||||
transformers transformersBase utf8String uuid wai waiLogger warp
|
||||
xmlConduit xmlTypes yesod yesodDefault yesodForm yesodStatic;
|
||||
};
|
||||
gitAnnex = pkgs.haskellPackages.gitAnnex;
|
||||
|
||||
qgit = import ./qgit {
|
||||
inherit fetchurl stdenv;
|
||||
|
|
|
@ -1,73 +1,57 @@
|
|||
{ stdenv, fetchurl, perl, which, ikiwiki, ghc, aeson, async, blazeBuilder
|
||||
, bloomfilter, bup, caseInsensitive, clientsession, cryptoApi, curl, dataDefault
|
||||
, dataenc, DAV, dbus, dns, editDistance, extensibleExceptions, filepath, git
|
||||
, gnupg1, gnutls, hamlet, hinotify, hS3, hslogger, httpConduit, httpTypes, HUnit
|
||||
, IfElse, json, liftedBase, lsof, MissingH, monadControl, mtl, network
|
||||
, networkInfo, networkMulticast, networkProtocolXmpp, openssh, QuickCheck
|
||||
, random, regexCompat, rsync, SafeSemaphore, SHA, stm, text, time, transformers
|
||||
, transformersBase, utf8String, uuid, wai, waiLogger, warp, xmlConduit, xmlTypes
|
||||
, yesod, yesodDefault, yesodForm, yesodStatic, regexTdfa
|
||||
{ cabal, aeson, async, blazeBuilder, bloomfilter, bup
|
||||
, caseInsensitive, clientsession, cryptoApi, curl, dataDefault
|
||||
, dataenc, DAV, dbus, dlist, dns, editDistance
|
||||
, extensibleExceptions, filepath, git, gnupg1, gnutls, hamlet
|
||||
, hinotify, hS3, hslogger, HTTP, httpConduit, httpTypes, HUnit
|
||||
, IfElse, json, lsof, MissingH, MonadCatchIOTransformers
|
||||
, monadControl, mtl, network, networkInfo, networkMulticast
|
||||
, networkProtocolXmpp, openssh, QuickCheck, random, regexTdfa
|
||||
, rsync, SafeSemaphore, SHA, stm, text, time, transformers
|
||||
, unixCompat, utf8String, uuid, wai, waiLogger, warp, xmlConduit
|
||||
, xmlTypes, yesod, yesodDefault, yesodForm, yesodStatic
|
||||
}:
|
||||
|
||||
let
|
||||
version = "4.20130521";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "git-annex-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/joeyh/git-annex/tarball/${version}";
|
||||
sha256 = "0wa3sgw0xbqykl5r6ba0gannwj61y0h024glm0xjj97fy06b77i0";
|
||||
name = "git-annex-${version}.tar.gz";
|
||||
};
|
||||
|
||||
buildInputs = [ ghc aeson async blazeBuilder bloomfilter bup ikiwiki
|
||||
caseInsensitive clientsession cryptoApi curl dataDefault dataenc DAV dbus
|
||||
dns editDistance extensibleExceptions filepath git gnupg1 gnutls hamlet
|
||||
hinotify hS3 hslogger httpConduit httpTypes HUnit IfElse json liftedBase
|
||||
lsof MissingH monadControl mtl network networkInfo networkMulticast
|
||||
networkProtocolXmpp openssh QuickCheck random regexCompat rsync
|
||||
SafeSemaphore SHA stm text time transformers transformersBase utf8String
|
||||
uuid wai waiLogger warp xmlConduit xmlTypes yesod yesodDefault yesodForm
|
||||
yesodStatic which perl regexTdfa ];
|
||||
|
||||
configurePhase = ''
|
||||
makeFlagsArray=( PREFIX=$out CABAL=./Setup )
|
||||
patchShebangs .
|
||||
ghc -O2 --make Setup
|
||||
./Setup configure -ftestsuite -f-android -fproduction -fdns -fxmpp -fpairing -f-webapp -fassistant -fdbus -finotify -fwebdav -fs3
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "git-annex";
|
||||
version = "4.20130601";
|
||||
sha256 = "0l6jbi9r26w5h9hfg9v9qybqvijp4n7c9l1zd4ikxg2nqcc8j8ln";
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
buildDepends = [
|
||||
aeson async blazeBuilder bloomfilter caseInsensitive clientsession
|
||||
cryptoApi dataDefault dataenc DAV dbus dlist dns editDistance
|
||||
extensibleExceptions filepath gnutls hamlet hinotify hS3 hslogger
|
||||
HTTP httpConduit httpTypes HUnit IfElse json MissingH
|
||||
MonadCatchIOTransformers monadControl mtl network networkInfo
|
||||
networkMulticast networkProtocolXmpp QuickCheck random regexTdfa
|
||||
SafeSemaphore SHA stm text time transformers unixCompat utf8String
|
||||
uuid wai waiLogger warp xmlConduit xmlTypes yesod yesodDefault
|
||||
yesodForm yesodStatic
|
||||
];
|
||||
buildTools = [ bup curl git gnupg1 lsof openssh rsync ];
|
||||
configureFlags = "-fS3
|
||||
-fWebDAV
|
||||
-fInotify
|
||||
-fDbus
|
||||
-f-Assistant
|
||||
-f-Webapp
|
||||
-fPairing
|
||||
-fXMPP
|
||||
-fDNS
|
||||
-fProduction
|
||||
-fTDFA";
|
||||
preConfigure = "patchShebangs .";
|
||||
checkPhase = ''
|
||||
export HOME="$NIX_BUILD_TOP/tmp"
|
||||
mkdir "$HOME"
|
||||
cp dist/build/git-annex/git-annex git-annex
|
||||
./git-annex test
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://git-annex.branchable.com/";
|
||||
description = "Manage files with git without checking them into git";
|
||||
license = stdenv.lib.licenses.gpl3Plus;
|
||||
|
||||
longDescription = ''
|
||||
Git-annex allows managing files with git, without checking the
|
||||
file contents into git. While that may seem paradoxical, it is
|
||||
useful when dealing with files larger than git can currently
|
||||
easily handle, whether due to limitations in memory, checksumming
|
||||
time, or disk space.
|
||||
|
||||
Even without file content tracking, being able to manage files
|
||||
with git, move files around and delete files with versioned
|
||||
directory trees, and use branches and distributed clones, are all
|
||||
very handy reasons to use git. And annexed files can co-exist in
|
||||
the same git repository with regularly versioned files, which is
|
||||
convenient for maintaining documents, Makefiles, etc that are
|
||||
associated with annexed files but that benefit from full revision
|
||||
control.
|
||||
'';
|
||||
|
||||
platforms = ghc.meta.platforms;
|
||||
maintainers = [ stdenv.lib.maintainers.simons ];
|
||||
description = "manage files with git, without checking their contents into git";
|
||||
license = "GPL";
|
||||
platforms = self.ghc.meta.platforms;
|
||||
maintainers = [ self.stdenv.lib.maintainers.simons ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
@ -2258,6 +2258,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
|
|||
cabalInstall_1_16_0_2 = callPackage ../tools/package-management/cabal-install/1.16.0.2.nix {};
|
||||
cabalInstall = self.cabalInstall_1_16_0_2;
|
||||
|
||||
gitAnnex = callPackage ../applications/version-management/git-and-tools/git-annex {};
|
||||
|
||||
githubBackup = callPackage ../applications/version-management/git-and-tools/github-backup {};
|
||||
|
||||
jailbreakCabal = callPackage ../development/tools/haskell/jailbreak-cabal {};
|
||||
|
|
Loading…
Reference in a new issue