5 mkDerivation = { srcs ? ./elm-srcs.nix, src, name, srcdir ? "./frontend"
6 , targets ? [ ], registryDat ? ./registry.dat, outputJavaScript ? true }:
10 buildInputs = [ elmPackages.elm ]
11 ++ lib.optional outputJavaScript nodePackages.uglify-js;
13 buildPhase = pkgs.elmPackages.fetchElmDeps {
14 elmPackages = import srcs;
15 elmVersion = "0.19.1";
21 "${srcdir}/${builtins.replaceStrings [ "." ] [ "/" ] module}.elm";
22 extension = if outputJavaScript then "js" else "html";
24 mkdir -p $out/share/doc
25 ${lib.concatStrings (map (module: ''
26 echo "compiling ${elmfile module}"
29 } --output $out/${module}.${extension} --docs $out/share/doc/${module}.json
30 ${lib.optionalString outputJavaScript ''
31 echo "minifying ${elmfile module}"
32 uglifyjs $out/${module}.${extension} --compress 'pure_funcs="F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9",pure_getters,keep_fargs=false,unsafe_comps,unsafe' \
33 | uglifyjs --mangle --output $out/${module}.min.${extension}
40 srcs = ./elm-srcs.nix;
43 include = [ (nix-filter.inDirectory ./frontend) ./elm.json ];
46 srcdir = "./frontend";
47 outputJavaScript = true;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list