diff --git a/pins/haskell-nix-src.json b/pins/haskell-nix-src.json new file mode 100644 index 0000000..b6387fa --- /dev/null +++ b/pins/haskell-nix-src.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/input-output-hk/haskell.nix", + "rev": "b54de7b002026d70666ec7d0bee8f20cc53ceb23", + "date": "2019-06-11T10:59:50+12:00", + "sha256": "0k9psmmds5bqwwa3bn3qm0mwpq2grjrvcz0665df8xxl6n11salp", + "fetchSubmodules": false +} diff --git a/pins/iohk-nix-src.json b/pins/iohk-nix-src.json index 7ce8f3e..8b09a73 100644 --- a/pins/iohk-nix-src.json +++ b/pins/iohk-nix-src.json @@ -1,7 +1,7 @@ { "url": "https://github.com/input-output-hk/iohk-nix", - "rev": "4608304d2e02f0f8384d3aa7b7d89ffd2929dab7", - "date": "2019-05-15T17:20:14+08:00", - "sha256": "0kcaw0dan3gq7gigymgi96sgn46ibw6mgq5phz24jczn5ghsiai0", + "rev": "215ab49ae751301f8d8713c7259da11a5c75458e", + "date": "2019-06-12T15:07:48+00:00", + "sha256": "0lp8hc86zs4xv2hvwnywxkklc2s4iaqgriqz3vqfd6bcds2shp1m", "fetchSubmodules": false } diff --git a/pins/nixpkgs-src.json b/pins/nixpkgs-src.json index a542a1e..efe7642 100644 --- a/pins/nixpkgs-src.json +++ b/pins/nixpkgs-src.json @@ -1,7 +1,7 @@ { - "url": "https://github.com/input-output-hk/nixpkgs", - "rev": "c96f5924811f5a8576c9f03d3a630c491fbaf7a3", - "date": "2019-05-10T15:32:41+08:00", - "sha256": "0iagdz0q37ffkpzyh2f21wjb7x4gx257adlranchzc43460x65c1", + "url": "https://github.com/NixOS/nixpkgs", + "rev": "61f0936d1cd73760312712615233cd80195a9b47", + "date": "2019-05-28T23:19:24-04:00", + "sha256": "1fkmp99lxd827km8mk3cqqsfmgzpj0rvaz5hgdmgzzyji70fa2f8", "fetchSubmodules": false } diff --git a/release.nix b/release.nix index 3cb554f..e52090a 100644 --- a/release.nix +++ b/release.nix @@ -8,20 +8,14 @@ let # cross system settings mingwW64 = pkgs.lib.systems.examples.mingwW64; - # import iohk-nix with the same pin as the nixpkgs above. - config = { allowUnfree = false; inHydra = true; allowUnsupportedSystem = true; }; + leksah-src = pkgs.fetchgit { + url = "https://github.com/leksah/leksah"; + rev = "c179b31ecfa305044a2fd233aace0d48e7aa3a77"; + sha256 = "19fqr00rg2mx9dpy20brkviz2gfnvamccaln99svbjxmdfyjfklx"; + fetchSubmodules = true; + }; - # linux packages - x86_64-linux = importPinned "iohk-nix" - { inherit config; nixpkgsJsonOverride = ./pins/nixpkgs-src.json; system = "x86_64-linux"; }; - - # macos packages - x86_64-macos = importPinned "iohk-nix" - { inherit config; nixpkgsJsonOverride = ./pins/nixpkgs-src.json; system = "x86_64-darwin"; }; - - # windows cross compiled on linux - x86_64-mingw32 = importPinned "iohk-nix" - { inherit config; nixpkgsJsonOverride = ./pins/nixpkgs-src.json; system = "x86_64-linux"; crossSystem = mingwW64; }; + leksah-mingw32 = import leksah-src { system = "x86_64-linux"; crossSystem = mingwW64; }; # jobs contain a key -> value mapping that tells hydra which # derivations to build. There are some predefined helpers in @@ -30,23 +24,19 @@ let # # It is however not necessary to use those. # - jobs = rec { - # a very simple job. All it does is call a shell script that print Hello World. - hello-world = import ./jobs/trivial-hello-world { inherit pkgs; }; - - # this should give us our patched compiler. (e.g. the one - # from the pinned nixpkgs set with all the iohk-nix - # patches applied. - - # linux - ghc864.x86_64-linux = x86_64-linux.pkgs.haskell.compiler.ghc864; - - # macOS - ghc864.x86_64-macos = x86_64-macos.pkgs.haskell.compiler.ghc864; - - # linux -> win32 - # Note: we want to build the cross-compiler. As such we want something from the buildPackages! - "${mingwW64.config}-ghc864".x86_64-linux = x86_64-mingw32.pkgs.buildPackages.haskell.compiler.ghc864; - }; + jobs = builtins.mapAttrs (_: args: + let leksah = import leksah-src args; + in builtins.mapAttrs (_: pkgs.recurseIntoAttrs) { + leksah-plan-nix = leksah.pkgs.haskell-nix.withInputs leksah.plan-nix; + + wrapped-leksah = leksah.wrapped-leksah; + leksah-shells = leksah.shells; + leksah-haskell-nix-roots = leksah.pkgs.haskell-nix.haskellNixRoots; + }) { + linux-ghc865 = { system = "x86_64-linux"; haskellCompiler = "ghc865"; }; + linux-ghc883 = { system = "x86_64-linux"; haskellCompiler = "ghc883"; }; + macos-ghc865 = { system = "x86_64-darwin"; haskellCompiler = "ghc865"; }; + macos-ghc883 = { system = "x86_64-darwin"; haskellCompiler = "ghc883"; }; + }; in jobs