I'm a little surprised that more people haven't tried nix for pinning their 
Elm tools... E.g. pop a shell.nix file like this into your project root and 
you'll have it pinned to elm 0.18 indefinitely:

{
  bootpkgs ? (import <nixpkgs> {}).pkgs
}:


let
  pkgs =
    import
      (bootpkgs.fetchFromGitHub {
        owner = "NixOS";
        repo = "nixpkgs";
        rev = "6018464c49dc60b1779f10a714974dcb4eb21c30";
        sha256 = "1fq9zarsanislnsn9vrn4k852qk1ygckxqdzf1iywgsbp2a5hkn1";
      })
      {
        overlays = [
          (self: super:
            let
              inherit (self) fetchurl fetchFromGitHub callPackage haskell;
              nodeEnv = callPackage 
"${self.path}/pkgs/development/node-packages/node-env.nix" {};
            in
            {
              elmPackages = super.elmPackages // {
                elm-reactor =
                  haskell.lib.overrideCabal super.elmPackages.elm-reactor
                    (drv:
                      {
                        # I'm using my own fork of elm-reactor that enables 
ports, because productivity
                        src = fetchFromGitHub
                          {
                            owner = "rehno-lindeque";
                            repo = "elm-reactor";
                            sha256 = 
"0jfhg8gsy3r1myzls5ilx4i87d52lfr05l5736jxvjq926bfv3a2";
                            rev = "9a1887d60ec3753e25c10084c7ad25f566e5f0a8"
;
                          };
                      }
                    );
                elm-format =
                  haskell.lib.overrideCabal super.elmPackages.elm-format
                    (drv:
                      {
                        src = fetchFromGitHub
                          {
                            owner = "avh4";
                            repo = "elm-format";
                            sha256 = 
"0lman7h6wr75y90javcc4y1scvwgv125gqqaqvfrd5xrfmm43gg8";
                            rev = "e452ed9342620e7bb0bc822983b96411d57143ef"
;
                          };


                        postInstall =
                          ''
                          ln -s $out/bin/elm-format-0.18 $out/bin/elm-format
                          '';
                      }
                    );
                elm-oracle =
                  nodeEnv.buildNodePackage {
                    name = "elm-oracle";
                    packageName = "elm-oracle";
                    version = "1.1.1";
                    src = fetchurl {
                      url = 
"https://registry.npmjs.org/elm-oracle/-/elm-oracle-1.1.1.tgz";;
                      sha1 = "61f6d783221b4ad08e7d101d678b9d5a67d3961c";
                    };
                  };
              };
            }
          )
        ];
      };
in
  pkgs.stdenv.mkDerivation
    {
      name = "shell";
      version = "0.0.0";
      buildInputs =
        ( with pkgs.elmPackages;
          [
            elm-make
            elm-package
            elm-repl
            elm-reactor
            elm-format
            elm-oracle
          ]
        );
    }


As a bonus you can get to add extra goodies like elm-format, elm-oracle, 
your own personalized fork of elm-reactor or other non-elm tools perhaps 
(grunt, webpack, nodejs, etc...).

Just a thought anyway :)


On Thursday, April 6, 2017 at 4:30:02 PM UTC, Nicholas Hollon wrote:
>
> There needs to be a better advertising of the ecosystem both in terms of 
>> tools and in terms of packages.
>>
>
> I agree with this, but the effort needs to start with the library authors.
>
> As far as I can tell (searching this list, Google, & r/elm), Erik is the 
> only one of these authors who has publicized their work in any way.
>
> If you invent a wheel, you need to tell people about it. You can't just 
> leave it lying in your front yard and hope that people walk by your house 
> :-)
>
>
>
> On Thursday, April 6, 2017 at 6:34:53 AM UTC-7, Peter Damoc wrote:
>>
>> On Thu, Apr 6, 2017 at 3:43 PM, Eirik Sletteberg <[email protected]> 
>> wrote:
>>
>>> None of these tools are mentioned in the Elm documentation. It only 
>>> points to installers and the npm module.
>>
>>
>> Exactly my point. 
>> There needs to be a better advertising of the ecosystem both in terms of 
>> tools and in terms of packages. 
>>
>>
>> -- 
>> There is NO FATE, we are the creators.
>> blog: http://damoc.ro/
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to