Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3458fe89f94e
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d2c13034fb15
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Oct 13, 2019

  1. Copy the full SHA
    48e57cf View commit details

Commits on Oct 16, 2019

  1. Merge pull request #70011 from turboMaCk/chore/cleanup-elmPackages

    elm.elmPackages: Cleanup code
    domenkozar authored Oct 16, 2019
    Copy the full SHA
    d2c1303 View commit details
Showing with 29 additions and 27 deletions.
  1. +28 −25 pkgs/development/compilers/elm/default.nix
  2. +1 −2 pkgs/development/node-packages/node-packages-v10.json
53 changes: 28 additions & 25 deletions pkgs/development/compilers/elm/default.nix
Original file line number Diff line number Diff line change
@@ -4,20 +4,11 @@
let
fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };

patchBinwrap = import ./packages/patch-binwrap.nix { inherit lib writeScriptBin stdenv; };

elmNodePackages =
import ./packages/node-composition.nix {
inherit nodejs pkgs;
inherit (stdenv.hostPlatform) system;
};

hsPkgs = haskell.packages.ghc865.override {
overrides = self: super: with haskell.lib;
let elmPkgs = rec {
elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {
# sadly with parallelism most of the time breaks compilation
# also compilation is slower with increasing number of cores anyway (Tested on Ryzen 7 and i7)
enableParallelBuilding = false;
preConfigure = self.fetchElmDeps {
elmPackages = (import ./packages/elm-srcs.nix);
@@ -42,25 +33,10 @@ let
`package/nix/build.sh`
*/
elm-format = justStaticExecutables (doJailbreak (self.callPackage ./packages/elm-format.nix {}));

elmi-to-json = justStaticExecutables (self.callPackage ./packages/elmi-to-json.nix {});

inherit fetchElmDeps;
elmVersion = elmPkgs.elm.version;

/*
Node/NPM based dependecies can be upgraded using script
`packages/generate-node-packages.sh`.
Packages which rely on `bin-wrap` will fail by default
and can be patched using `patchBinwrap` function defined in `packages/patch-binwrap.nix`.
*/
elm-test = patchBinwrap [elmi-to-json] elmNodePackages.elm-test;
elm-verify-examples = patchBinwrap [elmi-to-json] elmNodePackages.elm-verify-examples;
elm-language-server = elmNodePackages."@elm-tooling/elm-language-server";

# elm-analyse@0.16.4 build is not working
elm-analyse = elmNodePackages."elm-analyse-0.16.3";
inherit (elmNodePackages) elm-doc-preview elm-live elm-upgrade elm-xref;
};
in elmPkgs // {
inherit elmPkgs;
@@ -69,4 +45,31 @@ let
indents = self.callPackage ./packages/indents.nix {};
};
};
in hsPkgs.elmPkgs

/*
Node/NPM based dependecies can be upgraded using script
`packages/generate-node-packages.sh`.
Packages which rely on `bin-wrap` will fail by default
and can be patched using `patchBinwrap` function defined in `packages/patch-binwrap.nix`.
*/
elmNodePackages =
let
nodePkgs = import ./packages/node-composition.nix {
inherit nodejs pkgs;
inherit (stdenv.hostPlatform) system;
};
in with hsPkgs.elmPkgs; {
elm-test = patchBinwrap [elmi-to-json] nodePkgs.elm-test;
elm-verify-examples = patchBinwrap [elmi-to-json] nodePkgs.elm-verify-examples;
elm-language-server = nodePkgs."@elm-tooling/elm-language-server";

# elm-analyse@0.16.4 build is not working
elm-analyse = nodePkgs."elm-analyse-0.16.3";
inherit (nodePkgs) elm-doc-preview elm-live elm-upgrade elm-xref;
};

patchBinwrap = import ./packages/patch-binwrap.nix { inherit lib writeScriptBin stdenv; };

in hsPkgs.elmPkgs // elmNodePackages // {
lib = { inherit patchBinwrap; };
}
3 changes: 1 addition & 2 deletions pkgs/development/node-packages/node-packages-v10.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
"@angular/cli"
, "@antora/cli"
, "@antora/site-generator-default"
, "@antora/site-generator-default"
, "@vue/cli"
, "@webassemblyjs/cli"
, "@webassemblyjs/repl"
@@ -32,7 +32,6 @@
, "dnschain"
, "dockerfile-language-server-nodejs"
, "elasticdump"
, "elm-live"
, "elm-oracle"
, "emoj"
, "emojione"