Change:
Not sure whether this is darwin-specific. I cannot install next to , because both want link . It seems wrong for either of the packages to link shared libraries. I suspect this is because e.g. sets . I'd be happy to submit a patch to change this, but there seems to be a stack of scripts that's meant to generate this that's too deep for me. nix-env -iA nix-env -iA system: host os: multi-user?: sandbox: version: channels(rob): nixpkgs:
Usually we need a for these to work currently. Not sure if that is currently possible? You can also set meta.priority to a different number for each (default is 5). /cc
I think this must be darwin-specific; I have these packages happily coexisting alongside each other in on NixOS:
Yes, looks darwin-specific, via
Fixed in

Discussion:
</screen> </para> </section> <section xml:id="sec-elm"> <title>Elm</title> <para> <del> The Nix expressions for Elm reside in <filename>pkgs/development/compilers/elm</filename>. They are generated automatically by <command>update-elm.rb</command> script. One should specify versions of Elm packages inside the script, clear the <filename>packages</filename> directory and run the script from inside it. <literal>elm-reactor</literal> is special because it also has Elm package dependencies. The process is not automated very much for now -- you should get the <literal>elm-reactor</literal> source tree (e.g. with <command>nix-shell</command>) and run <command>elm2nix.rb</command> inside it. Place the resulting <filename>package.nix</filename> file into <filename>packages/elm-reactor-elm.nix</filename>. </del> <ins> To update Elm compiler, see <filename>nixpkgs/pkgs/development/compilers/elm/README.md</filename>. </para> <para> To package Elm applications, <link xlink:href="https://github.com/hercules-ci/elm2nix#elm2nix">read about elm2nix</link>. </ins> </para> </section> <section xml:id="sec-shell-helpers"> <title>Interactive shell helpers</title>

<ins> # To update Elm: Modify revision in ./update.sh and run it # Notes about the build process: The elm binary embeds a piece of pre-compiled elm code, used by 'elm reactor'. This means that the build process for 'elm' effectively executes 'elm make'. that in turn expects to retrieve the elm dependencies of that code (elm/core, etc.) from package.elm-lang.org, as well as a cached bit of metadata (versions.dat). The makeDotElm function lets us retrieve these dependencies in the standard nix way. we have to copy them in (rather than symlink) and make them writable because the elm compiler writes other .dat files alongside the source code. versions.dat was produced during an impure build of this same code; the build complains that it can't update this cache, but continues past that warning. Finally, we set ELM_HOME to point to these pre-fetched artifacts so that the default of ~/.elm isn't used. More: https://blog.hercules-ci.com/elm/2019/01/03/elm2nix-0.1/ </ins>

, haskell, nodejs , fetchurl, fetchpatch, makeWrapper, git }: <del> # To update: # 1) Modify ./update.sh and run it # 2) to generate versions.dat: # 2.1) git clone https://github.com/elm/compiler.git # 2.2) cd compiler # 2.3) cabal2nix --shell . | sed 's/"default",/"ghc822",/' > shell.nix # 2.4) nix-shell # 2.5) mkdir .elm # 2.6) export ELM_HOME=$(pwd)/.elm # 2.7) cabal build # 2.8) cp .elm/0.19.0/package/versions.dat ... # 3) generate a template for elm-elm.nix with: # ( #   echo "{"; #   jq '.dependencies | .direct, .indirect | to_entries | .[] | { (.key) : { version : .value, sha256:  "" } } '  #   < ui/browser/elm.json  #   | sed 's/:/ =/'  #   | sed 's/^[{}]//'  #   | sed -E 's/(["}]),?$/1;/'  #   | sed -E 's/"(version|sha256)"/1/'  #   | grep -v '^$'; #   echo "}" # ) # # ... then fill in the sha256s # Notes: # the elm binary embeds a piece of pre-compiled elm code, used by 'elm # reactor'. this means that the build process for 'elm' effectively # executes 'elm make'. that in turn expects to retrieve the elm # dependencies of that code (elm/core, etc.) from # package.elm-lang.org, as well as a cached bit of metadata # (versions.dat). # the makeDotElm function lets us retrieve these dependencies in the # standard nix way. we have to copy them in (rather than symlink) and # make them writable because the elm compiler writes other .dat files # alongside the source code. versions.dat was produced during an # impure build of this same code; the build complains that it can't # update this cache, but continues past that warning. # finally, we set ELM_HOME to point to these pre-fetched artifacts so # that the default of ~/.elm isn't used. </del> let fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; }; <del> hsPkgs = haskell.packages.ghc822.override { </del> <ins> hsPkgs = haskell.packages.ghc863.override { </ins> overrides = self: super: with haskell.lib; let elmPkgs = { elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: { # sadly with parallelism most of the time breaks compilation enableParallelBuilding = false; <del> preConfigure = fetchElmDeps { elmPackages = (import ./packages/elm-elm.nix); </del> <ins> preConfigure = self.fetchElmDeps { elmPackages = (import ./packages/elm-srcs.nix); </ins> versionsDat = ./versions.dat; }; buildTools = drv.buildTools or [] ++ [ makeWrapper ]; <del> patches = [ (fetchpatch { url = "https://github.com/elm/compiler/pull/1784/commits/78d2d8eab310552b1b877a3e90e1e57e7a09ddec.patch"; sha256 = "0vdhk16xqm2hxw12s1b91a0bmi8w4wsxc086qlzglgnjxrl5b3w4"; }) ]; </del> <ins> jailbreak = true; </ins> postInstall = '' wrapProgram $out/bin/elm  --prefix PATH ':' ${lib.makeBinPath [ nodejs ]} ''; }); /* The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo: `pacakge/nix/build.sh` */ <del> elm-format = self.callPackage ./packages/elm-format.nix {}; </del> <ins> elm-format = justStaticExecutables (doJailbreak (self.callPackage ./packages/elm-format.nix {})); </ins> inherit fetchElmDeps; <ins> elmVersion = elmPkgs.elm.version; </ins> }; in elmPkgs // { inherit elmPkgs; <del> elmVersion = elmPkgs.elm.version; </del> # Needed for elm-format indents = self.callPackage ./packages/indents.nix {}; <del> tasty-quickcheck = self.callPackage ./packages/tasty-quickcheck.nix {}; </del> }; }; in hsPkgs.elmPkgs

<del> #!/usr/bin/env ruby require 'json' system("elm-package install -y") depsSrc = JSON.parse(File.read("elm-stuff/exact-dependencies.json")) deps = Hash[ depsSrc.map { |pkg, ver| url = "https://github.com/#{pkg}/archive/#{ver}.tar.gz" sha256 = `nix-prefetch-url #{url}` [ pkg, { version: ver, sha256: sha256.strip } ] } ] File.open("package.nix", 'w') do |file| file.puts "{" for pkg, info in deps file.puts "  "#{pkg}" = {" file.puts "    version = "#{info[:version]}";" file.puts "    sha256 = "#{info[:sha256]}";" file.puts "  };" end file.puts "}" end </del>

<del> { "elm/browser" = { version = "1.0.0"; sha256 = "1apmvyax93nvmagwj00y16zx10kfv640cxpi64xgqbgy7d2wphy4"; }; "elm/core" = { version = "1.0.0"; sha256 = "10kr86h4v5h4p0586q406a5wbl8xvr1jyrf6097zp2wb8sv21ylw"; }; "elm/html" = { version = "1.0.0"; sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k"; }; "elm/http" = { version = "1.0.0"; sha256 = "1igmm89ialzrjib1j8xagkxalq1x2gj4l0hfxcd66mpwmvg7psl8"; }; "elm/json" = { version = "1.0.0"; sha256 = "1g0hafkqf2q633r7ir9wxpb1lnlzskhpsyi0h5bkzj0gl072zfnb"; }; "elm/project-metadata-utils" = { version = "1.0.0"; sha256 = "1d4rd4grrnbdvj9gf00h7dr6hbkjzawgkzpizfrkp1z1pyr3mvq9"; }; "elm/svg" = { version = "1.0.0"; sha256 = "08x0v8p9wm699jjmsnbq69pxv3jh60j4f6fg7y6hyr7xxj85y390"; }; "elm-explorations/markdown" = { version = "1.0.0"; sha256 = "0k3110ixa4wwf3vkkdplagwah9ypr965qxr1y147rnsc1xsxmr6y"; }; "elm/parser" = { version = "1.0.0"; sha256 = "0k4zlq30lrvawqvzwbvsl0hrmwf9s832mb41z7fdspm4549dj7wc"; }; "elm/time" = { version = "1.0.0"; sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1"; }; "elm/url" = { version = "1.0.0"; sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4"; }; "elm/virtual-dom" = { version = "1.0.0"; sha256 = "0hm8g92h7z39km325dlnhk8n00nlyjkqp3r3jppr37k2k13md6aq"; }; } </del>

<ins> { "elm-explorations/markdown" = { sha256 = "0k3110ixa4wwf3vkkdplagwah9ypr965qxr1y147rnsc1xsxmr6y"; version = "1.0.0"; }; "elm/json" = { sha256 = "1g0hafkqf2q633r7ir9wxpb1lnlzskhpsyi0h5bkzj0gl072zfnb"; version = "1.0.0"; }; "elm/html" = { sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k"; version = "1.0.0"; }; "elm/svg" = { sha256 = "08x0v8p9wm699jjmsnbq69pxv3jh60j4f6fg7y6hyr7xxj85y390"; version = "1.0.0"; }; "elm/project-metadata-utils" = { sha256 = "1d4rd4grrnbdvj9gf00h7dr6hbkjzawgkzpizfrkp1z1pyr3mvq9"; version = "1.0.0"; }; "elm/browser" = { sha256 = "1apmvyax93nvmagwj00y16zx10kfv640cxpi64xgqbgy7d2wphy4"; version = "1.0.0"; }; "elm/core" = { sha256 = "10kr86h4v5h4p0586q406a5wbl8xvr1jyrf6097zp2wb8sv21ylw"; version = "1.0.0"; }; "elm/http" = { sha256 = "1igmm89ialzrjib1j8xagkxalq1x2gj4l0hfxcd66mpwmvg7psl8"; version = "1.0.0"; }; "elm/parser" = { sha256 = "0k4zlq30lrvawqvzwbvsl0hrmwf9s832mb41z7fdspm4549dj7wc"; version = "1.0.0"; }; "elm/url" = { sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4"; version = "1.0.0"; }; "elm/time" = { sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1"; version = "1.0.0"; }; "elm/virtual-dom" = { sha256 = "0hm8g92h7z39km325dlnhk8n00nlyjkqp3r3jppr37k2k13md6aq"; version = "1.0.0"; }; } </ins>

url = "https://github.com/elm/compiler"; sha256 = "13jks6c6i80z71mjjfg46ri570g5ini0k3xw3857v6z66zcl56x4"; rev = "d5cbc41aac23da463236bbc250933d037da4055a"; <ins> fetchSubmodules = true; </ins> }; isLibrary = false; isExecutable = true;

<del> { mkDerivation, base, pcre-light, QuickCheck, random, stdenv , tagged, tasty, tasty-hunit }: mkDerivation { pname = "tasty-quickcheck"; version = "0.9.2"; sha256 = "c5920adeab6e283d5e3ab45f3c80a1b011bedfbe4a3246a52606da2e1da95873"; libraryHaskellDepends = [ base QuickCheck random tagged tasty ]; testHaskellDepends = [ base pcre-light tasty tasty-hunit ]; doCheck = false; homepage = "https://github.com/feuerbach/tasty"; description = "QuickCheck support for the Tasty test framework"; license = stdenv.lib.licenses.mit; } </del>

<del> cabal2nix https://github.com/elm/compiler --revision  32059a289d27e303fa1665e9ada0a52eb688f302 > packages/elm.nix </del> <ins> #!/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" elm2nix convert > $OLDPWD/packages/elm-srcs.nix popd </ins>