tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
WIP Elm 0.19
authored by
Domen Kožar
and committed by
Domen Kožar
7 years ago
db11c832
9e44b46b
+38
-213
7 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
elm
default.nix
packages
elm-compiler.nix
elm-make.nix
elm-package.nix
elm-repl.nix
elm.nix
update-elm.rb
+8
-49
pkgs/development/compilers/elm/default.nix
···
40
EOF
41
'' + lib.concatStrings cmds;
42
43
-
hsPkgs = haskell.packages.ghc802.override {
44
overrides = self: super:
45
let hlib = haskell.lib;
46
-
elmRelease = import ./packages/release.nix { inherit (self) callPackage; };
47
-
elmPkgs' = elmRelease.packages;
48
-
elmPkgs = elmPkgs' // {
49
-
50
-
elm-reactor = hlib.overrideCabal elmPkgs'.elm-reactor (drv: {
51
-
buildTools = drv.buildTools or [] ++ [ self.elm-make ];
52
-
preConfigure = makeElmStuff (import ./packages/elm-reactor-elm.nix);
53
-
});
54
-
55
-
elm-repl = hlib.overrideCabal elmPkgs'.elm-repl (drv: {
56
-
doCheck = false;
57
-
buildTools = drv.buildTools or [] ++ [ makeWrapper ];
58
-
postInstall =
59
-
let bins = lib.makeBinPath [ nodejs self.elm-make ];
60
-
in ''
61
-
wrapProgram $out/bin/elm-repl \
62
-
--prefix PATH ':' ${bins}
63
-
'';
64
-
});
65
66
/*
67
This is not a core Elm package, and it's hosted on GitHub.
···
72
where foo is a tag for a new version, for example "0.3.1-alpha".
73
*/
74
elm-format = self.callPackage ./packages/elm-format.nix { };
75
-
elm-interface-to-json = self.callPackage ./packages/elm-interface-to-json.nix {
76
-
aeson-pretty = self.aeson-pretty_0_7_2;
77
-
either = hlib.overrideCabal self.either (drv :{
78
-
jailbreak = true;
79
-
version = "4.4.1.1";
80
-
sha256 = "1lrlwqqnm6ibfcydlv5qvvssw7bm0c6yypy0rayjzv1znq7wp1xh";
81
-
libraryHaskellDepends = drv.libraryHaskellDepends or [] ++ [
82
-
self.exceptions self.free self.mmorph self.monad-control
83
-
self.MonadRandom self.profunctors self.transformers
84
-
self.transformers-base
85
-
];
86
-
});
87
-
};
88
};
89
in elmPkgs // {
90
inherit elmPkgs;
91
-
elmVersion = elmRelease.version;
92
-
# https://github.com/elm-lang/elm-compiler/issues/1566
93
-
indents = hlib.overrideCabal super.indents (drv: {
94
-
version = "0.3.3";
95
-
#test dep tasty has a version mismatch
96
-
doCheck = false;
97
-
sha256 = "16lz21bp9j14xilnq8yym22p3saxvc9fsgfcf5awn2a6i6n527xn";
98
-
libraryHaskellDepends = drv.libraryHaskellDepends ++ [super.concatenative];
99
-
});
100
};
101
};
102
-
in hsPkgs.elmPkgs // {
103
-
elm = lib.hiPrio (buildEnv {
104
-
name = "elm-${hsPkgs.elmVersion}";
105
-
paths = lib.mapAttrsToList (name: pkg: pkg) hsPkgs.elmPkgs;
106
-
pathsToLink = [ "/bin" ];
107
-
});
108
-
}
···
40
EOF
41
'' + lib.concatStrings cmds;
42
43
+
hsPkgs = haskell.packages.ghc822.override {
44
overrides = self: super:
45
let hlib = haskell.lib;
46
+
elmPkgs = {
47
+
elm = hlib.overrideCabal (self.callPackage ./packages/elm.nix { }) {
48
+
preConfigure = "export HOME=`pwd`";
49
+
};
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
50
51
/*
52
This is not a core Elm package, and it's hosted on GitHub.
···
57
where foo is a tag for a new version, for example "0.3.1-alpha".
58
*/
59
elm-format = self.callPackage ./packages/elm-format.nix { };
60
+
elm-interface-to-json = self.callPackage ./packages/elm-interface-to-json.nix {};
0
0
0
0
0
0
0
0
0
0
0
0
61
};
62
in elmPkgs // {
63
inherit elmPkgs;
64
+
elmVersion = elmPkgs.elm.version;
0
0
0
0
0
0
0
0
65
};
66
};
67
+
in hsPkgs.elmPkgs
0
0
0
0
0
0
-41
pkgs/development/compilers/elm/packages/elm-compiler.nix
···
1
-
{ mkDerivation, aeson, aeson-pretty_0_7_2, ansi-terminal, ansi-wl-pprint
2
-
, base, binary, bytestring, containers, directory, edit-distance
3
-
, fetchgit, filemanip, filepath, HUnit, indents
4
-
, language-ecmascript, language-glsl, mtl, parsec, pretty, process
5
-
, QuickCheck, stdenv, test-framework, test-framework-hunit
6
-
, test-framework-quickcheck2, text, union-find
7
-
}:
8
-
mkDerivation {
9
-
pname = "elm-compiler";
10
-
version = "0.18";
11
-
src = fetchgit {
12
-
url = "https://github.com/elm-lang/elm-compiler";
13
-
sha256 = "09fmrbfpc1kzc3p9h79w57b9qjhajdswc4jfm9gyjw95vsiwasgh";
14
-
rev = "eb97f2a5dd5421c708a91b71442e69d02453cc80";
15
-
};
16
-
isLibrary = true;
17
-
isExecutable = true;
18
-
libraryHaskellDepends = [
19
-
aeson aeson-pretty_0_7_2 ansi-terminal ansi-wl-pprint base binary
20
-
bytestring containers directory edit-distance filepath indents
21
-
language-ecmascript language-glsl mtl parsec pretty process text
22
-
union-find
23
-
];
24
-
executableHaskellDepends = [
25
-
aeson base binary directory filepath process text
26
-
];
27
-
testHaskellDepends = [
28
-
aeson aeson-pretty_0_7_2 ansi-terminal ansi-wl-pprint base binary
29
-
bytestring containers directory edit-distance filemanip filepath
30
-
HUnit indents language-ecmascript language-glsl mtl parsec pretty
31
-
process QuickCheck test-framework test-framework-hunit
32
-
test-framework-quickcheck2 text union-find
33
-
];
34
-
jailbreak = true;
35
-
homepage = http://elm-lang.org;
36
-
description = "Values to help with elm-package, elm-make, and elm-lang.org.";
37
-
license = stdenv.lib.licenses.bsd3;
38
-
# added manually since tests are not passing
39
-
# https://travis-ci.org/elm-lang/elm-compiler/builds/176845852
40
-
doCheck = false;
41
-
}
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-26
pkgs/development/compilers/elm/packages/elm-make.nix
···
1
-
{ mkDerivation, aeson, ansi-terminal, ansi-wl-pprint, base, binary
2
-
, blaze-html, blaze-markup, bytestring, containers, directory
3
-
, elm-compiler, elm-package, fetchgit, filepath, mtl
4
-
, optparse-applicative, raw-strings-qq, stdenv, text, time
5
-
}:
6
-
mkDerivation {
7
-
pname = "elm-make";
8
-
version = "0.18";
9
-
src = fetchgit {
10
-
url = "https://github.com/elm-lang/elm-make";
11
-
sha256 = "1yq4w4yqignlc2si5ns53pmz0a99gix5d2qgi6x7finf7i6sxyw2";
12
-
rev = "1a554833a70694ab142b9179bfac996143f68d9e";
13
-
};
14
-
isLibrary = false;
15
-
isExecutable = true;
16
-
executableHaskellDepends = [
17
-
aeson ansi-terminal ansi-wl-pprint base binary blaze-html
18
-
blaze-markup bytestring containers directory elm-compiler
19
-
elm-package filepath mtl optparse-applicative raw-strings-qq text
20
-
time
21
-
];
22
-
jailbreak = true;
23
-
homepage = http://elm-lang.org;
24
-
description = "A build tool for Elm projects";
25
-
license = stdenv.lib.licenses.bsd3;
26
-
}
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-39
pkgs/development/compilers/elm/packages/elm-package.nix
···
1
-
{ mkDerivation, aeson, aeson-pretty_0_7_2, ansi-wl-pprint, base, binary
2
-
, bytestring, containers, directory, edit-distance, elm-compiler
3
-
, fetchgit, fetchurl, filepath, HTTP, http-client, http-client-tls
4
-
, http-types, mtl, network, optparse-applicative, parallel-io
5
-
, pretty, stdenv, text, time, unordered-containers, vector
6
-
, zip-archive
7
-
}:
8
-
mkDerivation {
9
-
pname = "elm-package";
10
-
version = "0.18";
11
-
src = fetchgit {
12
-
url = "https://github.com/elm-lang/elm-package";
13
-
sha256 = "19krnkjvfk02gmmic5h5i1i0lw7s30927bnd5g57cj8nqbigysv7";
14
-
rev = "8bd150314bacab5b6fc451927aa01deec2276fbf";
15
-
};
16
-
patches = fetchurl {
17
-
url = https://github.com/jerith666/elm-package/commit/40bab60c2fbff70812cc24cdd97f5e09db3844ad.patch;
18
-
sha256 = "0j6pi6cv3h9s6vz68bh0c73fysvk83yhhk56kgshvnrmnpcb3jib";
19
-
};
20
-
isLibrary = true;
21
-
isExecutable = true;
22
-
libraryHaskellDepends = [
23
-
aeson aeson-pretty_0_7_2 ansi-wl-pprint base binary bytestring containers
24
-
directory edit-distance elm-compiler filepath HTTP http-client
25
-
http-client-tls http-types mtl network parallel-io text time
26
-
unordered-containers vector zip-archive
27
-
];
28
-
executableHaskellDepends = [
29
-
aeson aeson-pretty_0_7_2 ansi-wl-pprint base binary bytestring containers
30
-
directory edit-distance elm-compiler filepath HTTP http-client
31
-
http-client-tls http-types mtl network optparse-applicative
32
-
parallel-io pretty text time unordered-containers vector
33
-
zip-archive
34
-
];
35
-
jailbreak = true;
36
-
homepage = https://github.com/elm-lang/elm-package;
37
-
description = "Package manager for Elm libraries";
38
-
license = stdenv.lib.licenses.bsd3;
39
-
}
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-30
pkgs/development/compilers/elm/packages/elm-repl.nix
···
1
-
{ mkDerivation, base, binary, bytestring, bytestring-trie, cmdargs
2
-
, containers, directory, elm-compiler, elm-package, fetchgit
3
-
, filepath, haskeline, HUnit, mtl, parsec, QuickCheck, stdenv
4
-
, test-framework, test-framework-hunit, test-framework-quickcheck2
5
-
, text
6
-
}:
7
-
mkDerivation {
8
-
pname = "elm-repl";
9
-
version = "0.18";
10
-
src = fetchgit {
11
-
url = "https://github.com/elm-lang/elm-repl";
12
-
sha256 = "112fzykils4lqz4pc44q4mwvxg0px0zfwx511bfvblrxkwwqlfb5";
13
-
rev = "85f0bcfc28ea6c8a99a360d55c21ff25a556f9fe";
14
-
};
15
-
isLibrary = false;
16
-
isExecutable = true;
17
-
executableHaskellDepends = [
18
-
base binary bytestring bytestring-trie cmdargs containers directory
19
-
elm-compiler elm-package filepath haskeline mtl parsec text
20
-
];
21
-
testHaskellDepends = [
22
-
base bytestring bytestring-trie cmdargs directory elm-compiler
23
-
elm-package filepath haskeline HUnit mtl parsec QuickCheck
24
-
test-framework test-framework-hunit test-framework-quickcheck2
25
-
];
26
-
jailbreak = true;
27
-
homepage = https://github.com/elm-lang/elm-repl;
28
-
description = "a REPL for Elm";
29
-
license = stdenv.lib.licenses.bsd3;
30
-
}
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
+30
pkgs/development/compilers/elm/packages/elm.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{ mkDerivation, ansi-terminal, ansi-wl-pprint, base, binary
2
+
, bytestring, containers, directory, edit-distance, fetchgit
3
+
, file-embed, filepath, ghc-prim, haskeline, HTTP, http-client
4
+
, http-client-tls, http-types, language-glsl, logict, mtl, network
5
+
, parsec, process, raw-strings-qq, scientific, SHA, snap-core
6
+
, snap-server, stdenv, template-haskell, text, time
7
+
, unordered-containers, utf8-string, vector, zip-archive
8
+
}:
9
+
mkDerivation {
10
+
pname = "elm";
11
+
version = "0.19.0";
12
+
src = fetchgit {
13
+
url = "https://github.com/elm/compiler";
14
+
sha256 = "0s93z9vr0vp5w894ghc5s34nsq09sg1msf59zfiba87sid5vgjqy";
15
+
rev = "32059a289d27e303fa1665e9ada0a52eb688f302";
16
+
};
17
+
isLibrary = false;
18
+
isExecutable = true;
19
+
executableHaskellDepends = [
20
+
ansi-terminal ansi-wl-pprint base binary bytestring containers
21
+
directory edit-distance file-embed filepath ghc-prim haskeline HTTP
22
+
http-client http-client-tls http-types language-glsl logict mtl
23
+
network parsec process raw-strings-qq scientific SHA snap-core
24
+
snap-server template-haskell text time unordered-containers
25
+
utf8-string vector zip-archive
26
+
];
27
+
homepage = "http://elm-lang.org";
28
+
description = "The `elm` command line interface";
29
+
license = stdenv.lib.licenses.bsd3;
30
+
}
-28
pkgs/development/compilers/elm/update-elm.rb
···
1
-
#!/usr/bin/env ruby
2
-
3
-
# Take those from https://github.com/elm-lang/elm-platform/blob/master/installers/BuildFromSource.hs
4
-
$elm_version = "0.18.0"
5
-
$elm_packages = { "elm-compiler" => "0.18.0",
6
-
"elm-package" => "0.18.0",
7
-
"elm-make" => "0.18.0",
8
-
"elm-reactor" => "0.18.0",
9
-
"elm-repl" => "0.18.0"
10
-
}
11
-
12
-
for pkg, ver in $elm_packages
13
-
system "cabal2nix https://github.com/elm-lang/#{pkg} --revision refs/tags/#{ver} --jailbreak > packages/#{pkg}.nix"
14
-
end
15
-
16
-
File.open("packages/release.nix", 'w') do |file|
17
-
file.puts "# This file is auto-generated by ./update-elm.rb."
18
-
file.puts "# Please, do not modify it by hand!"
19
-
file.puts "{ callPackage }:"
20
-
file.puts "{"
21
-
file.puts " version = \"#{$elm_version}\";"
22
-
file.puts " packages = {"
23
-
for pkg, ver in $elm_packages
24
-
file.puts " #{pkg} = callPackage ./#{pkg}.nix { };"
25
-
end
26
-
file.puts " };"
27
-
file.puts "}"
28
-
end
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0