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