diff options
author | Peter Simons <simons@cryp.to> | 2016-07-05 22:49:26 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2016-07-05 23:45:41 +0200 |
commit | 6a6b8fa36fa21a8163e47d948ff79c50cbad2a78 (patch) | |
tree | 8d3da4b008dd5bfd01689df9818a6294caf6190e /pkgs | |
parent | a828d79a8a896c1bfbbea18a00ac542218c06e4f (diff) |
cabal2nix: update to version 2.0 from Hackage
I've realized that publishing updates to Hackage is far easier than publishing updates in Nixpkgs, and since all Hackage updates show up in Nix automatically I've decided to go back to publishing cabal2nix on Hackage again. Unfortunately, this means that I'll have to change the version numbering scheme to comply with the expectations of the Haskell PVP (which is used by Stackage), so the new version 2.0 looks like a downgrade to Nix, which used to have version 20160406. :-( If in doubt, run "nix-env -u --always" to force the update. I am sorry about the inconvenience.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/haskell-modules/configuration-common.nix | 3 | ||||
-rw-r--r-- | pkgs/development/tools/haskell/cabal2nix/default.nix | 45 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 14 |
3 files changed, 13 insertions, 49 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 6c6864f0c4a90..19a5581480ce3 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -653,9 +653,6 @@ self: super: { # Test suite won't compile against tasty-hunit 0.9.x. zlib = dontCheck super.zlib; - # Override the obsolete version from Hackage with our more up-to-date copy. - cabal2nix = self.callPackage ../tools/haskell/cabal2nix {}; - # https://github.com/ndmitchell/shake/issues/206 # https://github.com/ndmitchell/shake/issues/267 shake = overrideCabal super.shake (drv: { doCheck = !pkgs.stdenv.isDarwin && false; }); diff --git a/pkgs/development/tools/haskell/cabal2nix/default.nix b/pkgs/development/tools/haskell/cabal2nix/default.nix deleted file mode 100644 index 3e6c9019f6d6d..0000000000000 --- a/pkgs/development/tools/haskell/cabal2nix/default.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ mkDerivation, aeson, ansi-wl-pprint, base, bytestring, Cabal -, containers, deepseq, directory, distribution-nixpkgs, fetchFromGitHub -, filepath, hackage-db, language-nix, lens, monad-par -, monad-par-extras, mtl, optparse-applicative, pretty, process, SHA -, split, stackage-types, stdenv, text, time, transformers -, utf8-string, yaml, makeWrapper, nix-prefetch-scripts -}: -mkDerivation rec { - pname = "cabal2nix"; - version = "20160613-10-g57dddc7"; - src = fetchFromGitHub { - owner = "nixos"; - repo = "cabal2nix"; - rev = "v${version}"; - sha256 = "1nlybd4im80dwq70wqa5k4lji5g353cn6aqiz4v3x4v3fpn2i3qb"; - }; - isExecutable = true; - enableSharedExecutables = false; - libraryHaskellDepends = [ - aeson ansi-wl-pprint base bytestring Cabal containers deepseq - directory distribution-nixpkgs filepath hackage-db language-nix - lens optparse-applicative pretty process SHA split text - transformers yaml - ]; - executableHaskellDepends = [ - aeson ansi-wl-pprint base bytestring Cabal containers deepseq - directory distribution-nixpkgs filepath hackage-db language-nix - lens monad-par monad-par-extras mtl optparse-applicative pretty - process SHA split stackage-types text time transformers utf8-string - yaml - ]; - executableToolDepends = [ makeWrapper ]; - postInstall = '' - exe=$out/libexec/${pname}-${version}/${pname} - install -D $out/bin/${pname} $exe - rm -rf $out/{bin,lib,share} - makeWrapper $exe $out/bin/${pname} --prefix PATH ":" "${nix-prefetch-scripts}/bin" - mkdir -p $out/share/bash-completion/completions - $exe --bash-completion-script $exe >$out/share/bash-completion/completions/${pname} - ''; - homepage = "https://github.com/nixos/cabal2nix#readme"; - description = "Convert Cabal files into Nix build instructions"; - license = stdenv.lib.licenses.bsd3; - maintainers = [stdenv.lib.maintainers.peti]; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b056fa6999028..26b292f937457 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -640,7 +640,19 @@ in libtorrentRasterbar = libtorrentRasterbar_1_09; }; - cabal2nix = self.haskellPackages.cabal2nix; + cabal2nix = self.haskell.lib.overrideCabal self.haskellPackages.cabal2nix (drv: { + isLibrary = false; + enableSharedExecutables = false; + executableToolDepends = [ self.makeWrapper ]; + postInstall = '' + exe=$out/libexec/${drv.pname}-${drv.version}/${drv.pname} + install -D $out/bin/${drv.pname} $exe + rm -rf $out/{bin,lib,share} + makeWrapper $exe $out/bin/${drv.pname} --prefix PATH ":" "${self.nix-prefetch-scripts}/bin" + mkdir -p $out/share/bash-completion/completions + $exe --bash-completion-script $exe >$out/share/bash-completion/completions/${drv.pname} + ''; + }); caddy = callPackage ../servers/caddy { }; |