3
0
Fork 0
forked from mirrors/nixpkgs

Elm: 0.19.0 -> 0.19.1

This commit is contained in:
Domen Kožar 2019-10-21 16:31:02 +02:00
parent 22b0be5609
commit 5235b19045
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246
10 changed files with 80 additions and 58 deletions

View file

@ -4,7 +4,7 @@
let
fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };
hsPkgs = haskell.packages.ghc865.override {
hsPkgs = haskell.packages.ghc881.override {
overrides = self: super: with haskell.lib;
let elmPkgs = rec {
elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {
@ -12,14 +12,9 @@ let
enableParallelBuilding = false;
preConfigure = self.fetchElmDeps {
elmPackages = (import ./packages/elm-srcs.nix);
versionsDat = ./versions.dat;
elmVersion = drv.version;
registryDat = ./registry.dat;
};
patches = [
(fetchpatch {
url = "https://github.com/elm/compiler/pull/1886/commits/39d86a735e28da514be185d4c3256142c37c2a8a.patch";
sha256 = "0nni5qx1523rjz1ja42z6z9pijxvi3fgbw1dhq5qi11mh1nb9ay7";
})
];
buildTools = drv.buildTools or [] ++ [ makeWrapper ];
jailbreak = true;
postInstall = ''
@ -32,8 +27,14 @@ let
The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo:
`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 {});
#elm-format = justStaticExecutables (doJailbreak (self.callPackage ./packages/elm-format.nix {}));
elmi-to-json = justStaticExecutables (overrideCabal (self.callPackage ./packages/elmi-to-json.nix {}) (drv: {
prePatch = ''
substituteInPlace package.yaml --replace "- -Werror" ""
hpack
'';
jailbreak = true;
}));
inherit fetchElmDeps;
elmVersion = elmPkgs.elm.version;

View file

@ -1,11 +1,11 @@
{stdenv, lib, fetchurl}:
{elmPackages, versionsDat}:
{elmPackages, registryDat, elmVersion}:
let
makeDotElm = import ./makeDotElm.nix {inherit stdenv lib fetchurl versionsDat;};
makeDotElm = import ./makeDotElm.nix {inherit stdenv lib fetchurl registryDat;};
in
''
export ELM_HOME=`pwd`/.elm
'' + (makeDotElm "0.19.0" elmPackages)
'' + (makeDotElm elmVersion elmPackages)

View file

@ -1,4 +1,4 @@
{stdenv, lib, fetchurl, versionsDat}:
{stdenv, lib, fetchurl, registryDat}:
ver: deps:
let cmds = lib.mapAttrsToList (name: info: let
@ -20,11 +20,11 @@ ver: deps:
};
in ''
mkdir -p .elm/${ver}/package/${name}
cp -R ${pkg} .elm/${ver}/package/${name}/${info.version}
mkdir -p .elm/${ver}/packages/${name}
cp -R ${pkg} .elm/${ver}/packages/${name}/${info.version}
'') deps;
in (lib.concatStrings cmds) + ''
mkdir -p .elm/${ver}/package;
cp ${versionsDat} .elm/${ver}/package/versions.dat;
mkdir -p .elm/${ver}/packages;
cp ${registryDat} .elm/${ver}/packages/registry.dat;
chmod -R +w .elm
''

View file

@ -6,8 +6,8 @@
};
"elm/json" = {
sha256 = "1g0hafkqf2q633r7ir9wxpb1lnlzskhpsyi0h5bkzj0gl072zfnb";
version = "1.0.0";
sha256 = "1a107nmm905dih4w4mjjkkpdcjbgaf5qjvr7fl30kkpkckfjjnrw";
version = "1.1.2";
};
"elm/html" = {
@ -16,8 +16,8 @@
};
"elm/svg" = {
sha256 = "08x0v8p9wm699jjmsnbq69pxv3jh60j4f6fg7y6hyr7xxj85y390";
version = "1.0.0";
sha256 = "1cwcj73p61q45wqwgqvrvz3aypjyy3fw732xyxdyj6s256hwkn0k";
version = "1.0.1";
};
"elm/project-metadata-utils" = {
@ -26,23 +26,33 @@
};
"elm/browser" = {
sha256 = "1apmvyax93nvmagwj00y16zx10kfv640cxpi64xgqbgy7d2wphy4";
version = "1.0.0";
sha256 = "1zlmx672glg7fdgkvh5jm47y85pv7pdfr5mkhg6x7ar6k000vyka";
version = "1.0.1";
};
"elm/core" = {
sha256 = "10kr86h4v5h4p0586q406a5wbl8xvr1jyrf6097zp2wb8sv21ylw";
version = "1.0.0";
sha256 = "1l0qdbczw91kzz8sx5d5zwz9x662bspy7p21dsr3f2rigxiix2as";
version = "1.0.2";
};
"elm/http" = {
sha256 = "1igmm89ialzrjib1j8xagkxalq1x2gj4l0hfxcd66mpwmvg7psl8";
version = "1.0.0";
sha256 = "008bs76mnp48b4dw8qwjj4fyvzbxvlrl4xpa2qh1gg2kfwyw56v1";
version = "2.0.0";
};
"elm/bytes" = {
sha256 = "040d7irrawcbnq9jxhzx8p9qacdlw5bncy6lgndd6inm53rvvwbp";
version = "1.0.7";
};
"elm/file" = {
sha256 = "15vw1ilbg0msimq2k9magwigp8lwqrgvz3vk6qia6b3ldahvw8jr";
version = "1.0.1";
};
"elm/parser" = {
sha256 = "0k4zlq30lrvawqvzwbvsl0hrmwf9s832mb41z7fdspm4549dj7wc";
version = "1.0.0";
sha256 = "0a3cxrvbm7mwg9ykynhp7vjid58zsw03r63qxipxp3z09qks7512";
version = "1.1.0";
};
"elm/url" = {
@ -56,7 +66,7 @@
};
"elm/virtual-dom" = {
sha256 = "0hm8g92h7z39km325dlnhk8n00nlyjkqp3r3jppr37k2k13md6aq";
version = "1.0.0";
sha256 = "0q1v5gi4g336bzz1lgwpn5b1639lrn63d8y6k6pimcyismp2i1yg";
version = "1.0.2";
};
}

View file

@ -1,29 +1,29 @@
{ mkDerivation, ansi-terminal, ansi-wl-pprint, base, binary
, bytestring, containers, directory, edit-distance, fetchgit
, file-embed, filepath, ghc-prim, haskeline, HTTP, http-client
, http-client-tls, http-types, language-glsl, logict, mtl, network
, parsec, process, raw-strings-qq, scientific, SHA, snap-core
, snap-server, stdenv, template-haskell, text, time
, file-embed, filelock, filepath, ghc-prim, haskeline, HTTP
, http-client, http-client-tls, http-types, language-glsl, mtl
, network, parsec, process, raw-strings-qq, scientific, SHA
, snap-core, snap-server, stdenv, template-haskell, time
, unordered-containers, utf8-string, vector, zip-archive
}:
mkDerivation {
pname = "elm";
version = "0.19.0";
version = "0.19.1";
src = fetchgit {
url = "https://github.com/elm/compiler";
sha256 = "13jks6c6i80z71mjjfg46ri570g5ini0k3xw3857v6z66zcl56x4";
rev = "d5cbc41aac23da463236bbc250933d037da4055a";
sha256 = "1rdg3xp3js9xadclk3cdypkscm5wahgsfmm4ldcw3xswzhw6ri8w";
rev = "c9aefb6230f5e0bda03205ab0499f6e4af924495";
fetchSubmodules = true;
};
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
ansi-terminal ansi-wl-pprint base binary bytestring containers
directory edit-distance file-embed filepath ghc-prim haskeline HTTP
http-client http-client-tls http-types language-glsl logict mtl
network parsec process raw-strings-qq scientific SHA snap-core
snap-server template-haskell text time unordered-containers
utf8-string vector zip-archive
directory edit-distance file-embed filelock filepath ghc-prim
haskeline HTTP http-client http-client-tls http-types language-glsl
mtl network parsec process raw-strings-qq scientific SHA snap-core
snap-server template-haskell time unordered-containers utf8-string
vector zip-archive
];
homepage = "https://elm-lang.org";
description = "The `elm` command line interface";

View file

@ -1,27 +1,27 @@
{ mkDerivation, aeson, async, base, binary, bytestring, containers
, directory, filepath, hpack, optparse-applicative, safe-exceptions
, stdenv, text, fetchgit
{ mkDerivation, aeson, base, binary, bytestring, containers
, directory, fetchgit, filepath, ghc-prim, hpack
, optparse-applicative, stdenv, text, unliftio
, unordered-containers
}:
mkDerivation {
pname = "elmi-to-json";
version = "0.19.4";
version = "1.2.0";
src = fetchgit {
url = "https://github.com/stoeffel/elmi-to-json.git";
rev = "357ad96f05e4c68023b036f27f6f65c4377c7427";
sha256 = "0vj9fdqgg2zd1nxpll6v02fk6bcyhx00xhp3s8sd7ycvirwsim9n";
sha256 = "1kxai87h2g0749yq0fkxwk3xaavydraaivhnavbwr62q2hw4wrj7";
rev = "af08ceafe742a252f1f1f3c229b0ce3b3e00084d";
fetchSubmodules = true;
};
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson async base binary bytestring containers directory filepath
optparse-applicative safe-exceptions text
aeson base binary bytestring containers directory filepath ghc-prim
optparse-applicative text unliftio unordered-containers
];
libraryToolDepends = [ hpack ];
executableHaskellDepends = [ base ];
testHaskellDepends = [ base ];
preConfigure = "hpack";
prePatch = "hpack";
homepage = "https://github.com/stoeffel/elmi-to-json#readme";
description = "Translates elmi binary files to JSON representation";
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ turbomack ];
}

Binary file not shown.

View file

@ -1,8 +1,9 @@
#!/usr/bin/env nix-shell
#!nix-shell -p cabal2nix elm2nix -i bash ../../..
cabal2nix https://github.com/elm/compiler --revision d5cbc41aac23da463236bbc250933d037da4055a > packages/elm.nix
elm2nix snapshot > versions.dat
pushd "$(nix-build -A elmPackages.elm.src --no-out-link ../../../..)/ui/browser"
cabal2nix https://github.com/elm/compiler --revision c9aefb6230f5e0bda03205ab0499f6e4af924495 > packages/elm.nix
echo "need to manually copy registry.dat from an existing elm project"
#elm2nix snapshot > registry.dat
pushd "$(nix-build -A elmPackages.elm.src --no-out-link ../../../..)/reactor"
elm2nix convert > $OLDPWD/packages/elm-srcs.nix
popd

View file

@ -66,6 +66,7 @@ self: super: {
th-expand-syns = doJailbreak super.th-expand-syns;
# TODO: remove when upstream accepts https://github.com/snapframework/io-streams-haproxy/pull/17
io-streams-haproxy = doJailbreak super.io-streams-haproxy; # base >=4.5 && <4.13
snap-server = doJailbreak super.snap-server;
# use latest version to fix the build
generics-sop = self.generics-sop_0_5_0_0;
@ -106,6 +107,15 @@ self: super: {
url = "https://github.com/simonmar/alex/commit/deaae6eddef5186bfd0e42e2c3ced39e26afa4d6.patch";
sha256 = "1v40gmnw4lqyk271wngdwz8whpfdhmza58srbkka8icwwwrck3l5";
});
# https://github.com/snapframework/snap-core/issues/288
snap-core = overrideCabal super.snap-core (drv: { prePatch = "substituteInPlace src/Snap/Internal/Core.hs --replace 'fail = Fail.fail' ''"; });
# needs a release
json = overrideCabal super.json (drv: { prePatch = "substituteInPlace json.cabal --replace '4.13' '4.14'"; patches = [(
pkgs.fetchpatch {
url = "https://github.com/GaloisInc/json/commit/9d36ca5d865be7e4b2126b68a444b901941d2492.patch";
sha256 = "0vyi5nbivkqg6zngq7rb3wwcj9043m4hmyk155nrcddl8j2smfzv";
}
)]; });
# Upstream ships a broken Setup.hs file.
csv = overrideCabal super.csv (drv: { prePatch = "rm Setup.hs"; });