cabal2nix: bump to latest version and wrap it to include nix-prefetch-scripts in $PATH
This commit is contained in:
parent
c209665763
commit
019b18722d
|
@ -773,36 +773,7 @@ self: super: {
|
||||||
# Jailbreaking breaks the build.
|
# Jailbreaking breaks the build.
|
||||||
QuickCheck_2_8_1 = dontJailbreak super.QuickCheck_2_8_1;
|
QuickCheck_2_8_1 = dontJailbreak super.QuickCheck_2_8_1;
|
||||||
|
|
||||||
} // {
|
# Override the obsolete version from Hackage with our more up-to-date copy.
|
||||||
|
cabal2nix = pkgs.cabal2nix;
|
||||||
# Not on Hackage.
|
|
||||||
cabal2nix = self.mkDerivation {
|
|
||||||
pname = "cabal2nix";
|
|
||||||
version = "20150414";
|
|
||||||
src = pkgs.fetchgit {
|
|
||||||
url = "http://github.com/NixOS/cabal2nix.git";
|
|
||||||
rev = "d08c2970e9c74948e81e7b926b64e5d7d1dd07b7";
|
|
||||||
sha256 = "1rqibfhvkvmfxj9k92brz87b4l40w8d7mq1s7zgfnrmay6h0956a";
|
|
||||||
deepClone = true;
|
|
||||||
};
|
|
||||||
isLibrary = false;
|
|
||||||
isExecutable = true;
|
|
||||||
buildDepends = with self; [
|
|
||||||
aeson base bytestring Cabal containers deepseq-generics directory
|
|
||||||
filepath hackage-db lens monad-par monad-par-extras mtl pretty
|
|
||||||
process regex-posix SHA split transformers utf8-string cartel
|
|
||||||
] ++ pkgs.lib.optional (pkgs.lib.versionOlder self.ghc.version "7.10") prettyclass;
|
|
||||||
testDepends = with self; [
|
|
||||||
aeson base bytestring Cabal containers deepseq deepseq-generics
|
|
||||||
directory doctest filepath hackage-db hspec lens monad-par
|
|
||||||
monad-par-extras mtl pretty process QuickCheck
|
|
||||||
regex-posix SHA split transformers utf8-string
|
|
||||||
];
|
|
||||||
buildTools = [ pkgs.gitMinimal ];
|
|
||||||
preConfigure = "runhaskell $setupCompileFlags generate-cabal-file >cabal2nix.cabal";
|
|
||||||
homepage = "http://github.com/NixOS/cabal2nix";
|
|
||||||
description = "Convert Cabal files into Nix build instructions";
|
|
||||||
license = pkgs.stdenv.lib.licenses.bsd3;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,42 @@
|
||||||
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
|
{ mkDerivation, fetchgit, aeson, base, bytestring, Cabal, containers
|
||||||
|
, deepseq, deepseq-generics, directory, doctest, filepath, gitMinimal
|
||||||
{ cabal, Cabal, deepseq, doctest, filepath, hackageDb, mtl
|
, hackage-db, hspec, lens, monad-par, monad-par-extras, mtl, pretty
|
||||||
, regexPosix, transformers
|
, process, QuickCheck, regex-posix, SHA, split, stdenv, transformers
|
||||||
|
, utf8-string, cartel, nix-prefetch-scripts, makeWrapper
|
||||||
}:
|
}:
|
||||||
|
|
||||||
cabal.mkDerivation (self: {
|
mkDerivation rec {
|
||||||
pname = "cabal2nix";
|
pname = "cabal2nix";
|
||||||
version = "1.73";
|
version = "20150423";
|
||||||
sha256 = "1nskcr8k5a8wm9q5is0b1kww574q2nq45f16agya8z44hgk97xiv";
|
src = fetchgit {
|
||||||
isLibrary = false;
|
url = "http://github.com/NixOS/cabal2nix.git";
|
||||||
isExecutable = true;
|
rev = "8cfe61c222bd2750ef29f991a2a3ee353444e458";
|
||||||
buildDepends = [
|
sha256 = "10g7ppcflg1sgkxg8cp90p0mfqyk1ly375hicrb5s58m5w8ij086";
|
||||||
Cabal deepseq filepath hackageDb mtl regexPosix transformers
|
deepClone = true;
|
||||||
];
|
|
||||||
testDepends = [ doctest ];
|
|
||||||
doCheck = self.stdenv.lib.versionOlder "7.8" self.ghc.version;
|
|
||||||
meta = {
|
|
||||||
homepage = "http://github.com/NixOS/cabal2nix";
|
|
||||||
description = "Convert Cabal files into Nix build instructions";
|
|
||||||
license = self.stdenv.lib.licenses.bsd3;
|
|
||||||
platforms = self.ghc.meta.platforms;
|
|
||||||
maintainers = with self.stdenv.lib.maintainers; [ simons ];
|
|
||||||
};
|
};
|
||||||
})
|
isExecutable = true;
|
||||||
|
enableSharedLibraries = false;
|
||||||
|
enableSharedExecutables = false;
|
||||||
|
buildDepends = [
|
||||||
|
aeson base bytestring Cabal containers deepseq-generics directory
|
||||||
|
filepath hackage-db lens monad-par monad-par-extras mtl pretty
|
||||||
|
process regex-posix SHA split transformers utf8-string cartel
|
||||||
|
];
|
||||||
|
testDepends = [
|
||||||
|
aeson base bytestring Cabal containers deepseq deepseq-generics
|
||||||
|
directory doctest filepath hackage-db hspec lens monad-par
|
||||||
|
monad-par-extras mtl pretty process QuickCheck regex-posix SHA
|
||||||
|
split transformers utf8-string
|
||||||
|
];
|
||||||
|
buildTools = [ gitMinimal makeWrapper ];
|
||||||
|
preConfigure = "runhaskell $setupCompileFlags generate-cabal-file --release >cabal2nix.cabal";
|
||||||
|
postInstall = ''
|
||||||
|
exe=$out/libexec/${pname}-${version}/cabal2nix
|
||||||
|
install -D $out/bin/cabal2nix $exe
|
||||||
|
rm -rf $out/{bin,lib,share}
|
||||||
|
makeWrapper $exe $out/bin/cabal2nix --prefix PATH ":" "${nix-prefetch-scripts}/bin"
|
||||||
|
'';
|
||||||
|
homepage = "http://github.com/NixOS/cabal2nix/";
|
||||||
|
description = "Convert Cabal files into Nix build instructions";
|
||||||
|
license = stdenv.lib.licenses.bsd3;
|
||||||
|
}
|
||||||
|
|
|
@ -702,6 +702,8 @@ let
|
||||||
|
|
||||||
byobu = callPackage ../tools/misc/byobu { };
|
byobu = callPackage ../tools/misc/byobu { };
|
||||||
|
|
||||||
|
cabal2nix = haskellngPackages.callPackage ../development/tools/haskell/cabal2nix {};
|
||||||
|
|
||||||
capstone = callPackage ../development/libraries/capstone { };
|
capstone = callPackage ../development/libraries/capstone { };
|
||||||
|
|
||||||
catdoc = callPackage ../tools/text/catdoc { };
|
catdoc = callPackage ../tools/text/catdoc { };
|
||||||
|
|
|
@ -3157,7 +3157,7 @@ self : let callPackage = x : y : modifyPrio (newScope self x y); in
|
||||||
|
|
||||||
cabalDb = callPackage ../development/tools/haskell/cabal-db {};
|
cabalDb = callPackage ../development/tools/haskell/cabal-db {};
|
||||||
|
|
||||||
cabal2nix = callPackage ../development/tools/haskell/cabal2nix {};
|
cabal2nix = pkgs.cabal2nix;
|
||||||
|
|
||||||
# Build a cabal package given a local .cabal file
|
# Build a cabal package given a local .cabal file
|
||||||
buildLocalCabalWithArgs = { src
|
buildLocalCabalWithArgs = { src
|
||||||
|
|
Loading…
Reference in New Issue