Browse Source

use elm2nix to avoid re-downloading packages

main
Brian Hicks 8 months ago
parent
commit
ad6105c381
  1. 1
      .gitignore
  2. 9
      default.nix
  3. 87
      nix/elm-srcs.nix
  4. BIN
      nix/registry.dat
  5. 1
      shell.nix

1
.gitignore

@ -1,2 +1,3 @@
/dist
/elm-stuff
/result

9
default.nix

@ -9,9 +9,11 @@ stdenv.mkDerivation {
src = gitignore.gitignoreSource ./.;
buildInputs = [ elmPackages.elm elmPackages.elm-test ];
buildPhase = ''
env ELM_HOME=.elm make dist
'';
buildPhase = pkgs.elmPackages.fetchElmDeps {
elmPackages = import ./nix/elm-srcs.nix;
elmVersion = "0.19.1";
registryDat = ./nix/registry.dat;
};
doCheck = true;
checkPhase = ''
@ -19,6 +21,7 @@ stdenv.mkDerivation {
'';
installPhase = ''
make dist
mkdir -p $out/share/
mv dist $out/share/elo-anything
'';

87
nix/elm-srcs.nix

@ -0,0 +1,87 @@
{
"elm/file" = {
sha256 = "1rljcb41dl97myidyjih2yliyzddkr2m7n74x7gg46rcw4jl0ny8";
version = "1.0.5";
};
"elm/json" = {
sha256 = "0kjwrz195z84kwywaxhhlnpl3p251qlbm5iz6byd6jky2crmyqyh";
version = "1.1.3";
};
"elm/html" = {
sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k";
version = "1.0.0";
};
"elm/browser" = {
sha256 = "0nagb9ajacxbbg985r4k9h0jadqpp0gp84nm94kcgbr5sf8i9x13";
version = "1.0.2";
};
"rtfeldman/elm-css" = {
sha256 = "05sgz21jnnmz6m5s74515337n1aanab2zzn8jpw3bhdjc9cwwfcj";
version = "16.0.1";
};
"elm/core" = {
sha256 = "19w0iisdd66ywjayyga4kv2p1v9rxzqjaxhckp8ni6n8i0fb2dvf";
version = "1.0.5";
};
"tesk9/accessible-html-with-css" = {
sha256 = "0yb7zpmyn1v8lyvkpqw6abpywc7dqbj50ijcy9bgnhzrijinrlb6";
version = "2.1.1";
};
"elm-community/list-extra" = {
sha256 = "1rvr1c8cfb3dwf3li17l9ziax6d1fshkliasspnw6rviva38lw34";
version = "8.2.4";
};
"elm/random" = {
sha256 = "138n2455wdjwa657w6sjq18wx2r0k60ibpc4frhbqr50sncxrfdl";
version = "1.0.0";
};
"BrianHicks/elm-css-reset" = {
sha256 = "1cbdhm9pmzrb6ch2wfrxqma5h6cska557abg85bbdk4m88fy7ry9";
version = "1.0.1";
};
"elm/bytes" = {
sha256 = "02ywbf52akvxclpxwj9n04jydajcbsbcbsnjs53yjc5lwck3abwj";
version = "1.0.8";
};
"rtfeldman/elm-hex" = {
sha256 = "1y0aa16asvwdqmgbskh5iba6psp43lkcjjw9mgzj3gsrg33lp00d";
version = "1.0.0";
};
"elm/url" = {
sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4";
version = "1.0.0";
};
"elm/time" = {
sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1";
version = "1.0.0";
};
"Skinney/murmur3" = {
sha256 = "1iiia68w8wlp2qjilyqgnzgjcxby47gla3rw5minj8i5c64zk18j";
version = "2.0.8";
};
"elm/virtual-dom" = {
sha256 = "0q1v5gi4g336bzz1lgwpn5b1639lrn63d8y6k6pimcyismp2i1yg";
version = "1.0.2";
};
"elm-explorations/test" = {
sha256 = "1fsd7bajm7qa93r5pn3mdafqh3blpzya601jbs9l238p0hmvh576";
version = "1.2.2";
};
}

BIN
registry.dat → nix/registry.dat

1
shell.nix

@ -16,6 +16,7 @@ stdenv.mkDerivation {
elmPackages.elm
elmPackages.elm-format
elmPackages.elm-test
elm2nix
# Build Stuff
gnumake

Loading…
Cancel
Save