From 29f0f384334c685c760f510945b7627b09dfe361 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 18 Jan 2018 15:27:36 +0100 Subject: [PATCH] multi-ghc-travis: update to latest Git version and create a proper Haskell build The attribute haskellPackages.multi-ghc-travis refers to a proper Cabal build that includes the package's library --- .../haskell-modules/configuration-common.nix | 4 ++ .../configuration-hackage2nix.yaml | 1 + .../haskell-modules/hackage-packages.nix | 26 ++++++++++ .../haskell/multi-ghc-travis/default.nix | 47 +++++++++---------- pkgs/top-level/all-packages.nix | 2 +- 5 files changed, 55 insertions(+), 25 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index e02933f97a25..b65bc23cfa45 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -942,4 +942,8 @@ self: super: { # Sporadically OOMs even with 16G ChasingBottoms = dontCheck super.ChasingBottoms; + + # Add support for https://github.com/haskell-hvr/multi-ghc-travis. + multi-ghc-travis = self.callPackage ../tools/haskell/multi-ghc-travis { ShellCheck = self.ShellCheck_0_4_6; }; + } diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml index e8b7e665119e..fbfeea52b794 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml @@ -2703,6 +2703,7 @@ extra-packages: - QuickCheck < 2 # required by test-framework-quickcheck and its users - seqid < 0.2 # newer versions depend on transformers 0.4.x which we cannot provide in GHC 7.8.x - seqid-streams < 0.2 # newer versions depend on transformers 0.4.x which we cannot provide in GHC 7.8.x + - ShellCheck == 0.4.6 # required by multi-ghc-travis - split < 0.2 # newer versions don't work with GHC 6.12.3 - tar < 0.4.2.0 # later versions don't work with GHC < 7.6.x - transformers == 0.4.3.* # the latest version isn't supported by mtl yet diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 7cc141655666..744fed2f1b48 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -16327,6 +16327,32 @@ self: { hydraPlatforms = stdenv.lib.platforms.none; }) {}; + "ShellCheck_0_4_6" = callPackage + ({ mkDerivation, base, containers, directory, json, mtl, parsec + , process, QuickCheck, regex-tdfa + }: + mkDerivation { + pname = "ShellCheck"; + version = "0.4.6"; + sha256 = "1g5ihsma3zgb7q89n2j4772f504nnhfn065xdz6bqgrnjhkrpsqi"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + base containers directory json mtl parsec process QuickCheck + regex-tdfa + ]; + executableHaskellDepends = [ + base containers directory json mtl parsec QuickCheck regex-tdfa + ]; + testHaskellDepends = [ + base containers directory json mtl parsec QuickCheck regex-tdfa + ]; + homepage = "http://www.shellcheck.net/"; + description = "Shell script analysis tool"; + license = stdenv.lib.licenses.gpl3; + hydraPlatforms = stdenv.lib.platforms.none; + }) {}; + "ShellCheck" = callPackage ({ mkDerivation, base, containers, directory, json, mtl, parsec , process, QuickCheck, regex-tdfa diff --git a/pkgs/development/tools/haskell/multi-ghc-travis/default.nix b/pkgs/development/tools/haskell/multi-ghc-travis/default.nix index 8f9095fae131..c21d5595708a 100644 --- a/pkgs/development/tools/haskell/multi-ghc-travis/default.nix +++ b/pkgs/development/tools/haskell/multi-ghc-travis/default.nix @@ -1,29 +1,28 @@ -{ stdenv, ghc, fetchFromGitHub }: - -stdenv.mkDerivation rec { - name = "multi-ghc-travis-${version}"; - version = "20170728-git"; - - buildInputs = [ ghc ]; - +{ mkDerivation, base, bytestring, Cabal, containers, deepseq, Diff +, directory, filepath, ShellCheck, stdenv, tasty, tasty-golden +, transformers, fetchFromGitHub +}: +mkDerivation { + pname = "make-travis-yml"; + version = "0"; src = fetchFromGitHub { owner = "hvr"; repo = "multi-ghc-travis"; - rev = "437739986fc81ca8c010e5d889348ba74171e680"; - sha256 = "05fbc7ab9c25k19xj0iax72gv62l89dw2m4bci7h76y9hcajs5v4"; - }; - - installPhase = '' - mkdir -p $out/bin - ghc -O --make make_travis_yml.hs -o $out/bin/make-travis-yml - ghc -O --make make_travis_yml_2.hs -o $out/bin/make-travis-yml-2 - ''; - - meta = with stdenv.lib; { - description = "Generate .travis.yml for multiple ghc versions"; - homepage = https://github.com/hvr/multi-ghc-travis; - license = licenses.bsd3; - platforms = ghc.meta.platforms; - maintainers = with maintainers; [ jb55 peti ]; + rev = "0d1b4089f6829659149747c9551712d24fd0b124"; + sha256 = "00dbg8hbncv74c2baskyhg4h0yv8wrz0fnkvw2bzcn0cjrz7xqwr"; }; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + base Cabal containers deepseq directory filepath ShellCheck + transformers + ]; + executableHaskellDepends = [ base ]; + testHaskellDepends = [ + base bytestring Diff directory filepath tasty tasty-golden + transformers + ]; + homepage = "https://github.com/hvr/multi-ghc-travis"; + description = "Script generator for Travis-CI"; + license = stdenv.lib.licenses.bsd3; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85cf34ef9586..a36547af80dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7683,7 +7683,7 @@ with pkgs; msitools = callPackage ../development/tools/misc/msitools { }; - multi-ghc-travis = callPackage ../development/tools/haskell/multi-ghc-travis { ghc = haskell.compiler.ghc802; }; + multi-ghc-travis = haskell.lib.justStaticExecutables haskellPackages.multi-ghc-travis; neoload = callPackage ../development/tools/neoload { licenseAccepted = (config.neoload.accept_license or false);