a2cbc77e4f
The function ‘mkDerivation’ now checks whether the current platform type is included in a package's meta.platform field. If not, it throws an exception: $ nix-build -A linux --argstr system x86_64-darwin error: user-thrown exception: the package ‘linux-3.10.15’ is not supported on ‘x86_64-darwin’ These packages also no longer show up in ‘nix-env -qa’ output. This means, for instance, that the number of packages shown on x86_64-freebsd has dropped from 9268 to 4764. Since meta.platforms was also used to prevent Hydra from building some packages, there now is a new attribute meta.hydraPlatforms listing the platforms on which Hydra should build the package (which defaults to meta.platforms).
34 lines
1.1 KiB
Nix
34 lines
1.1 KiB
Nix
{ cabal, curl, extensibleExceptions, filepath, hashedStorage
|
|
, haskeline, html, HTTP, mmap, mtl, network, parsec, random
|
|
, regexCompat, tar, terminfo, text, utf8String, vector, zlib
|
|
}:
|
|
|
|
cabal.mkDerivation (self: {
|
|
pname = "darcs";
|
|
version = "2.8.4";
|
|
sha256 = "164zclgib9ql4rqykpdhhk2bad0m5v0k0iwzsj0z7nax5nxlvarz";
|
|
isLibrary = true;
|
|
isExecutable = true;
|
|
buildDepends = [
|
|
extensibleExceptions filepath hashedStorage haskeline html HTTP
|
|
mmap mtl network parsec random regexCompat tar terminfo text
|
|
utf8String vector zlib
|
|
];
|
|
extraLibraries = [ curl ];
|
|
doCheck = false;
|
|
postInstall = ''
|
|
mkdir -p $out/etc/bash_completion.d
|
|
mv contrib/darcs_completion $out/etc/bash_completion.d/darcs
|
|
'';
|
|
meta = {
|
|
homepage = http://darcs.net/;
|
|
description = "A distributed, interactive, smart revision control system";
|
|
license = "GPL";
|
|
# FIXME: this gives an infinite recursion in the "darcs" attribute
|
|
# in all-packages.nix.
|
|
#platforms = self.ghc.meta.platforms;
|
|
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
|
|
maintainers = [ self.stdenv.lib.maintainers.andres ];
|
|
};
|
|
})
|