Skip to content
Permalink
Browse files

Concourse 5.0.1-pre (#2)

* stop using yarn2nix

* fix hashes

* unvendor lib/pq in concourse/dex

* stop building yarn modules
  • Loading branch information...
dingxiangfei2009 committed Apr 9, 2019
2 parents 9654cd5 + 95d8fab commit 043c459040747bc2bea56378fe4327154b03939d
@@ -1,36 +1,59 @@
{
cacert,
gmp,
mkYarnPackage,
callPackage,
elmPackages,
lib,
nodePackages,
nss,
patchelf,
src,
stdenv,
zlib,
symlinkJoin,
}:
mkYarnPackage {
name = "concourse-main-assets";
nativeBuildInputs = [ nodePackages.yarn patchelf cacert ];
buildInputs = [ cacert ];
inherit src;
yarnNix = ./yarn.nix;
pkgConfig = {
elm = {
postInstall = ''
find . -type f -executable -exec patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
find . -type f -executable -exec patchelf --set-rpath "${gmp}/lib:${zlib}/lib:${nss}/lib" {} \;
let
mkElmPackage =
{ srcs ? ./elm-srcs.nix
, src
, name
, srcdir ? "./src"
, targets ? []
, versionsDat ? ./versions.dat
}:
stdenv.mkDerivation {
inherit name src;

buildInputs = [ elmPackages.elm ];

buildPhase = elmPackages.fetchElmDeps {
elmPackages = import srcs;
inherit versionsDat;
};

installPhase = let
elmfile = module: "${srcdir}/${builtins.replaceStrings ["."] ["/"] module}.elm";
in ''
mkdir -p $out/share/doc
${lib.concatStrings (map (module: ''
echo "compiling ${elmfile module}"
elm make ${elmfile module} --output $out/${module}.js
'') targets)}
'';
};

elm-package = mkElmPackage {
src = src + "/web/elm";
name = "concourse-web";
targets = [ "Main" ];
};
yarnFlags = [
"--offline"
"--frozen-lockfile"
in
stdenv.mkDerivation {
name = "concourse-main-assets";
nativeBuildInputs = [
nodePackages.less
nodePackages.uglify-js
];
preBuild = ''
mkdir -p elm_home
export HOME=`realpath elm_home`
yarn build
inherit src;
buildPhase = ''
export NODE_PATH=${nodePackages.less-plugin-clean-css}/lib/node_modules
lessc --clean-css=--advanced web/assets/css/main.less web/public/main.css
uglifyjs < ${elm-package}/Main.js > web/public/elm.min.js
'';
installPhase = ''
mkdir -p $out
@@ -0,0 +1,137 @@
{

"krisajenkins/remotedata" = {
sha256 = "0sjrgpsy4aci0h6qndqx70cnfd065hlkh1rxk0lc93z22sdj4knl";
version = "5.0.0";
};

"vito/elm-ansi" = {
sha256 = "0l9sav5nyr4302g1gk6dr1y42mvnz82qh7qqz4f4rdzxgbs30l2y";
version = "9.0.1";
};

"elm-community/maybe-extra" = {
sha256 = "10jykkdmqpvhbcm50867a894272j4z6jc9r5jy35cz8jfi9j8xv9";
version = "5.0.0";
};

"elm/json" = {
sha256 = "0kjwrz195z84kwywaxhhlnpl3p251qlbm5iz6byd6jky2crmyqyh";
version = "1.1.3";
};

"truqu/elm-base64" = {
sha256 = "12w68b4idbs2vn0gm0lj354pm745jb7n0fj69408mpvh5r1z4m1b";
version = "2.0.4";
};

"elm/regex" = {
sha256 = "0lijsp50w7n1n57mjg6clpn9phly8vvs07h0qh2rqcs0f1jqvsa2";
version = "1.0.0";
};

"elm/html" = {
sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k";
version = "1.0.0";
};

"NoRedInk/elm-simple-fuzzy" = {
sha256 = "17nzrwaax86db0fg6sdiqzsrkmsczdi9q3xmp7i7yinin42b52dq";
version = "1.0.3";
};

"elm/svg" = {
sha256 = "1cwcj73p61q45wqwgqvrvz3aypjyy3fw732xyxdyj6s256hwkn0k";
version = "1.0.1";
};

"arturopala/elm-monocle" = {
sha256 = "1vqjx5b90iaxs9kd3l7wa0qngnfis16isx9vfnbm29y1fndzy7a3";
version = "2.1.0";
};

"fapian/elm-html-aria" = {
sha256 = "0fm4kbd5sk8gkini29ssc1paaa5z2x43ahsspl1yhf4gq6ban3q6";
version = "1.4.0";
};

"elm/parser" = {
sha256 = "0a3cxrvbm7mwg9ykynhp7vjid58zsw03r63qxipxp3z09qks7512";
version = "1.1.0";
};

"elm/browser" = {
sha256 = "1zlmx672glg7fdgkvh5jm47y85pv7pdfr5mkhg6x7ar6k000vyka";
version = "1.0.1";
};

"matthewsj/elm-ordering" = {
sha256 = "1lwd442p7jm5qbr3harmxmfxs3xhmdm72azyy2w37qahmzs917qa";
version = "2.0.0";
};

"elm-community/json-extra" = {
sha256 = "0gsd0d6vlxw810yvx6k7nda13j09fsfibwhsqlaxb3z3f2vidygc";
version = "4.0.0";
};

"elm/core" = {
sha256 = "10kr86h4v5h4p0586q406a5wbl8xvr1jyrf6097zp2wb8sv21ylw";
version = "1.0.0";
};

"elm/url" = {
sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4";
version = "1.0.0";
};

"ryannhg/date-format" = {
sha256 = "1hjic1nrfiss5wjqsqvh0szb85ivjglmarcq1j8xl67z3ygv3lvi";
version = "2.3.0";
};

"elm-community/list-extra" = {
sha256 = "0ngynq305b45zkz0398z66ldb1xl3jjnzdrj8fddim1zxjv2jdiw";
version = "8.1.0";
};

"lukewestby/elm-http-builder" = {
sha256 = "1rby7lfsaj9iv9dlvy0h4arixg5y04p0jbn5hrpi62bj3qf7ap7f";
version = "6.0.0";
};

"elm/http" = {
sha256 = "1igmm89ialzrjib1j8xagkxalq1x2gj4l0hfxcd66mpwmvg7psl8";
version = "1.0.0";
};

"elm/time" = {
sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1";
version = "1.0.0";
};

"avh4/elm-fifo" = {
sha256 = "1ka0iz2psr75h4qz7hh5z1prclah1nais9aaycaxapfd7inqmrrc";
version = "1.0.4";
};

"rtfeldman/elm-hex" = {
sha256 = "1y0aa16asvwdqmgbskh5iba6psp43lkcjjw9mgzj3gsrg33lp00d";
version = "1.0.0";
};

"Skinney/murmur3" = {
sha256 = "1iiia68w8wlp2qjilyqgnzgjcxby47gla3rw5minj8i5c64zk18j";
version = "2.0.8";
};

"elm/virtual-dom" = {
sha256 = "0q1v5gi4g336bzz1lgwpn5b1639lrn63d8y6k6pimcyismp2i1yg";
version = "1.0.2";
};

"rtfeldman/elm-iso8601-date-strings" = {
sha256 = "1n4zhm00m37fgy4vb6cayplm4yz6k78ijbmqajrqfnbsyc26p8wr";
version = "1.1.2";
};
}
Binary file not shown.

0 comments on commit 043c459

Please sign in to comment.
You can’t perform that action at this time.